Rules doesn't work from OpenHab 1.8 -> 2.0

Hi,

I’m trying to merge my openHab from version 1.8 to version 2.

It works great except the rules.

It seems that the rule is never called!
The rule just looks exactly the same as in 1.8 and it works fine.:

rule "Night Modus"
when
Item Scene_Nacht changed to ON
then
sendCommand(Logik_Jalousie_Nacht, OFF)
sendCommand(Logik_Jalousie_Nacht_Flur, OFF)
sendCommand(Scene_Nacht, OFF)

end

do i need to enable the ruling somehow?

looks good, please send the item definitions.
as allways: did you restart OH?

Hi,

yes i did multiple restarts of my pi.

here are the important items from the *.items:

Switch Logik_Jalousie_Nacht “Nacht Jaloousie” { knx=“5/1/1” }
Switch Logik_Jalousie_Nacht_Flur “Nacht Jaloousie Flur” { knx=“5/1/5” }
Switch Scene_Nacht “Nacht” (gScene)

Try to see if the rule gets triggered in the logs by adding a logInfo statement:

rule "Night Modus"
when
Item Scene_Nacht changed to ON
then
logInfo("Test","Scene_Nacht received ON ")
sendCommand(Logik_Jalousie_Nacht, OFF)
sendCommand(Logik_Jalousie_Nacht_Flur, OFF)
sendCommand(Scene_Nacht, OFF)
end

I tried this already, but for some kind of reason no log-message at all is created in my system (even not the System-logs).

I just installed the “openhabian” but under /userdata/logs is no file.

I am not familiar with openHABian, so I am not 100% sure where it keeps the OH2 log files…(I think that it’s using an apt based setup)… did you check /var/log/openhab2/ directory?

Tip: I usually have one ssh session open to my system doing only:

tail -f /var/log/openhab2/openhab.log -f /var/log/openhab2/events.log

to check live the logs being generated :slight_smile:

Hi,

great thanks i was exactly looking for this command to see the logs and it works fine :slight_smile:

I got an parsing error for my rule file.

i just removed everything from the file and just re-add it and it worked afterwards.

Great thx

1 Like