Homebridge and Virtual Devices
Homebridge and Virtual Devices
Hello,
I have set up a virtual device which is basically On/Off that triggers an action group per state.
If I control via Indigo, On fires one Action Group and Off fires the other as expected.
If i then add this Virtual Device to HomeKit, when turn it on, it fires the on Action group but when in turn it off, nothing happens. It turns off in homkit but not Indigo and does not execute the action group. The indigo log confirms this, no Off command was sent to Indigo.
Any ideas?
I have set up a virtual device which is basically On/Off that triggers an action group per state.
If I control via Indigo, On fires one Action Group and Off fires the other as expected.
If i then add this Virtual Device to HomeKit, when turn it on, it fires the on Action group but when in turn it off, nothing happens. It turns off in homkit but not Indigo and does not execute the action group. The indigo log confirms this, no Off command was sent to Indigo.
Any ideas?
- FlyingDiver
- Posts: 7830
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Re: Homebridge and Virtual Devices
I ran into this with some virtual devices I created. HomeKit requires that it get the correct state for the device. You need to set up a variable to hold that state, identify it in the Virtual Device config, and add actions to the action groups to change that state variable.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
- jay (support)
- Site Admin
- Posts: 19232
- Joined: Wed Mar 19, 2008 11:52 am
- Location: Austin, Texas
- Contact:
Re: Homebridge and Virtual Devices
Or use the Set Virtual On/Off Device State action in your existing action groups to update it's status to on or off. You don't have to use a variable (just set it directly).FlyingDiver wrote:I ran into this with some virtual devices I created. HomeKit requires that it get the correct state for the device. You need to set up a variable to hold that state, identify it in the Virtual Device config, and add actions to the action groups to change that state variable.
- FlyingDiver
- Posts: 7830
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Re: Homebridge and Virtual Devices
Learn something new every day.jay (support) wrote: Or use the Set Virtual On/Off Device State action in your existing action groups to update it's status to on or off. You don't have to use a variable (just set it directly).
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
- jay (support)
- Site Admin
- Posts: 19232
- Joined: Wed Mar 19, 2008 11:52 am
- Location: Austin, Texas
- Contact:
Re: Homebridge and Virtual Devices
Yeah - as I was writing that, it occurred to me that you might not know about that action. It's the pattern I'd use on any thin "shim" device that don't have any built-in commands to modify the device (like a sensor): create specific actions to update the known properties/states.FlyingDiver wrote:Learn something new every day.
Re: Homebridge and Virtual Devices
Jay, do you still need to bind the Virtual Device to a variable when using the direct method above? It seems like I need to in any case if I want the device's status monitored.
Incidentally, the device is working in this case, but I'm not seeing the variable update in the variable list window.
Incidentally, the device is working in this case, but I'm not seeing the variable update in the variable list window.
- jay (support)
- Site Admin
- Posts: 19232
- Joined: Wed Mar 19, 2008 11:52 am
- Location: Austin, Texas
- Contact:
Re: Homebridge and Virtual Devices
No. This will directly alter the device's state without a variable (we added it explicitly so that you didn't have to use a variable, which was a frequent request).tcherna wrote:Jay, do you still need to bind the Virtual Device to a variable when using the direct method above?
Re: Homebridge and Virtual Devices
So how do I create the virtual device without creating a variable and still have it report status. When I click the status checkbox it forces a variable.
See my post in viewtopic.php?p=183673#p183673 for what I've actually attempted.
Thanks
See my post in viewtopic.php?p=183673#p183673 for what I've actually attempted.
Thanks
- jay (support)
- Site Admin
- Posts: 19232
- Joined: Wed Mar 19, 2008 11:52 am
- Location: Austin, Texas
- Contact:
Re: Homebridge and Virtual Devices
You don't need to check the status checkbox.
Re: Homebridge and Virtual Devices
Ah, ok it's working. Not sure what I did differently (this time I unchecked and deleted the variable). Thanks Jay!