Hi,
I am very new to openhab. I do have some problems with the state of a switch. My switch works a bit different to others. When I publish “home/dev1/output/rel0/set_off_ms 100” the light switches on and therefore I get the state message “home/dev1/input/in0 ON” when I publish the next message with “home/dev1/output/rel0/set_off_ms 100” the light switches off and therefore I get “home/dev1/input/in0 OFF”
light on:
openhab2 pub: home/dev1/output/rel0/set_off_ms 100
openhab2 should sub: home/dev1/input/in0 ON
light off:
openhab2 pub: home/dev1/output/rel0/set_off_ms 100
openhab2 should sub: home/dev1/input/in0 OFF
So the light works. But the state does not work as expected. So the light bulb stays always yellow in the UI. And also if I publish the set_off_ms … message over an other client (mossquitto_sub …) also the switch state in the UI does not change.
I think I am missing anything or I do not exactly know how that works.
Group Home "home" <house>
Group Bedroom "Bedroom" <bedroom> (Home)
Switch Bedroom_Light "Light" <light> (Bedroom, gLight) {mqtt=">[mosquitto:home/dev1/output/rel0/set_off_ms:command:*:100], <[mosquitto:home/dev1/in0:state:default]"}
Group:Switch:OR(ON, OFF) gLight "Light" <light> (Home)
sitemap home label="home" {
Frame {
Group item=Bedroom
}
Frame {
Text label="Light" icon="light" {
Default item=Bedroom_Light label="Bedroom"
}
}
}
I hope someone can help me here.
many thanks