[RELEASE] Homebridge Hubitat v2.0

I hate to say this but I think I am getting it too.. As a test I just added my "heartbeat" virtual switch which I toggle on/off every 15 seconds from Node-RED. I can see it working on the device page but after it turns on in Accessories it does not go off. In fact I just tried to turn off my back porch light from HE and it was not responsive in HB! It's weird - turning on things seems to perk things up. Not sure what is going on... mmmm.. I am running this in a child instance - this is my C-7 hub. Will add one for my C-5 & C-4 as well..

Okay so what is weirder - I added the virtual heartbeat switch for my C-5 as well. Got the same behavior. Decided to remove all devices from the HB instances. I did that and restarted HB and noticed the switch events both on and off were still firing... went ahead and rebooted the server and it is still showing the events even though they are no longer in accessories..

[3/9/2021, 10:30:48 pm] [Hubitat-C7] INFO: [Device Event]: (__vCheck) [SWITCH] is off
[3/9/2021, 10:30:48 pm] [Hubitat-C5] INFO: [Device Event]: (__vCheck) [SWITCH] is off
[3/9/2021, 10:31:03 pm] [Hubitat-C5] INFO: [Device Event]: (__vCheck) [SWITCH] is on
[3/9/2021, 10:31:03 pm] [Hubitat-C7] INFO: [Device Event]: (__vCheck) [SWITCH] is on
[3/9/2021, 10:31:18 pm] [Hubitat-C7] INFO: [Device Event]: (__vCheck) [SWITCH] is off
[3/9/2021, 10:31:18 pm] [Hubitat-C5] INFO: [Device Event]: (__vCheck) [SWITCH] is off
[3/9/2021, 10:31:33 pm] [Hubitat-C7] INFO: [Device Event]: (__vCheck) [SWITCH] is on
[3/9/2021, 10:31:33 pm] [Hubitat-C5] INFO: [Device Event]: (__vCheck) [SWITCH] is on
[3/9/2021, 10:31:48 pm] [Hubitat-C7] INFO: [Device Event]: (__vCheck) [SWITCH] is off
[3/9/2021, 10:31:48 pm] [Hubitat-C5] INFO: [Device Event]: (__vCheck) [SWITCH] is off

Is the HE websocket holding on to this for some reason? I could try rebooting the HE hubs to see if that makes a difference.

Okay one more post sorry - I disabled the HBv2 apps on all the hubs and restarted HomeBridge.

Got this message for each hub in HB which was expected:

sendUpdateStatus Connection failure | Message: Request failed with status code 500

but the same switch events (see above post) are still showing up. Am I missing something obvious here?

I have never used this app/integration before, but since the switches seem to be toggling each other could this be a mesh issue?

No because this particular switch is a virtual switch and lives exclusively on the HE hub - no Z-Wave or Zigbee required :wink: :.

I toggle it on/off every 15 seconds using Node-RED in order to test if things are still okay with the hub and send an alert and reboot if not.

It seems like there is some odd communication thing happening between Homebridge and HE - a websocket issue maybe? Wonder if virtual devices are spammy or have a slightly different format? I dunno..

I also tested with the HB Maker app and it seems to be working okay with the same virtual switch device.. toggles appropriately.

@jk12 @kharrison, If you don't mind losing any automations you have setup in HomeKit you can always try deleting all the files in the persist and accessories directories within HomeBridge. This will basically reset HomeBridge so you will have to re-add your bridges and recreate any Homekit automations you have,

I’ve noticed a delay in devices syncing in HB. If I close and reopen the Home app, it’s synced.

1 Like

@Vettester thanks for that suggestion but I have too many (50) HomeKit automations that contain homebridge accessories ... recreating all those is a non-starter.

I applied the new HB update (1.3.3) just now and tested, but it didn’t change anything. HB logs still indicate an off event was received but the accessory remains on until I refresh the accessory page.

I’m having issues with virtual switches as well.

Using HE to turn a virtual switch on will immediately turn it on in both HE and HB, but when turning it off in HE, it will not turn off in HB unless I refresh the page.

When using HB to turn it on, it will immediately turn the switch on in both HB and HE, but turning it off in HB takes about 2-3 seconds to update the status to off in both HB and HE.

I’m using the latest versions, HB is on v1.3.3 and the Homebridge v2 plugin is on v2.4.1

I tried the same test using the Homebridge Hubitat Makerapi plugin and it is working as expected with immediate updates in both HB and HE.

1 Like

@tonesto7 - Several days ago, I started having issues with a Hubitat "Virtual Switch" which I made available to Homebridge using "homebridge-hubitat-tonesto7". I finally discovered that when the virtual switch is turned on in Hubitat, it successfully turns on in Homebridge, but when I turn the same virtual switch off in Hubitat, it does NOT turn off in Homebridge.

I made sure your app was updated to the latest version in both Hubitat and Homebridge (v2.4.1), but the issue persisted. Then in Homebridge, I installed a previous version of your app (v2.3.3) and the issue went away. I then upgraded the plugin on Homebridge to v2.4.0 and the issue returned. While doing this, I also discovered something interesting which may help you fix this.
When I turn the "Virtual Switch" off in Hubitat, the "Status" page on Homebridge shows an entry that the switch was turned off, even though the switch is not actually off in Homebridge. But as soon as I click on "Accessories" at the top of Homebridge to look at my devices, the "Virtual Switch" updates itself and actually turns off.

Thank you for all the hard work you put into creating and maintaining this app. It is greatly appreciated and I look forward to your next update.

1 Like

Guys I highly recommend a HomeKit app named controller. It will allow you to do full backup and restore of your HomeKit setup

5 Likes

Backup functionality is included with Homebridge's Config-ui-x interface.

2 Likes

You can actually click on the plugins page > Click the wrench on the Homebridge-Hubitat-tonesto7 plugin and install previous version of plugin

Controller does so much more. It’s allows you to restore individual items etc.

2 Likes

Reverted to 2.3.3 and tiles are now working. Since that's the only change I made it would seem there's a bug somewhere after 2.3.3.

Thank you...

1 Like

I’m also seeing some strangeness. I’ve noticed that things turned on outside of the home app will immediately show as turned on in Home, but when things are turned off it still shows as on until the devices are refreshed. @tonesto7 are you not seeing this behavior? I’m on the latest version of both the plugin and Homebridge. I see all of the on and off commands in the Homebridge logs.

1 Like

I’m seeing this behavior as well. If I refresh the Home app it then shows the correct state. I don’t know what is causing the problem though.

1 Like

Try reverting to 2.3.3

2 Likes

That seems to have fixed it. Thanks :+1:t2:

Someone else pointed that out and worked for me too. Looks like we need some bug spray.