Openhab und mqtt: autoassign node IDs and howto use them
-
Hello
I need some explanations concerning this setup:
Node => gateway mit mqqt client => mosquitto broker => openhab
Openhab and mosquitto are running fine. Gateway too I think.
At the moment I have 2 items: one static mqqt pub script and one mysensor module.
This can be seen in mosquitto:infrastructure/sky_state ON sensor-gw1-out/255/255/3/0/3 (null) sensor-gw1-out/255/255/3/0/3 (null) sensor-gw1-out/255/255/3/0/3 (null)The infrastructure part works and is switched in openhab. The sensor-gw1-out messages are (as far as I've understood this) are the requests from to node to get a NODE_ID
And this is the part, where I'm clueless
- how does openhab assign IDs to the nodes?
IMHO openhab does not know anything about this message format and the "wish" of the node to get an ID? - and a resulting question, IF the node ID is assigned dynamically, how does this match with the static item configuration of openhab? Or do i have to wait, until a node ID is assigned by openhab and create the item after that? :confused: are these node id static after initial assignment? Where are they stored in order to survive a node restart? Or are dynamic nodes in my setup the wrong approach and I have to use static node IDs (which would be quite annoying :D )
Thank for input ;)
- how does openhab assign IDs to the nodes?
-
:P ok thats simple :D
How to you manage your sketches? I have a git repos with the sketches i use. This means a lot of code duplication, because now i need a sketch per node ID instead per node "type"?
-
Maybe this information should be put on the webpage for the openhab? It took quite some time to find the answer