@wutu @V1per
onMessage and offMessage work fine. Device will respond to changing the state in Pimatic. If I use the button on the Sonoff it toggles state and sends a message. The answer in the message is ON or OFF with capitals.
Here’s output from mosquitto on the broker:
pi@raspberrypi-pim:~ $ mosquitto_sub -d -t "stat/sonoff_vw/POWER"
Client mosqsub/935-raspberrypi sending CONNECT
Client mosqsub/935-raspberrypi received CONNACK
Client mosqsub/935-raspberrypi sending SUBSCRIBE (Mid: 1, Topic: stat/sonoff_vw/POWER, QoS: 0)
Client mosqsub/935-raspberrypi received SUBACK
Subscribed (mid: 1): 0
Client mosqsub/935-raspberrypi received PUBLISH (d0, q0, r0, m0, 'stat/sonoff_vw/POWER', ... (2 bytes))
ON
Client mosqsub/935-raspberrypi received PUBLISH (d0, q0, r0, m0, 'stat/sonoff_vw/POWER', ... (3 bytes))
OFF
Client mosqsub/935-raspberrypi received PUBLISH (d0, q0, r0, m0, 'stat/sonoff_vw/POWER', ... (2 bytes))
ON
Client mosqsub/935-raspberrypi received PUBLISH (d0, q0, r0, m0, 'stat/sonoff_vw/POWER', ... (3 bytes))
OFF
Client mosqsub/935-raspberrypi received PUBLISH (d0, q0, r0, m0, 'stat/sonoff_vw/POWER', ... (2 bytes))
ON
Client mosqsub/935-raspberrypi received PUBLISH (d0, q0, r0, m0, 'stat/sonoff_vw/POWER', ... (3 bytes))
OFF
```
Looks like the plugin doesn't pickup the state topic correctly. Any idea how to solve this?