Hi,
i had to completely reinstall openhab2 on a new sd card yesterday.
I used the raspberry pi distribution.
It seems that after the reinstall some rules are not working anymore.
For example:
Item definition: Switch lightOffice "Office" (gOG,gOffice) {knx="1/2/4"}
Log: [ome.event.ItemCommandEvent] - Item 'lightOffice' received command ON
The rules with Item lightOffice changed
are not triggering anymore.
When i change the trigger to “received command” the rule is triggered but the state is always null:
rule "test"
when
Item lightOffice received command
then
logInfo("Test", "State of ligthOffice " + lightOffice.state)
end
Log:
[.eclipse.smarthome.model.script.Test] - State of ligthOffice NULL
What am i doing wrong? Before the reinstall everything was working fine.
In my Android openhab app the switch states are also not being updated. The switches are alway shown of, until i switch them in the app itself. Switching lights on and off in the app works. Only the states are not being updated when i hit the physical switch.
Thank you for your reply, Harry.
I added .toString and changed the text so that i can see that the rule was reloaded.
Unfortunately the output doesn’t change. It’s still NULL
Don’t think it is your rules. NULL means that your item did not get initialized and is not talking to your knx system. Maybe you want to check from the start: is you binding installed, do you have the right things definitions, etc.
As i said: i can switch the light via BasicUi and via App. The light goes on and off. If i change the rule from “state changed” to “received command” the rule is triggered.
So i think the communication is working and the setup is right.
It’s just the damn “state” and “state changed” which ist not working.