I've been using Virtual Switch uDTH Lite as a contact sensor. I was trouble shooting yesterday morning, then gave up and forgot about it until I saw this post. I use a ZigBee 2 button device to control wifi bulbs in one of the rooms.
I just went and checked and it works better now, but still not perfect like it used to be. Now the routine responds 50% of the time going "off". The "on" routine still works 100% of the time though.
Thanks so much! You really saved the day. Not only did you fix my problem, I can dump the driver and simply use the native virtual contact sensor for all my routines!
Thanks, i'll probably wait and see if the situation fixes itself in Alexa with what I'm currently using. Like I mentioned before, Alexa sees the state changing just fine, the virtual device goes on and off like I expect in the Alexa app, it's just not kicking off the routine when it goes off, just on.
It's mostly me just being lazy, because I don't want to create additional routines/logic. Unless there is a shortcut to what I'm doing now. Right now the benefit of the driver i'm using is that in addition to appearing as a contact, i can set it to be of type "Light" in alexa. So it's in the "Guest Room" group as a light. And when I say "Alexa turn on lights" it actually turns on the virtual contact sensor in addition to the wifi bulbs and it keeps the virtual switch in Sync with the wifi bulbs, which in turn keeps my physical button switch in sync.
It's also just an issue in the guest bedroom which doesn't get used much, so it wasn't a high priority on my side. Although, i'm interested in what methods other people use to keep things in sync. The only other thing i could think of was to create more alexa routines or maybe installing Echo Speaks.
I also kind of wonder if it has anything to do with my c8 being updated to 2.3.5.131, because that's the only thing that I think really changed. But since the state reflects correctly in the alexa app, i'm assuming it's more likely an issue on their side.
Well, a simple test is giving me random results. Sometimes it works as expected. Other times the routine doesn't get triggered when the contact closes (switch goes off). It seems possible that Alexa no longer puts up with a device having both contact and switch capabilities. If that's the explanation, then using pure Virtual Sensor takes care of it, but loses the convenience of thinking about on/off on the Hubitat. Actually, there's another inconvenience .. you can't have Alexa "turn on or off" the virtual contact sensor which is what I usually do to ack the signal from HE that message has been received.
I should have looked here first. I've been using a Virtual Contact Sensor with Switch for several years. I started having trouble a few days ago and have been spending all morning digging in to try to troubleshoot
Not sure if I can resolve it with just a virtual contact sensor, but at least I'm not going crazy.
So what I did was I changed any Simulated Alexa switches into a simple virtual contact. You can hit the button in the device page to Open/Close the sensor, which calls Alexa much more reliably. Then I use the sensor in Rule Machine by using "Run Custom Action" on the contact sensor. Simply select Open or Close with no parameters. Calls Alexa very fast. If you want to voice control the sensor with Alexa create a virtual switch and add to the Alexa Skill. Then create a rule to check for switch state change and set sensor accordingly. The one caveat is HE & your Alexa device can get out synch if a user interacts with device in Alexa directly . To get around that I just created a Rule to turn off my sensor & alexa device periodically. That happened w/ the simulated Alexa switch too. If you know groovy this could be handled w/ a custom app. But for non coders without a massive set of rules this method works well. Good luck.
Yes, that is the solution many of us have been suggesting for years. But there is evidence from data points in this thread that this technique isn't reliable any more. My guess (as yet unproven) is that Alexa now gets confused when a switch and a contact (or motion) are combined.
The solution proposed in this thread is to use a virtual contact without switch capability. This seems to be 100% reliable. The problem with this approach is that communication is one way - Hubitat to Alexa. You can't have Alexa in the same routine change the virtual device to tell Hubitat "message received" like you could with a contact (or motion) combined with switch. If communication back is required, there may need to be an accompanying switch.
Yes, this is what I did and it works well. I can still pass the switch to Homebridge and use the Home app (mainly on my watch) to control the WiFi device. A bit more of a pain, but at least the Off function is reliable this way.
If anyone confirms that the Contact Sensor with Switch method is fixed for use with Alexa, please let us know.
Just an update that this issue continues. I noticed that a wi-fi plug device that I'd previously controlled via stephack's virtual contact with switch was very unreliable now. Replacing it with a virtual contact resolved the problem.
Wild speculation here, but it almost seems like if Alexa sees a device where switch turned on and contact open in the same device, it randomly processes it as a switch coming on, in which case it cannot trigger a routine. Weird that this worked for years and then broke.
Many thanks to the group for identifying a fix to this problem which has plagued me for months. Switching my device from Virtual Contact Sensor with Switch to just Virtual Contact Sensor has fixed my problem. However, my previous icon on my HE dashboard which previously would turn this virtual switch on and off no longer works, so I changed the tile template to be a virtual contact to match the device change. However, on the dashboard, this tile now just shows red or green whether the contact is open or closed with no ability to actually change the status from the dashboard like I could with a switch. Any easy workarounds?