diff --git a/boot_manager.py b/boot_manager.py index 3d303d4..bf8feb2 100644 --- a/boot_manager.py +++ b/boot_manager.py @@ -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'], diff --git a/config_example.json b/config_example.json index 32f55c0..f7d875c 100644 --- a/config_example.json +++ b/config_example.json @@ -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": "" +} \ No newline at end of file