I have a house panel that fires through Maker API when a button is clicked and flick a virtual switch in Hubitat. Two virtual switches seem to be doing something very, very strange; when I click them, they don't really turn "on". What I mean is, the switches log the "on" event but, they are not reporting as being on. Here's a sample log of one switch:
You can see where the switch wasn't reported to us as being on so we hit it again and it came on. I thought it strange that I could flick the switch on twice in a row so I decided to experiment and went directly to the switch in Hubitat and flicked it on, then clicked on again and it didn't create two log entries for that, just the one as I would expect. I just cannot figure out how there would be two log entries for "on", one after the other if the switch is truly on plus the switch does not report or show as being on in Maker API nor in Hubitat. Anybody else seen this behavior?
Here is another sample from another virtual switch that did the same thing:
I am not able to replicate this behavior. By this, I mean that under "Current States," the value of the "switch" attribute changes to "on" or "off" more or less immediately in response to the "On" or "Off" commands (buttons), and the "Event History" page matches what I see, with no successive "on" or "off" events being possible without a different switch value in between.
One question: what driver are you using? Make sure it's "Virtual Switch" (or a similar one that you created or found for this specific purpose). A "real" Zigbee or Z-Wave switch driver will not work for this.
Yes, I have many virtual switches and these ones seem to be the only ones doing this for some reason (I think). They are the most used virtual switches I have so maybe others are doing it and I just don't know it because of their infrequent use.
Yes, just the simple virtual switch driver. Nothing fancy:
I am able to replicate the issue at-will now. I click a button on that sends the command with Maker API to turn the switch on, I watch it turn on in Hubitat. I turn it off in Hubitat, but it doesn't really turn off at all. Maker API says it is still on and if I refresh the virtual switch device page in Hubitat it will show as being on still....
Here is what I am doing to replicate what I am seeing; go to a virtual switch in Hubitat Devices. Go to Maker API where virtual switch is checked and providing an API and get All Devices with Full Details and leave that page open (I have that open in a different instance of the browser to make it easier).
Then, I simply turn the virtual switch on, refresh the API browser window, it will usually behave. Go back and turn the virtual switch off, refresh the API browser window. Usually, after 2 or 3 times, the API browser window will not reflect what the virtual switch status says and if I refresh the virtual device page it will reflect what API browser window says...it's like it "gets" the switch click and but it doesn't really get it and updates the status on the screen but doesn't hold it or something....