Closed luke-lewandowski closed 7 years ago
The range index is appended with an underscore.
As example: Actual MQTT messages from my heating control. The set message is from Openhab and the reply of the homie-esp8266 device:
devices/hzgctrl/Relais/in_9/set ON
devices/hzgctrl/Relais/in_9 ON
For your information, the constructor of the node is:
RelaisNode::RelaisNode() :
HomieNode("Relais", "switch16"), relais_bitset(0x0000), io(0x20) {
advertiseRange("in",1,16).settable();
}
and the resulting properties message:
devices/hzgctrl/Relais/$properties in[1-16]:settable
Hi Euphi,
It all makes sense now! Thanks.
Regards, Luke
Hey!
I'm using ranged properties (as per your SDK for homie on esp8266).
zoneNode.advertiseRange("on", 1, 3).settable(zoneOnHandler);
What would be the standard message to MQTT to send range 1 with value X? eg. devices/c40f46e0/zone/on[1]/set ??
Sorry I just couldn't find any documentation on how to handle it.
Kind regards, Luke