Problems Mqtt and openhab2

Skip to first unread message

Jordi Soley

Apr 20, 2017, 7:57:38 AM4/20/17
to SonoffUsers

I have just bought an sonoff th10. I have installed the firmware from github configure the wifi and the mqtt. I have test the sonoff and mqtt recive the signals from status and sensor, but the problem is that I'm unable to switch the relay from openhab and see the temperature. 

I get this from the mqtt sever  :

  "Time" : "2017-04-20T12:55:40",
  "DHT22" : {
    "Temperature" : 17.7,
    "Humidity" : 49.1

And in openhab items i have the following lines:

Number temp "Temperatura menjador [%.1f °C]"   <temperature>   (gC_Furnace, gTemperature)   { mqtt="<[MQTT:tele/sonoffmenjador/SENSOR:state:JSONPATH($.DTH22.Temperature)]" }
Switch MenjadorI "Interuptor menjador" { mqtt=">[MQTT:cmnd/sonoffmenjador/power:command:*:default], <[MQTT:stat/sonoffmenjador/POWER:state:default]" }

Form the switch I can see that the cmnd/sonoffmenjador/power (ON/OFF) arrives to the mqtt broker but the relay don't do anithing. 

Any one know why this is not working.

Message has been deleted

Jordi Soley

Apr 20, 2017, 3:34:38 PM4/20/17
to SonoffUsers
I Have solved both problems, the first one i didn't have installed the json transformation, and the second one I had changed the sub in arduino code and I didn't remeber.

I hope that this helps some one. 

Reply all
Reply to author
0 new messages