Hi all looking for some help, i have set up esp with espeasy and have it linked up so one of the GPIO pins can monitor weather there is power or not basically like a switch however i wont need to control this as a switch i just need the state of the GPIO pin / switch. my problem is i cant get Openhab to see what state the switch is in over MQTT. espeasy looks to have linked the my broker and is sending the information but nothings happening in openhab. i am use code that i have used for my sonoff switch and am not sure if that what i am doing wrong.
this is the log from openhab
2018-03-11 12:33:38.767 [WARN ] [b.core.events.EventPublisherDelegate] - given new state is NULL, couldn't post update for 'F2_Fire_1'
In my example the first parameter is the node name and the declaration how to format the string sent in mqtt can be found in the ESPEasy under menu Tools/Advanced:
hello thank you for your reply, have tried what you have said and still no luck. am not sure if its the way ESPeasy is sending 1 and 0 as values instead of ON and OFF.
the problem i have is i am using the above declaration but i do not think am using it in the right way. i want this to be more of a sensor then a switch and just let me know if there is power going to the connected GPIO pin on the wemos.