Homebridge and Virtual Devices

Posted on
Wed Aug 07, 2019 8:40 am
AndyVirus offline
Posts: 257
Joined: Mar 18, 2014
Location: Newport Pagnell, UK

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?

Posted on
Wed Aug 07, 2019 9:18 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
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

Posted on
Wed Aug 07, 2019 10:56 am
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Homebridge and Virtual Devices

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.


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).

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Wed Aug 07, 2019 11:01 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Homebridge and Virtual Devices

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).


Learn something new every day. ;)

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Wed Aug 07, 2019 11:12 am
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Homebridge and Virtual Devices

FlyingDiver wrote:
Learn something new every day. ;)


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.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sat Oct 26, 2019 5:58 am
tcherna offline
Posts: 24
Joined: Apr 14, 2018

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.

Posted on
Sat Oct 26, 2019 10:47 am
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Homebridge and Virtual Devices

tcherna wrote:
Jay, do you still need to bind the Virtual Device to a variable when using the direct method above?


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).

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sat Oct 26, 2019 11:36 am
tcherna offline
Posts: 24
Joined: Apr 14, 2018

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 :)

Posted on
Sat Oct 26, 2019 3:31 pm
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Homebridge and Virtual Devices

You don't need to check the status checkbox.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sat Oct 26, 2019 3:39 pm
tcherna offline
Posts: 24
Joined: Apr 14, 2018

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!

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests