BUG - Hubitat non sending virtual switch status correctly to Homekit and Alexa [UNCONFIRMED]

I made some testing and the problem is clearly in Hubitat.
The virtual switch state in Hubitat is not correctly updated in Homekit integration.
The problem is that Hubitat does not send always to homekit the virtual switch status.
Sometimes I switch off the virtual switch in hubitat but in homekit it is still on.

STRANGE BEHAVIOUR: To turn on a virtual switch: if I switch on, off and then on again it always update the statur correctly.
The same if I switch off, on and again off to tunr it off.

Maybe this can help hubitat support to understand the problem...

I have a similar problem in alexa with a custom virtual contact sensor with switch... it has been working correctly for more then one year and now sometimes virtual conctat status it's not updated correctly... I dont' know if the problem is the same but hope it helps.


I can't duplicate this.

I have several devices selected in HomeKit Integration. Two are:

Screenshot 2023-05-28 at 8.42.00 AM

When I look at that pseudoSwitch on my iPad in the Home app, it's reflecting the correct state. When I tap the icon to change it, the state in Hubitat's Device Info page for pseudoSwitch changes. When I click Off (or On) in Hubitat's Device Info page, the icon in the Home app changes to match.

Is this what you're expecting?

I do the same with pseudoPresence but "presence" isn't visible in the Home App.. just the switch part of the device. (This is expected, it's why there's a special Virtual Presence with Switch driver built-in.) In the Hubitat Device Info page for pseudoPresence, changes made there or in the Apple Home App are reflected correctly.

Bottom line, I can't duplicate what I think you are saying. Maybe I'm reading it wrong. :slight_smile:

1 Like

I have about 20 virtual switches exported from Hubitat to HomeKit. I cannot duplicate your findings. Some of my switches are momentary, and set to turn off after a 500 msec delay. I know even these work based on HomeKit automations being triggered.

Can I suggest the issue may not be in Hubitat?

What are you using as an Apple Home Hub? I am using an Apple TV4.

1 Like

I try to explain better...

I have created some virtual switches in hubitat anche I'm sharing them with homekit.
If I turn on or off a virtual switch in homekit it always updates correctly it's status in hubitat but if I turn it on or off in hubitat sometimes the status doesn't change correctly in Homekit.

I had the same problem with some custom virtual sensor with switch I'm using to trigger some Alexa routines...
Everything perfect till a couple of month ago and now the status is not correctly sent to Alexa.
I made some tests and I saw that the status is correctly updated 20% 30% of the time.
Now I'm running some tests and i saw that if I change the status three times it works... but it's stupid...
For instance now in a hubitat routine instead of turning on a virtual switch i turn it on, off and suddenly on.
In this way the status is correctly updated in homekit
Otherwise sometimes it wos not updated...
This is why I think the problem is in hubitat comunication to homekit.

This is what I do routinely. And it has never not worked.

Can you describe your HomeKit setup? What are you using for an Apple Home hub?

1 Like

Apple TV, last model with network cable.

1 Like

And just to confirm, you are using the built-in HomeKit integration, correct? Not one that uses Homebridge?

Did you update the Home architecture? I did not.

1 Like

Yes, homekit integration.
I don't know what you mean with Update the home architecture :slight_smile:

Just to explain better...
I don't just update virtual switch to read a status from one system to the other.
I use virtual switches to activate some real smart home switches that are not compatible with hubitat: Bticino Legrand smart home switches.
So I also need to update virtual switch status when someone press a real switch or activate it in homekit.
This is why for every switch I run 4 automations in homekit:

  1. when Virtual switch turns on - turn on real switch in homekit
  2. when virtual switch turns off - turn off real switch in homekit
  3. when real switch turns on in homekit - turn on virtual switch
  4. when real switch turns off in homekit - turn off virtual switch

in this way in homekit I always have the correct status of real and virtual switches.
I would have the same situation in hubitat because to run automations based on real switch status I need to know the correct status of the virtual switch shared by the two systems.
If I only run the first two automations everything works but it's not usable because if someone press a real switch hubitat doesn't know anymore the status of the switch tu run automations correctly.
If I run the 4 automations I have this strande situation...
Sometimes hubitat does not update the virtual switch status correctly in homekit.

Hope it's more clear...
I know it's complicated.

Thanks, I'll do it now!

Also, maybe I'm running it in the wrong way...
I mean to Have 4 automations updating the status.
Maybe there is a better way in homekit to update a switch according to another one...
If you have any suggestion I will try it.
And thank you for your tips.

Same situation.
I think the problem is having 4 automation to update both way...
But I connot figure out how to do it in a different way...

Apple hasn't been clear about the update and what it does. I read a description that pointed out the "Updating..." delay when opening the Home App occurs because each iPhone/iPad had to query each device in HomeKit for the current state. More devices, longer "Updating..." delay. The Update forces the HomeKit Hub to retain the status and each iPhone/iPad gets one response from the HomeKit Hub.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.