Blockly problem

Hi all

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:

  1. 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.

  2. 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.

Thanks in advance all!


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?

Further info:

Hi Stefan!

Thanks for the answer. Here are my replies:

  • 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.


Like so?

Does it say something like “Skiped” at the bottom? If yes, remove everything in the search bar above. If not, logging has an issue.

Does the top bar say this?

If nothing is logged at all, even when you startup openHAB, please open a different thread first, where we can track down why nothing is logged. Can you check this thread then first? [SOLVED] OH3 logging not possible, openhab.log last entries some days ago