feat: v0.3.2 — split identity_iot_url/identity_tag_url/data_destination_url, fix do_checkin
This commit is contained in:
@@ -112,7 +112,8 @@ def save_config(cfg):
|
||||
|
||||
def validate_config(cfg):
|
||||
required = ['wifi_ssid', 'wifi_pass', 'comm_key', 'comm_iv',
|
||||
'base_url', 'tenant_id', 'node_type', 'node_id']
|
||||
'tenant_id', 'node_type', 'node_id',
|
||||
'identity_iot_url', 'identity_tag_url']
|
||||
for k in required:
|
||||
if k not in cfg:
|
||||
print('[config] missing key:', k)
|
||||
@@ -167,7 +168,7 @@ def do_checkin(cfg):
|
||||
from identity_iot import IdentityIoT
|
||||
|
||||
identity = IdentityIoT(
|
||||
base_url = cfg['base_url'],
|
||||
base_url = cfg['identity_iot_url'],
|
||||
node_type = cfg.get('node_type', 'access_control'),
|
||||
node_label = cfg.get('node_label', ''),
|
||||
tenant_id = cfg['tenant_id'],
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
{
|
||||
"wifi_ssid": "YOUR_SSID",
|
||||
"wifi_pass": "YOUR_PASSWORD",
|
||||
"wifi_static": false,
|
||||
"wifi_ip": "192.168.1.50",
|
||||
"wifi_mask": "255.255.255.0",
|
||||
"wifi_gw": "192.168.1.1",
|
||||
"wifi_dns": "8.8.8.8",
|
||||
"comm_key": "YOUR_32_CHAR_KEY________________",
|
||||
"comm_iv": "YOUR_16_CHAR_IV_",
|
||||
"base_url": "https://api.parta.app/API/V1/identity_tag/",
|
||||
"tenant_id": 1,
|
||||
"node_id": 0,
|
||||
"node_type": "access_control",
|
||||
"node_label": "terminal-01"
|
||||
}
|
||||
"wifi_ssid": "YOUR_SSID",
|
||||
"wifi_pass": "YOUR_PASSWORD",
|
||||
"wifi_static": false,
|
||||
"wifi_ip": "192.168.1.50",
|
||||
"wifi_mask": "255.255.255.0",
|
||||
"wifi_gw": "192.168.1.1",
|
||||
"wifi_dns": "8.8.8.8",
|
||||
"comm_key": "YOUR_32_CHAR_KEY________________",
|
||||
"comm_iv": "YOUR_16_CHAR_IV_",
|
||||
"tenant_id": 1,
|
||||
"node_id": 0,
|
||||
"node_type": "access_control",
|
||||
"node_label": "terminal-01",
|
||||
"identity_iot_url": "https://api.parta.app/API/V1/identity_layer/identity_iot/",
|
||||
"identity_tag_url": "https://api.parta.app/API/V1/identity_layer/identity_tag/",
|
||||
"data_destination_url": ""
|
||||
}
|
||||
Reference in New Issue
Block a user