Node Configuration
Payload format
{
// node ID / thing name
"node_id": <node ID / thing name>,
// node configuration
"config": {
// Data model type; always "default"
"data_model": "default",
// information
"info": {
"name": <node name>,
"fw_version": <firmware version>,
"type": <node type>,
"model": <project name>
},
// list of node-level attributes (if any); same format as device attributes
"attributes": [
{
"name": <attribute name>,
"value": <attribute value>
},
// ... one entry per node-level attribute
],
// list of devices
"devices": [
{
"id": <device id>, // e.g., "Lightbulb"
"type": <device type>, // e.g., "esp.device.lightbulb"
// list of attributes for this device (if any)
"attributes": [
{
"name": <attribute name>, // e.g., "mac"
"value": <attribute value> // e.g., "xx:yy:zz:aa:bb:cc"
},
// ... one entry per attribute for this device
],
"primary": <primary parameter id>, // e.g., "Power"
// list of parameters for this device
"params": [
{
"id": <parameter id>, // e.g., "Power"
"type": <parameter type>, // e.g., "esp.param.power"
"data_type": <parameter data type>, // e.g., "bool"
// list of properties: zero or more of:
// read, write, time_series, indexed, persist
"properties": [
"read",
"write",
// ... any other properties
],
// bounds (if any)
"bounds": {
"min": <min value>,
"max": <max value>,
"step": <minimal step>
},
"ui_type": <parameter UI type> // e.g., "esp.ui.toggle"
},
// ... one entry per parameter for this device
]
},
// ... one entry per device on the node
],
// list of services
"services": [
// ... same format as "devices"
]
}
}
Notes
Keys are emitted in the order shown.
infoand the node-levelattributesarray precededevicesandservices.devicesandservicesshare one internal list; a device with the “service” flag is emitted underservices, everything else underdevices. Both arrays are always present once the node has at least one device or service.Optional keys are omitted rather than emitted as
null:type,attributes,primary,params,boundsandui_typeonly appear when set.data_typeis one of"bool","int","float","string","object","array"(or"invalid"for an unset value).propertiesreflects the parameter’s property flags.time_seriesis emitted for both plain and cumulative timeseries parameters (see Timeseries Data Collection);persistmarks parameters whose values are written back to NVS.info.modelis the build’s project name andinfo.fw_versionthe build’s firmware version when the node is created with the platform defaults.info.name,info.type,info.fw_versionandinfo.modelare also mirrored into the node’sdevicetags and are reserved tag names (see Node Tags).The whole document is hashed (SHA-256) to detect changes. The node publishes setNodeConfig only when the hash differs from the value persisted in NVS, and that same hash is what is reported as
ncfg_verin the shadows.