Problems with rule generator in Main UI

  • Platform information:
    • Hardware: Intel Core i5 4th gen / 8 Gb RAM DDR3 / SSD PCI Exp 128 Mb
    • OS: W10 Home with extended safety pack until october 2026
    • Java Runtime Environment: Zulu 21
    • openHAB version: 5.1.0.M3
  • Issue of the topic: malfunction of rule generator in Main UI
  • Please post configurations (if applicable):
    • Items configuration: nothing specific
    • Sitemap configuration: nothing specific
    • Rules code related to the issue:
configuration: {}
triggers:
  - id: "1"
    configuration:
      itemName: Control_MultimediaDomotica_Salon_Scene_002
      command: "1"
    type: core.ItemCommandTrigger
conditions: []
actions:
  - inputs: {}
    id: "2"
    configuration:
      itemName: TV_de_Diego_Power_Status
      command: ON
    type: core.ItemCommandAction
  • Services configuration: nothing specific
  • Logs: I can’t manage to identify logs related with this problem

The main problem is that I can’t manage to set any kind of condition, either it is an Item, time, script or ephemeris type. I always got no options as values to set the conditions, like this:

I was usin OpenHAB 4.3 and upgraded last week to 5.1.0.SNAPSHOT to solve a problem with Amazon Echo Control loging to Alexa server. After upgrading I noticed about this problem, so I thought it was related with snapshot version, and I upgraded again to 5.1.0.M2 getting again the same problem. Yesterday I upgraded
to 5.1.0.M3 to get this very interesting performance of Z-WAVE JS binding getting node numbers higher than 256, but unfortunately I keep on experincing the same problem with rule generator.

Thank you in advance for your help

Diego

I think we need more details.

When you click “Add Condition” do you see the four categories or does it jump straight to these time based conditions?

I too am seeing a problem with the time conditions. This might be related to the big migration to Vue 3. An issue should be filed on that. It’s also not working for Ephemeris.

However, for me Items are working as expected.

After selecting the Item I see the form as expected.

Script Conditions are working as expected too.

Thank you Rich!!

It is showing a strange behaviour, definitely. I will try to explain it in a more detailed way, but first i am going to give some details regardin some rules I have:

  1. I have lots of rules where I control different kind of Z-wave or somfy actuators items using scene controls items coming from chanels from things like Remotec ZRC90 or Hank SCN04
  2. I normally set a trigger with an Item that updates its state. I set any action and set some conditions always including one related with the trigger’s item having a value with an operator.
configuration: {}
triggers:
  - id: "1"
    configuration:
      itemName: Escena_Dormitorio_1_8_1
    type: core.ItemStateUpdateTrigger
conditions:
  - inputs: {}
    id: "3"
    configuration:
      itemName: ToldoDormitorio1_Control
      operator: <
      state: "91"
    type: core.ItemStateCondition
  - inputs: {}
    id: "4"
    configuration:
      itemName: Escena_Dormitorio_1_8_1
      operator: =
      state: "0"
    type: core.ItemStateCondition
actions:
  - inputs: {}
    id: "2"
    configuration:
      command: "91"
      itemName: ToldoDormitorio1_Control
    type: core.ItemCommandAction

This is how I have to design the rules in order to work with the scene controllers and the actuators.

If a try to set a rule like the following, it never works:

configuration: {}
triggers:
  - id: "1"
    configuration:
      state: "0"
      itemName: Escena_Dormitorio_1_8_1
    type: core.ItemStateChangeTrigger
conditions:
  - inputs: {}
    id: "3"
    configuration:
      itemName: ToldoDormitorio1_Control
      operator: <
      state: "91"
    type: core.ItemStateCondition
actions:
  - inputs: {}
    id: "2"
    configuration:
      command: "91"
      itemName: ToldoDormitorio1_Control
    type: core.ItemCommandAction

So, it was when I tried to design a new rule following the first case that I discovered the issue with the rule generator. And aswering to your question, these are all the steps:

1) Trigger and Action

configuration: {}
triggers:
  - id: "1"
    configuration:
      itemName: Escena_Dormitorio_1_8_5
    type: core.ItemStateUpdateTrigger
conditions: []
actions:
  - inputs: {}
    id: "2"
    configuration:
      command: OFF
      itemName: Casa_Luces
    type: core.ItemCommandAction

2) Conditions
The screen you mention, “ADD CONDITION”, with the four options is shown

3a) Item condition

I pick the item from the model

3b) Add condition

I select the operator an the state, corresponding to the 5th button of the Remotec ZRC90, and the value 3 for the state “KeyPressed2x”

3c) Closing to go back to rule screen

Nothing happens and there is no condition at all

And there are no conditions in the rule YAML

configuration: {}
triggers:
  - id: "1"
    configuration:
      itemName: Escena_Dormitorio_1_8_5
    type: core.ItemStateUpdateTrigger
conditions: []
actions:
  - inputs: {}
    id: "2"
    configuration:
      command: OFF
      itemName: Casa_Luces
    type: core.ItemCommandAction

4) Time condition

Impossible to go on with anything

5a) Script condition

5b) Add condition / Design with Blockly

Nothing to do; all is empty

6a) Ephemeris schedule

I select “It is a weekday”

6b) Back to rule

Nothging happens. There is no condition either in the rule screen or in the YAML code

configuration: {}
triggers:
  - id: "1"
    configuration:
      itemName: Escena_Dormitorio_1_8_5
    type: core.ItemStateUpdateTrigger
conditions: []
actions:
  - inputs: {}
    id: "2"
    configuration:
      command: OFF
      itemName: Casa_Luces
    type: core.ItemCommandAction

And that’s all folks…

Thank you again!!!

Please create an issue on the openhab-webui repo with this information or a link back to here. Something is buggy and needs to be fixed.

I’m affraid I don’t know how to do what you mention. Could you give some detailed instructions?

Thank you Rich! Today is bank holiday in Spain so I have some things more insteresting to do in spite I love OH :smiley:. I will deal with this asap.

There was a typo in the conditions wizard - this is fixed in #3560 PR.

1 Like

I just merged the fix.

Hi Rich

I have just created the issue in GitHub

https://github.com/openhab/openhab-webui/issues/3563

Hi Florian

What OH5 version has this bug fix implemented? I am non completely sure about which one use to update and repair my system.

Thank you and regards

Florian posted the following instructions in another thread:

Adding on to this thread since my question is similar:

When using the Main UI to write rules, why can’t I find my item name when it’s part of a group? I don’t really use “Models”, so my expectation is that if I enter the item’s unique name in the search field, it should come up as the only match. That, however, works only if the item is not part of a group. And yes, all three checkboxes at the bottom are ticked.

See here:

But there they are:

Item that’s not in a group is found, though:

Do I need to create a “Model” that just includes all of my items unsorted?

Thanks!

I think the model picker search behaviour is a bit „unfortunate“, you need to click the expand icon besides the searchbar.
Or you click on the full entry and not the icon when selecting an item, then a list should open instead of the picker.

Ah, that makes sense, thanks.

I wasn’t aware the search function wouldn’t find an item in a collapsed list.

But I’m only ever getting the picker (using blockly), not the list you mentioned, when clicking on the item name. But I can work with that.

It can indeed be the case that blocks only provides the semantic model picker, I was assuming you were still talking about conditions.

No, pretty much everywhere only the picker pops up. Triggers, Actions, Conditions, etc. Outside Blockly.