So I am getting to where things are working well enough that I could hook them to Vera. And of course, it’d be lovely if I could see state on the Sq Connect app. I can now detect whether either of our cars are in the driveway, and am testing the “garage door” sensor setup for battery life. I’m doing this through Bluetooth, but have written a daemon that is running on one of my Linux servers that scans these devices (and it’s pretty easy to add more) and notes whether they’re present (or in the case of the garage doors, open/closed), and keeps track of the last time the state changed on each. In another thread, it’s listening on a TCP socket for status requests. Because this is all happening internally behind a firewall, I’m not concerned about this info leaking.
The protocol is pretty simple–on the client end, I just open a socket to the service port on that server, and send the name of the object I want state for, and it sends a response back:
0:10/04/20 14:56:31
This means status=0, last changed at 10/4/20 14:56:31
It’s not going to be hard to knock together the Luua code for this (he said, pointing gun at foot), but I am not finding any device facades in any of the stuff for Vera that has having this notion of state and timestamp of last change. Is there anything like this? I certainly didn’t see anything that I could co-opt for this in the status items for Square Connect…
The rabbit hole looms before me…
–Richard