Hello,
Working:
I ve got a mqtt device wich can be controlled over mqtt.
I can choose color, saturation and volume with the colorwheel over mqtt and all works fine.
Now i want to select a programm. The thing is generated in PaperUI and works fine.
I can enter 0 for rainbow and 1 for single color and so on.
Problem
Now I want to select the programm with an switch. But it does not work.
The log looks fine. Bute there are no messages on mqqt checked with MQTT.fx
Question:
How can i fix it?
Items:
Color Sandbank_Licht “Licht” (gCP, OD_Garten, gOD) {channel=“mqtt:topic:81df82e8:beleuchtung”}
Number Sandbank_Programm2 “Programm2” (gCP) { channel=“mqtt:topic:81df82e8:program”}
Number LED_Programm_Auswahl “LED Programm”
Sitemap:
Colorpicker item=Sandbank_Licht
Switch item=LED_Programm_Auswahl label=“LED” mappings=[0=“Regebogen”, 1=“Farbe”, 2=“Weiss 1”, 3=“Weiss 2”, 4=“Weiss 3”]
Rule:
rule “LED Programm Sandbank”
when
Item LED_Programm_Auswahl received update
then
var prog_state = "Sandbank Programm: "+LED_Programm_Auswahl.state.toString
logError(“myhome.rules.Sandbank”, prog_state)
postUpdate(Sandbank_Programm2, LED_Programm_Auswahl.state)
end
Log:
22:23:41.181 [INFO ] [smarthome.event.ItemCommandEvent ] - Item ‘LED_Programm_Auswahl’ received command 0
22:23:41.183 [INFO ] [smarthome.event.ItemStateChangedEvent] - LED_Programm_Auswahl changed from 1 to 0
22:23:41.184 [ERROR] [me.model.script.myhome.rules.Sandbank] - Sandbank Programm: 0
22:23:41.194 [INFO ] [smarthome.event.ItemStateChangedEvent] - Sandbank_Programm2 changed from 1 to 0
22:23:44.427 [INFO ] [smarthome.event.ItemCommandEvent ] - Item ‘LED_Programm_Auswahl’ received command 1
22:23:44.428 [INFO ] [smarthome.event.ItemStateChangedEvent] - LED_Programm_Auswahl changed from 0 to 1
22:23:44.429 [ERROR] [me.model.script.myhome.rules.Sandbank] - Sandbank Programm: 1
22:23:44.439 [INFO ] [smarthome.event.ItemStateChangedEvent] - Sandbank_Programm2 changed from 0 to 1