Hello everyone,
my items file has a switch
Switch sHallway_en <dimmablelight> (gHallway, gLights) { mqtt=">[mosquitto:/sonoff_hallway/gpio/12:command:ON:1], >[mosquitto:/sonoff_hallway/gpio/12:command:OFF:0], <[mosquitto:/sonoff_hallway/button/state:state:MAP(onoff.map)]", channel="hue:0210:0017884d7c57:5:color" }
As you can see, the switch is linked to different “channels”, to an MQTT broker and to a Phillips Hue.
The sitemap also displays that switch
Switch item=sHallway_en
The MQTT broker (Mosquitto) talks to a Sonoff touch flashed with ESPeasy.
Here comes the complicated part I don´t understand.
When I toggle the switch through Basic UI or a phone app, I hear the relay clicking in the switch and the Phillips hue turns ON or OFF. However, when I touch the switch, the relay clicks as well as does the switch move in the Basic UI or the phone app, but it does not turn ON/OFF the light.
Switching the Sonoff touch from OFF to ON and back gives me the following log entry
2017-07-28 13:41:44.790 [ItemStateChangedEvent ] - sHallway_en changed from OFF to ON
2017-07-28 13:41:46.792 [ItemStateChangedEvent ] - sHallway_en changed from ON to OFF
Using the “virtual” switch on the sitemap displays the following log entries
2017-07-28 13:41:50.231 [ItemStateChangedEvent ] - sHallway_en changed from OFF to ON
2017-07-28 13:41:50.241 [ItemCommandEvent ] - Item 'sHallway_en' received command ON
2017-07-28 13:41:51.941 [ItemStateChangedEvent ] - sHallway_en changed from ON to OFF
2017-07-28 13:41:51.945 [ItemCommandEvent ] - Item 'sHallway_en' received command OFF
What am I missing, why does toggling the Sonoff touch does toggle the switch on the sitemap but does not turn ON/OFF the Phillips hue, while using the switch on the sitemap turns ON/OFF the switch AND the Hue?
EDIT:
Maybe I should add my onoff.map
1=ON
0=OFF
ON=1
OFF=0