Virtual Switches not working with MQTT

Trying out MQTT, it's mostly working.

I have an MQTT topic that alternates between 'on' and 'off' every 10 seconds or so - I was using this to test for status while linked to a Hubitat Virtual Switch. It's not working though - occasionally (I think) it changes state but not very often and not in a timely fashion. Can I use a virtual switch as such an indicator i.e. should it's state update in Hubitat ? Maybe a switch isn't supposed to be updateable like this.

If I instead connect another Hubitat 'real' device for example a Hue bulb it works fine, turning on and off every 10 seconds. In fact I tried both at the same time and the Hue worked and updated in Dashboard but the Virtual Switch mostly didn't.

I'm using a virtual switch as that's the easiest way to integrate my main lighting system (Schneider C-Bus) so that it reflects the correct light states in Hubitat and they can be controlled from it. I'll be moving to a dimmer soon I guess.

[update] Silly recursive loop error ... all working OK.

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