Sitemap sonoff state not changing when switched manually

Hi! currently I have set up my sonoff and it is working ok.

The problem is when I switch on or off my sonoff manually (offline) the sitemap isn’t changing.

When i click it from the computer it works perfectly but the sitemap doesn’t update while doing it manually from the switch button.

Thanks!

Had this too. Did you reload the UI after you pressed the hardware button?

if the answer is yes please post your item configurations

1 Like

The button on the UI remained turned off even if it is turned on after multiple refreshes.

I was hoping the UI to update the state automatically whenever the button is pressed manually.

I had similar issues until I upgraded to the latest version of openhab and that seemed to fix it.

Hello!

Have you checked if you’re using right topics? I’ve had the same problem and found out that topics slightly differ from the examples found online. The easiest way would be using mosquitto_sub.exe to monitor which topics are being used, and adjust your items configuration to these topics.

Best regards,
Davor

had that once, clearing my cache solved it. Not sure if that will work for you but worth a try

Hi guys! can you share your home.items and home.sitemap files please :slight_smile: maybe I missed out on something

Hello!

My Sonoff Touch (with Tasmota firmware) item has the following cofiguration:

Switch Lights_Switch_Lobby_MainLight_Value "Lobby" <light> (Lights_Switch_MainLight_Value) {mqtt=">[mosquittoserver:cmnd/SonoffTouchLobby/POWER:command:*:default], <[mosquittoserver:tasmota/SonoffTouchLobby/stat/POWER:state:default]"}

Sitemap entry is just a switch, connected to the item in question:

Switch item=Lights_Switch_Lobby_MainLight_Value

Could you try using mosquitto_sub.exe and post topics that are shown in it, both, while switching it via OpenHAB UI and via hardware switch?

Best regards,
Davor

@patmag do you really have your NAS on a Sonoff that could be switched off easily by a misguided tap of the finger?

Thanks adding this line <[mosquittoserver:tasmota/SonoffTouchLobby/stat/POWER:state:default]"} to the home.items file solved the problem