I've written a script in Pythonista that allows me to arm/disarm the motion sensors on my 6 security cameras, as well as adjust sensitivity for detecting motion. It's pretty basic...it loops through my list of cameras and issues the command one at a time and then displays a result message. My cameras are located at my cabin in WV and are accessed through WildBlue satellite internet, so there is a bit of a lag when sending commands and receiving a response (~8-10 seconds for each camera). (For those unfamiliar with the nuances of satellite internet service, here's how it goes: Send command over internet, goes to Colorado where transmission station sends it 22,000 miles into space to satellite and then 22,000 miles back down to earth to the satellite dish at my cabin, hits my cabin network, executes action on camera, then repeats the trip back 22,000 miles up and back down to Colorado, and back onto the internet where it finally gets me the response. That's 88,000 miles of space travel and probably 3,500 miles on the internet.)
I'd like to create a GUI that lists each camera and then a column with a checkbox to arm/disarm each camera, and then another column with a slider bar to adjust sensitivity for that camera.
Once I get the basics done, then I'll make it a little more sophisticated with settings for Home, Away, and presence awareness (i.e. if I'm at the cabin, then turn off inside cameras), and automatically re-arm motion sensors x hours after I disable them.
In the meantime, what's the best way to construct this GUI? In Pythonista, HTML or something else?
Is there a way to "collect" several commands and submit once, rather than wait for each command to execute? With the satellite internet latency of 8-10 seconds round trip, it could take a long time to make configuration changes to several cameras one at a time.
My UI would construct the commands as follows:
and then to check/verify settings:
Is the offer still available for you to create the GUI skeleton? If so, here's a draft of how it would look
Camera Name Arm/Disarm Sensitivity
Cam 1 [switch component] [slider component]
Cam 2 [switch component] [slider component]
Cam 3 [switch component] [slider component]
Cam 4 [switch component] [slider component]
Cam 5 [switch component] [slider component]
Cam 6 [switch component] [slider component]
I'll have to do some things like query the cameras on first running the program to get current settings, and freeze a component until the setting is made and confirmed. But getting this layout will be a big help. (I'm better at the workflow logic than on the GUI)