Closed lptr closed 3 months ago
We now track a device ID in device-config.json:
device-config.json
{ "instance": "test-mk6-3", "id": "UD0601-003", // <-- this "peripherals": [ // ... ] }
It now appears in the init MQTT message the device sends on start:
init
{ "type": "ugly-duckling", "model": "mk6", "id": "UD0601-003", "instance": "test-mk6-3", "mac": "34:85:18:50:0b:48", "deviceConfig": { "id": "UD0601-003", "instance": "test-mk6-3", // ... }, // ... }
Note the "id" field is also part of the published deviceConfig, but this redundancy is acceptable, and it helps separate where the ID is defined from what it is. We might want to move it to someplace else later on, such as a hw.json file.
"id"
deviceConfig
hw.json
We now track a device ID in
device-config.json
:It now appears in the
init
MQTT message the device sends on start:Note the
"id"
field is also part of the publisheddeviceConfig
, but this redundancy is acceptable, and it helps separate where the ID is defined from what it is. We might want to move it to someplace else later on, such as ahw.json
file.