Hello all,
my openHAB 3 runs on a raspberry pi3. The OS is a openhabian.
I have a problem with a rule. This rule should be for a scene control. When I activate an item in comet visu, a certain light setting should take place.
Here is the rule:
rule "scenes light Wohnzimmer EG"
when
Item ScenesLightsEGWohnz received command
then
switch (ScenesLightsEGWohnz.state) {
case 1: {
Light_EG_Wohnz_TV.sendCommand(OFF)
Light_EG_Wohnz_Couch.sendCommand(15)
Light_EG_Wohnz_Mitte.sendCommand(25)
Light_EG_WohnMitteDimmer_2_Level.sendCommand(OFF)
Light_EG_Wohnz_Eingang.sendCommand(OFF)
Light_EG_Essen.sendCommand(OFF)
}
case 2: {
Light_EG_Wohnz_Eingang.sendCommand(25)
Light_EG_Essen.sendCommand(ON)
Light_EG_WohnMitteDimmer_2_Level.sendCommand(ON)
Light_EG_Wohnz_TV.sendCommand(OFF)
Light_EG_Wohnz_Couch.sendCommand(OFF)
Light_EG_Wohnz_Mitte.sendCommand(OFF)
}
case 3: {
Light_EG_Wohnz_TV.sendCommand(ON)
Light_EG_Wohnz_Couch.sendCommand(ON)
Light_EG_Wohnz_Mitte.sendCommand(ON)
Light_EG_Wohnz_Eingang.sendCommand(ON)
Light_EG_Essen.sendCommand(ON)
Light_EG_WohnMitteDimmer_2_Level.sendCommand(ON)
}
case 4: {
Light_EG_Wohnz_TV.sendCommand(OFF)
Light_EG_Wohnz_Couch.sendCommand(OFF)
Light_EG_Wohnz_Mitte.sendCommand(OFF)
Light_EG_WohnMitteDimmer_2_Level.sendCommand(OFF)
Light_EG_Wohnz_Eingang.sendCommand(OFF)
Light_EG_Essen.sendCommand(OFF)
}
default: {
logInfo("SceneLightEGWohnzimmer","incorrect state: {}",ScenesLightsEGWohnz.state)
}
}
end
When I look in the event log, the item is set to with the status, but the rule doesn’t seem to be called at all.
>
> 2021-11-25 21:21:29.126 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'I_OG_2_6_Zimmer_HT_ActualTemp' changed from 19.60 °C to 19.50 °C
> 2021-11-25 21:23:43.466 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'ScenesLightsEGWohnz' received command 1
> 2021-11-25 21:23:45.317 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'ScenesLightsEGWohnz' received command 2
> 2021-11-25 21:23:45.320 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'ScenesLightsEGWohnz' changed from 1 to 2
> 2021-11-25 21:23:46.657 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'ScenesLightsEGWohnz' received command 3
> 2021-11-25 21:23:46.659 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'ScenesLightsEGWohnz' changed from 2 to 3
> 2021-11-25 21:23:48.680 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'ScenesLightsEGWohnz' received command 4
> 2021-11-25 21:23:48.684 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'ScenesLightsEGWohnz' changed from 3 to 4
Does anyone have a solution to this problem.