MisterWil / abodepy

A thin Python wrapper for the Abode alarm API
MIT License
49 stars 17 forks source link

Question on Listening long term #36

Closed pfielding closed 6 years ago

pfielding commented 6 years ago

Not sure if opening an Issue was the correct way to ask this question, but I didn't see a better way to ask the question. I'm assuming that using the --listen flag is what I would want to use to tie in my Home Automation system (Homeseer) to immediately react to changes in Abode state. I'm interested to know if there are any concerns, perhaps around load on the Abode servers, or other potential issues, with using this for the long haul? If I were to script something to open a listening connection to Abode, it would be 24/7/365 (and reconnect anytime a disconnect happens). Has anyone been doing this or should I avoid it?

If I should avoid it, then I'll need to see if I can find some way to have Abode trigger an external event when states change.

thanks!

Paul

MisterWil commented 6 years ago

The --listen command utilizes an open constant connection to Abode's push notification server, waiting for updates from Abode devices. This is precisely to prevent that high load from polling for updates from Abode's servers.

The equivalent of the --listen command is actively being used with the Home Assistant integration for this exact purpose, so it is entirely safe to use.

pfielding commented 6 years ago

Cool, sounds good. I was concerned that if a zillion people were keeping open connections with the Abode servers that it might cause grief. This makes it easy - many thanks!