Hello to everybody. This is my first post so please be understanding. I am new to OpenHAB and Sonoff (with Tasmota) but I have quite nice progress. After few hours I managed to flash Sonoff Basic R3 with latest Tasmota (8.5.1).
I installed external MQTT Broker (Mosquitto) on RaspberryPI 4 + I installed OH2.
I managed to define Things / Items / Channels /etc. Everything is working fine . I can control Sonoff (turn them on and off) from Control tab , from BasicUI and from simple HabPanel.
My problem is that when I power off my Sonoff (unplugged them from the wall socket) in OH2 I still can change its state.
When I am in BasicUI I can “mark” them as on (even if the device is not powered - so it cannot be on ).
As a result I cannot “trust” my BasicUI / HabPanel. I tried to google for few hours but couldn’t find a hint…
What would you like to happen when you unplug your Tasmota device?
Have a look at this post. The first topic is about openHAB knowing whether your Tasmota device is connected to your MQTT broker (basically off/on or connected/disconnected from WiFi). The second and fourth topics combine for a simple way of ensuring that openHAB Items are updated after you reconnect your Tasmota device.
If you’re using Sitemaps you can use the visibility parameter to dynamically hide controls depending on the state of an Item. So you can hide your Tasmota controls if the Tasmota device is not reachable.