I am trying to create a Smart Home device controlled by Google Assistant using a Raspberry Pi. I am using a service called IFTTT to handle the Google Assistant part and my idea for getting that event onto my Raspberry Pi is to use a Backendless service. IFTTT will POST a request regarding the event to my Backendless server and the my idea is that the Pi will either:
Poll the Pub/Sub system
Register for push notifications
Register a listener on a live-data object.
My Approach
As this project is going to be battery powered and my connection will be long lived (permanent if all goes well) and from some research it would seem that WebSockets are the most efficient type of connection (over Long/Short Polling) as well as offering benefits in better latency. From what I understand the Live-Data API offered by Backendless SDK makes use of WebSockets to keep objects up-to-date.
My Problem
Due to the nature of Raspberry Pi my solution is going to be written using Python and I can’t find a Backendless python implementation (not a problem, REST to the rescue); but I also can’t find anything about how to connect to a Live-Data object using the REST API.
My Plee
Any advice on how to achieve a WebSocket connection into a live-data object without using an SDK would be much appreciated. Or; if WebSockets are a bad idea in the first place, I am also happy to take suggestions on alternative approaches to receiving events from Backendless.
The other way is to use node js on Raspberry Pi, I have found some tutorial that shows how to install node Node.js and Raspberry Pi but I am not sure if it will works good enough.
One more solution. As I understand you want to use messing because you will have more than one raspberry Pi to handle one event. So you create a service on backendless that register your devices. When IFTTT will POST a request regarding the event to some other backendless service, the service takes the list of Pi devices and makes an HTTP call to each Pi device
@Marina.Kan I read through half of the documentation.
My question is rather if through this I can let Python code run and let BL server execute what I’m trying to do.