Java Runtime Environment: which java platform is used and what version
openHAB version:3
Issue of the topic: OH3 does not appear to be trying to turn off the switch
I have been using OH2.4 for years and now just learning OH3.
I have an extensive MQTT network running on OH2.4 and enabled Autodiscovery on two devices so that OH3 could pick these up and bring them in. In addition, I created a new MQTT thing from scratch.
All of these are detected and online. Using the GUI switch in the thing/item editor, I can turn them on via a MQTT message but when I toggle the switch back to off, OH3 doesn’t do anything.
When viewing with the tail viewer I get the below entries showing OH3 acknowledging my request to turn the switch On and sending out the command.
When toggling the switch Off. There is nothing at all in the tale viewer and nothing being transmitted on the MQTT network (Verified via MQTTLens). Note using MQTTLens I can turn the device On/Off via MQTTLens.
2020-12-30 16:11:47.097 [INFO ] [openhab.event.ItemCommandEvent ] - Item ‘GenioAdaptor_Relay’ received command ON
2020-12-30 16:11:47.101 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item ‘GenioAdaptor_Relay’ predicted to become ON
2020-12-30 16:11:47.107 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘GenioAdaptor_Relay’ changed from OFF to ON
Interesting! Here’s a post from yesterday with the same issue - MQTT device won’t turn off. No idea why it’s happening - my devices seem to work fine, though I don’t use auto discovery. Not very helpful, I know!
Did you upgrade to OH3, or is this a clean install? What Java version have you got installed?
2020-12-31 12:56:29.000 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'GenericMQTTThing_Relay' received command ON
2020-12-31 12:56:29.002 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'GenericMQTTThing_Relay' predicted to become ON
2020-12-31 12:56:29.012 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'GenericMQTTThing_Relay' changed from OFF to ON
2020-12-31 12:56:37.067 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'GenericMQTTThing_Relay' received command OFF
2020-12-31 12:56:37.070 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'GenericMQTTThing_Relay' predicted to become OFF
2020-12-31 12:56:37.073 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'GenericMQTTThing_Relay' changed from ON to OFF
Maybe delete the thing and start again you cant change the channelTypeUID: after it has been created
Same here… I was struggling the whole evening, trying to switch a bulb on and off in chrome.
opened the page on my android using chrome, works like a charm.