Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup IoT status via MQTT message #18

Closed
mxmaxime opened this issue Jul 22, 2020 · 1 comment
Closed

Setup IoT status via MQTT message #18

mxmaxime opened this issue Jul 22, 2020 · 1 comment
Assignees
Labels
enhancement Improve internal stuffs
Projects
Milestone

Comments

@mxmaxime
Copy link
Collaborator

mxmaxime commented Jul 22, 2020

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.

⚠️ I can't target one device, so every device will get the status when a new device is connected.

@mxmaxime mxmaxime added the enhancement Improve internal stuffs label Jul 22, 2020
@mxmaxime mxmaxime added this to the First release milestone Jul 22, 2020
@mxmaxime mxmaxime self-assigned this Jul 22, 2020
@mxmaxime mxmaxime added this to To do in v0.1.0 via automation Jul 22, 2020
@mxmaxime
Copy link
Collaborator Author

Done by #23

v0.1.0 automation moved this from To do to Done Jul 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improve internal stuffs
Projects
No open projects
v0.1.0
  
Done
Development

No branches or pull requests

1 participant