Hi again guys, i have problems reading the state of my switch, i can see that works in MQTT.fx, it sends OPEN and CLOSE, but i cant get it to work in Openhab. I get this message ([WARN ] [.c.i.events.EventPublisherImpl] - given new sta te is NULL, couldn’t post update for “Switch5”.
Here is the map file
OPEN=open
CLOSED=closed
undefined=unknown
-=unknown
here are the items
/* MQTT Sensors */
Number Floor1_Temp "Floor1 Temperature 1 [%.1f �C]" <temperature> (Floor1,Temperature) {mqtt="<[mymosquitto:openhab/floor1/temperature1:state:default]"}
Number Floor1_Humidity "Floor1 Humidity 1 [%.1f %%]" <water> (Floor1,Humidity) {mqtt="<[mymosquitto:openhab/floor1/humidity1:state:default]"}
Number Floor1_Temp2 "Floor1 Temperature 2 [%.1f �C]" <temperature> (Floor1,Temperature) {mqtt="<[mymosquitto:openhab/floor1/temperature2:state:default]"}
Number Floor1_Humidity2 "Floor1 Humidity 2 [%.1f %%]" <water> (Floor1,Humidity) {mqtt="<[mymosquitto:openhab/floor1/humidity2:state:default]"}
Switch Relay1 "AC Restart relay" <garagedoor> (All) {mqtt=">[mymosquitto:openhab/floor1/relay1:command:ON:ON],>[mymosquitto:openhab/floor1/relay1:command:OFF:OFF]"}
Number Switch5 "AC Status [MAP(en.map):%s]" <garagedoor> (Sensors) {mqtt="<[mymosquitto:openhab/floor1/switch5:state:default]"}
and the sitemap
sitemap default label="Main Menu"
{
Frame label="Floor1_Temp" {
Text item=Floor1_Temp
}
Frame label="Floor1_Humidity" {
Text item=Floor1_Humidity
}
Frame label="Floor1_Temp2" {
Text item=Floor1_Temp2
}
Frame label="Floor1_Humidity2" {
Text item=Floor1_Humidity2
}
Switch item=Relay1 mappings=[OFF="OFF", ON="ON"]
Text item=Switch5
Chart item=Floor1_Temp period=D
Chart item=Floor1_Temp2 period=D
}
Thanks