
Hello everybody, I'm a hobbyist and i'm working on a project with electronics IOT (ESP32) with MQTT connection. My instructions for my device (ex : turn on the lights) are stored in a database/collection, then sent by MQTT protocol to by device with a nodejs script. I just realised that there is no realtime API for SDK, what is the best solution for my server to check for updates ? So far my best solution is a get every documents every 5 secs ... I'm sure there is a more elegant solution !

It's typically not needed because you can execute a function off an event or webhook

That would only be possible if the device is publicly exposed to the Internet - which would probably not be a good idea, in this case

Thank's for your answer, webhook sounds a possible solution, it complexifies my network security but I'll look into it !
Recommended threads
- Realtime is not working!!
It shows `Session is not valid`. I am using SSR login. If if set table permission `User(Read)` then realtime can not show update. But if I set table permission...
- How to Connect Real-Time Data in Next.js...
I make a app using appwrite Server-side authentication with Next.js. How to connect real-time. I need only authenticated user can see the realtime update data....
- How to Connect Real-Time Data in Next.js...
I make a app using appwrite Server-side authentication with Next.js. How to connect real-time. I need only authenticated user can see the realtime update data.
