You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One rpi 0 is a security station and it reboots. When it joins the MQTT broker, it needs to know whether or not the alarm is on in order to run piece of code accordingly.
Technically
❎ At the beginning, I was using an HTTP get request to get the status. (i.e get /alarm/status). But... That works for rpi's for instance but not for small IoT devices.
❎ I was thinking to implement something to do request/answer. A device request the status by publishing something, and a device answer to it by publishing to another topic. Well, that doesn't feel good and more importantly, I won't have many many devices restarting every hour, it's a "special" use case for some kind of devices... For instance, some device won't need some status to initialize. Installation instructions, which doesn't work...
🤔 In my django script to handle MQTT, I can have a callback on_connect, and when a new device is connected, I can publish the status. I would like to know what topic this client is following to send it only what he needs, and not all the status, but I don't find a way to do this.
⚠️ I can't target one device, so every device will get the status when a new device is connected.
The text was updated successfully, but these errors were encountered:
Use case
One rpi 0 is a security station and it reboots. When it joins the MQTT broker, it needs to know whether or not the alarm is on in order to run piece of code accordingly.
Technically
❎ At the beginning, I was using an HTTP get request to get the status. (i.e get
/alarm/status
). But... That works for rpi's for instance but not for small IoT devices.❎ I was thinking to implement something to do request/answer. A device request the status by publishing something, and a device answer to it by publishing to another topic. Well, that doesn't feel good and more importantly, I won't have many many devices restarting every hour, it's a "special" use case for some kind of devices... For instance, some device won't need some status to initialize. Installation instructions, which doesn't work...
🤔 In my django script to handle MQTT, I can have a callback
on_connect
, and when a new device is connected, I can publish the status. I would like to know what topic this client is following to send it only what he needs, and not all the status, but I don't find a way to do this.The text was updated successfully, but these errors were encountered: