Hello,
I’m new to OpenHab.
I’m using a Sonoff TH16 with a AM2301 sensor (temperature and humidity sensor). I can actuate in a light, yet I can’t present the temperature and humidity values in the basicUI.
I configure the items as:
Number StorageRoom_Humidity “Humidade” (StorageRoom, gHumidity) {mqtt="<[broker:tele/TempDisp/SENSOR:state:JSONPATH($.AM2301.Humidity)]", autoupdate=“true”}
Number StorageRoom_Temperature “Temperatura” (StorageRoom, gTemperature) {mqtt="<[broker:tele/TempDisp/SENSOR:state:JSONPATH($.AM2301.Temperature)]", autoupdate=“true”}
In the sitemap i did this:
Group item=StorageRoom label=“Despensa” icon=“suitcase” {
Frame {
Switch item=StorageRoom_Light label=“Acender Luz” icon=“light”
}
Frame {
Switch item=StorageRoom_Fan label=“Ligar Ventoinha” icon=“fan_ceiling”
Text item=none label="" icon=“none”
Text item=StorageRoom_Temperature label=“Temperatura [%.1f ºC]” icon=“temperature”
Text item=StorageRoom_Humidity label=“Humidade [%.1f %%]” icon=“humidity”
}
}
In the BasicUI appears like this:
To know the OpenHab was connecting with the sonoff, I’m following the exchange of messages. So, as you can see the messages are being exchanged:
tasmota/tele/sonoff/SENSOR {“Time”:“2018-08-28T01:05:36”,“AM2301”:{“Temperature”:28.6,“Humidity”:53.1},“TempUnit”:“C”}
tasmota/sonoff-A00EEA/tele/STATE {“Time”:“2018-08-28T01:10:13”,“Uptime”:“0T06:15:16”,“Vcc”:3.158,“POWER1”:“OFF”,“Wifi”:{“AP”:xx,“SSId”:“xxxx”,“RSSI”:xxx,“APMac”:“xxxxxx”}}
tasmota/sonoff-A00EEA/tele/SENSOR {“Time”:“2018-08-28T01:10:13”,“Switch1”:“ON”}
tasmota/tele/sonoff/STATE {“Time”:“2018-08-28T01:10:43”,“Uptime”:“0T00:15:36”,“Vcc”:3.186,“POWER”:“OFF”,“Wifi”:{“AP”:xx,“SSId”:“xxxx”,“RSSI”:xxx,“APMac”:“xxxxxxx”}}
tasmota/tele/sonoff/SENSOR {“Time”:“2018-08-28T01:10:43”,“AM2301”:{“Temperature”:28.6,“Humidity”:53.0},“TempUnit”:“C”}
I do not know what I’m doing wrong. Can you support me?
Thank you