I’m quite new to OpenHAB and I’m setting my first steps in the rules section. I’m having a lot of trouble to get a simple script in Blockly to work. This is what I did:
I defined the “When” as a trigger to start the blockly script. It’s a simple trigger “when XX changes from OFF to ON”. I defined it with the “item event” button.
I wrote a simple blockly command (I think), but what i’m trying, it does not run it. If I press ctrl+R, it’s not running. If I start the trigger, it’s not running as well. This is my blockly code:
If I use a simple “Then” command (not made in blockly, but just an item action), then it’s working.
My goal is to enable a lamp, wait 5 minutes and then disable the lamp. I think the best way to make this happen is with blockly (since I don’t have coding experience), but for some reason, it just don’t want to work. Am I missing something? Do I need to install something like an add-on to make it work?
I’m using a OpenHAB 3.4.2, which runs on a Raspberry Pi 4 model B. I connect to the raspberry with a windows computer where I enter the IP-address in chrome browser.
In general, the idea is fine but there is something weird happing on your side which we need to track down:
As it is weird that even manually running the rule has no effect: when you say it is not running, does the green idle become a orange running for a glimpse of a second?
Do you have the logs available (see Frontail below)? Can we see what is happening in the logs?
Can you add a log-info with some test and check if it appears in the logs?
When I manually run the code, the green idle indeed changes to orange for a glimpse of a second. But it does not execute the request (the lamp is not going on).
I don’t see anything happening in the logs. I actually don’t even see logs. When I go to openhabian:9001, I only see “==> /var/log/openhab/events.log <==” listed at the right side of the screen, repeating itself. But no actual logs.