Closed MPParsley closed 7 years ago
Not sure what you mean here.. It is up to your controller to hand out ids. Works exactly the same over MQTT as the MySensors protocol.
Handing out the ID is indeed up to the controller but the documentation is somewhat unclear on this.
According to this documentation Auto ID is not supported through MQTT:
NOTE: No controller supports dynamic ID assignment through MQTT. All nodes must have MY_NODE_ID defined in the sketch to work with MQTT. If you don't set MY_NODE_ID, nodes will complain with the message "!TSM:ID:FAIL".
Yet, the documentation here states that "node ID generation" & "MQTT gateway" are supported by these controllers:
So as it is supported by these controllers I assumed some code would be needed on the Mysensors side for MQTT?
Closing this as it seems to be implemented on the MySensors side.
FYI: I tested this with mycontroller and as of the latest (build) version it supports auto node id generation with MQTT.
Can you please state how you tested this, as I'm looking at the code, I see no logic for storing or giving out of client ID in the MQTT examples or MQTT transport code.
Thanks
Hi @trlafleur,
In the node sketch I put #define MY_NODE_ID AUTO
.
Note that you'll need to build the latest version of MyController (https://github.com/mycontroller-org/mycontroller) or you'll have to ask its maintainer to create a new release.
A SNAPSHOT version is available here: http://forum.mycontroller.org/topic/58/download-snapshot-build
When using several hundred nodes that can be relocated it would be nice to automatically assign a new node id whenever a node is powered on in the network.