how to ask a node to re-send presentation info
-
Hi everyone,
apologies if this has been discussed before (I'm almost certain it must have), but I can't seem to find the answer in the forum...
I have a mqtt-gateway setup and would like to send a command via mqtt to a node (ideally a broadcast to all nodes) to re-issue it's startup-presentation info (incl. child-sensor-id's and types).
Thanks!
-
If it's an awake node, you can send I_PRESENT to it.
-
If you have a sleeping node will it respond when it awakes?
-
No, not unless you buffer these messages on the controller side and send when it wakes up (see smart sleep).
-
@hek thanks for the quick reply - would that be the internal command id 19 that controller/gateway needs to send to the node?
-
Yes
-
o.k., thanks! - and is there a way to broadcast this to all nodes or would I have to send it individually to every node?
-
@jjk Send a C_INTERNAL|I_DISCOVER_REQUEST to the broadcast address (i.e. 255) - all active (=non-sleeping) nodes will reply with I_DISCOVER_RESPONSE and the parent ID as payload. As a second step, iterate over the replies and send C_INTERNAL|I_PRESENTATION to re-request the presentation messages.
-
thanks, it works - in principle! I'm using smartSleep in my sketches and that causes the nodes to send heartbeat signals, which is o.k. But can it be, that the request for presentation is only received and responded to by the nodes when the node has sent a heartbeat? When I receive a regular sensor reading and fire back a presentation request, the node doesn't seem to care...?!