Sonoff will publish always the same state if is triggered. that means a MQTT command or pressing the button on the sonoff will always publish the same state.
So i am afraid there is no way to do it like this, but in OpenHab you could have a proxy item (= an item without channel) that then publishes a MQTT command to the sonoff. So if sonoff switches on without this item being set to on => somebody triggered the sonof remotely.
Otherwise sonoff is triggered by openhab:
Switch SonoffProxy
rule "Switch Sonoff from OH"
when
item SonoffProxy changed from OFF to ON
then
MyRealSonoffItem.sendCommand(ON)
logInfo("sonoff rule", "sonoff triggered from OH")
end
So if I understand it right, there is no way (without using a proxy item) to reflect on an openHAB sitemap a change to an item that occurred when a physical button was pressed?
I mean, I want my Basic UI switch item to show as ON when my wife switched the light by using the light switch and not the app. Is that possible?
Thanks!
I am SUPER new to this and with very little tech background.
Was struggling with codes and such; searching for conig files ( I am on OpenHAB 2.4 LOL)
Your post sorted it out for me;Sonoff Tasmota running like it should…a Charm!
getting this error with my setup not sure whats wrong it reading but not getting temp in
2019-01-20 15:39:53.111 [WARN ] [eneric.internal.generic.ChannelState] - Incoming payload ‘{“Time”:“2019-01-20T16:39:53”,“DS18B20”:{“Temperature”:17.9},“TempUnit”:“C”}’ not supported by type ‘NumberValue’
@Sascha_Billian Not like it matters but there should be an opening square bracket [ after the > and before mosquitto I think. I tried to compare your before and after items entry with mine and spotted that little difference.
Hi there, i am trying to Setup my new Installation with mqtt2.4, till now i just used the old one with textual config and worked fine. I used map Transformation to transform 1 to on and 0 to off on the Incoming value and now i dont know how to do this in paper ui. is it even possible?
Always get the following error: Command '0' not supported by type 'OnOffValue': No enum constant org.eclipse.smarthome.core.library.types.OnOffType.0