In another topic, DoorBird Review, jens wrote:...Would you like to be able to control an action group or device when pressing open doorlock in the DoorBird app? thought to control my Yale Doorman lock...
I can't say I have the exact answer to Jens' request. But, what I did do was create an Indigo device that is a Door Open Button. Not that it was very complicated.
I created a virtual device that executes an Action that in turn executes a shell script with contains...
- Code: Select all
#! /bin/sh
/usr/bin/curl -digest -u <user_ID>:<password> http://<IP_ADDRESS>/bha-api/open-door.cgi?
Works like a charm. What it does not do, is track the state of the "door." In my case my "door" is actually a gate and I track it's state by other means and maintain a variable with the gate's state. I then use that as the state of the virtual device.
So now I can add an open the gate button to a control page. (Actually, I already had one, but it used a separate relay connected to the gate controller).
But, this for me to thinking (Pete, you reading?) Maybe the main plugin device could be instantiated as a "door" or "lock" and then operating it would send the open-door-cgi command. Since there is no known state for the "door" the default state could change momentarily to indicate the command had been sent... or better, that an ack* had been received.
*
- Code: Select all
{
"BHA": {
"RETURNCODE": "1"
}