Hi there, I’m back again
After my upgrade to openhab 2.1 my sonoff s20 switches stopped working.
I’ve been looking for the past 2 hours and giving up for tonight, did anything change regarding this?
What I have debugged so far:
When subbing to ‘#’ with mosquitto_sub, I see the device I’m looking for:
plug/tvswitch/LWT Online
plug/tvswitch/power ON
plug/tvswitch/POWER ON
plug/tvswitch/cmnd/POWER OFF
When logging from mosquitto,and manually switching the sonoff S20 (with the webinterface) I see the updates coming in:
plug/tvswitch/RESULT {"POWER":"ON"}
plug/tvswitch/POWER ON
plug/tvswitch/RESULT {"POWER":"OFF"}
plug/tvswitch/POWER OFF
-v log from mosquitto:
1499288796: mosquitto version 1.4.12 (build date Thu, 25 May 2017 22:38:16 +0100) starting
1499288796: Using default config.
1499288796: Opening ipv4 listen socket on port 1883.
1499288796: Opening ipv6 listen socket on port 1883.
1499288807: New connection from 10.0.1.3 on port 1883.
1499288807: New client connected from 10.0.1.3 as TVSwitch (c1, k15, u'DVES_USER').
1499288807: Sending CONNACK to TVSwitch (0, 0)
1499288807: Received PUBLISH from TVSwitch (d0, q0, r1, m0, 'plug/tvswitch/LWT', ... (6 bytes))
1499288807: Received PUBLISH from TVSwitch (d0, q0, r0, m0, 'plug/tvswitch/cmnd/POWER', ... (0 bytes))
1499288807: Received SUBSCRIBE from TVSwitch
1499288807: plug/tvswitch/cmnd/# (QoS 0)
1499288807: TVSwitch 0 plug/tvswitch/cmnd/#
1499288807: Sending SUBACK to TVSwitch
1499288807: Received SUBSCRIBE from TVSwitch
1499288807: plug/sonoffs/cmnd/# (QoS 0)
1499288807: TVSwitch 0 plug/sonoffs/cmnd/#
1499288807: Sending SUBACK to TVSwitch
1499288807: Received SUBSCRIBE from TVSwitch
1499288807: plug/TVSwitch/cmnd/# (QoS 0)
1499288807: TVSwitch 0 plug/TVSwitch/cmnd/#
1499288807: Sending SUBACK to TVSwitch
But the switch in my app is not updating anymore, also the basicui it’s not working, I can use the switch but no updates are getting to my musquitto
my items file:
Switch TVSwitch "Tv Stopcontact" <poweroutlet> (LR,gLight){ mqtt=">[mymqtt:plug/tvswitch/cmnd/POWER:command:*:default],<[mymqtt:plug/tvswitch/POWER:state:default]" }
When I try to use the switch from openhab basic UI and app I do see these lines in my events.log, but nothing happening on mosquitto side:
2017-07-05 23:14:48.223 [ItemCommandEvent ] - Item 'TVSwitch' received command ON
2017-07-05 23:14:48.234 [ItemStateChangedEvent ] - TVSwitch changed from OFF to ON
2017-07-05 23:14:48.861 [ItemCommandEvent ] - Item 'TVSwitch' received command OFF
2017-07-05 23:14:48.870 [ItemStateChangedEvent ] - TVSwitch changed from ON to OFF
Can anyone see something missing? I rebooted as well, and restarted mosquitto. I also tried to remove broker from userdata/mosquitto.conf (there where 2 in the file, I’m using the mymqtt)