I am working on an IOT application. For which I am using appwrite for server less features. Where I have to update information in a raspberry pi (python) in realtime as they change on the appwrite database. Here I have option to pool the appwrite database at a certain interval of time, but that may be request heavy. Is there any other alternative.
Summary
The user is asking for a realtime alternative for Python that can update information on a Raspberry Pi in realtime. Some suggestions mentioned include using webhooks, creating a secondary service with ngrok, setting up an endpoint on the Raspberry Pi and calling it from a cloud function triggered by an event, and using JavaScript with a local web server. The solution suggested is to set up a web server on the Raspberry Pi to handle events and use an Appwrite webhook to send the data to the Raspberry Pi. Another suggestion is to use JavaScript with Appwrite functions and events.
The problem with javascript is that, I will have to set up the local web server and keep the browser always open. As even for javascript server side doesn't support realtime.
fadkeabhi
Rank 1: Thread
Sep 1, 2023, 01:15
Will try this method, Thank you for the suggestion
fadkeabhi
Rank 1: Thread
Sep 1, 2023, 01:16
Tried but how to send data to pi is the question.
Guille
Sep 1, 2023, 01:31
Will you raspi have a static ip?
Guille
Sep 1, 2023, 01:33
I was thinking that maybe you can create and endpoint in your raspi and call it from a cloud function triggered from a event 🤔
fadkeabhi
Rank 1: Thread
Sep 1, 2023, 13:08
I don't think that it will have static IP.
fadkeabhi
Rank 1: Thread
Sep 1, 2023, 13:11
I also thought of using ngrock. But it's free plan changes the domain name of our endpoint.
Guille
Sep 1, 2023, 13:19
That would be a painless option, the solution at the moment will always have a secondary service to communicate with the IOT device
fadkeabhi
Rank 1: Thread
Sep 1, 2023, 13:26
Ya I think the same way. Will create an secondary service, make it available through ngrock and will set an webhook to that link.
Guille
Sep 1, 2023, 13:29
It would make things easier for you
Guille
Sep 1, 2023, 13:29
Would be great to have a solution from appwrite side