Rules OH4 don't open trigger channels

Hello,
since the transition to openHAB 4.0.1, it is no longer possible to open channels in the Rule Engine.
I have a rule that uses the Astro Binding to lower my blinds at sunset. This worked in OH3.6.
When adjusting the rule, I noticed that I can use the trigger “Astro:Sun:Local” but the channels and the UI cannot be opened.
my code is

configuration: {}
triggers:
  - id: "1"
    configuration:
      thingUID: astro:sun:local
      event: end
      channelUID: astro:sun:local:set#event
    type: core.ChannelEventTrigger
conditions: []
actions:
  - inputs: {}
    id: "2"
    configuration:
      blockSource: <xml xmlns="https://developers.google.com/blockly/xml"><block
        type="controls_if" id="54zwU*+Qtan`R1?0TFA7" x="225" y="149"><value
        name="IF0"><block type="logic_compare" id="pkVu~`T7N|:JD.p/A1+j"><field
        name="OP">EQ</field><value name="A"><block type="oh_getthing_state"
        id="J|,5//7MchL-1??;~|B)"><value name="thingUid"><shadow type="oh_thing"
        id="=?D3#n3z~3/CfOCa!DGp"><field
        name="thingUid">MyThing</field></shadow><block type="oh_thing"
        id="=?D3#n3z~3/CfOCa!DGp"><field
        name="thingUid">astro:sun:local</field></block></value></block></value><value
        name="B"><block type="text" id="$cO5;z%PT`#yuAg6+lxE"><field
        name="TEXT">set</field></block></value></block></value><statement
        name="DO0"><block type="oh_sleep" id="{(qSS|P4d_WDqh_0z39U"><field
        name="milliseconds">900000</field><next><block type="oh_event"
        id="]ocUB#bG28:v.S40(@2N"><field
        name="eventType">sendCommand</field><value name="value"><shadow
        type="text" id="L}q:imyL=[tAz^pj:OG="><field
        name="TEXT">value</field></shadow><block type="text"
        id="L}q:imyL=[tAz^pj:OG="><field
        name="TEXT">DOWN</field></block></value><value name="itemName"><shadow
        type="oh_item" id="f*I8~qOk7(m4(p7S=tbI"><mutation itemName="MyItem"
        itemLabel="MyItem"></mutation><field
        name="itemName">MyItem</field></shadow><block type="oh_item"
        id="f*I8~qOk7(m4(p7S=tbI"><mutation itemName="Rollo_Wohnzimer"
        itemLabel="Rollo-Wohnzimmer"></mutation><field
        name="itemName">Rollo_Wohnzimer</field></block></value><next><block
        type="oh_event" id=".IQHlaX4KxG#}MuV2YW+"><field
        name="eventType">sendCommand</field><value name="value"><shadow
        type="text" id="P$+T!h|~m[!!9$Ms.G{J"><field
        name="TEXT">value</field></shadow><block type="text"
        id="5mMoKunlalQMs#610cjZ"><field
        name="TEXT">DOWN</field></block></value><value name="itemName"><shadow
        type="oh_item" id=",n7Sp$qU!=i#uybw-z*`"><mutation itemName="MyItem"
        itemLabel="MyItem"></mutation><field
        name="itemName">MyItem</field></shadow><block type="oh_item"
        id=";PyoFB!!X8SJ4|04xkDa"><mutation itemName="Rollo_Bad"
        itemLabel="Rollo-Bad"></mutation><field
        name="itemName">Rollo_Bad</field></block></value><next><block
        type="oh_event" id="fl`r|E@[2=NMXzbdsj.e"><field
        name="eventType">sendCommand</field><value name="value"><shadow
        type="text" id="P$+T!h|~m[!!9$Ms.G{J"><field
        name="TEXT">value</field></shadow><block type="text"
        id="-2,!9Qu;r(Z?j5T*RY^p"><field
        name="TEXT">DOWN</field></block></value><value name="itemName"><shadow
        type="oh_item" id=",n7Sp$qU!=i#uybw-z*`"><mutation itemName="MyItem"
        itemLabel="MyItem"></mutation><field
        name="itemName">MyItem</field></shadow><block type="oh_item"
        id="`I2vnI/oI3w2s)[^]MJ8"><mutation itemName="Rollo_Eltern"
        itemLabel="Rollo-Eltern"></mutation><field
        name="itemName">Rollo_Eltern</field></block></value><next><block
        type="oh_event" id="],HgzQV,oED_;+suFe})"><field
        name="eventType">sendCommand</field><value name="value"><shadow
        type="text" id="P$+T!h|~m[!!9$Ms.G{J"><field
        name="TEXT">value</field></shadow><block type="text"
        id="sE[thK8Cv~ZWeWhM/mHL"><field
        name="TEXT">DOWN</field></block></value><value name="itemName"><shadow
        type="oh_item" id=",n7Sp$qU!=i#uybw-z*`"><mutation itemName="MyItem"
        itemLabel="MyItem"></mutation><field
        name="itemName">MyItem</field></shadow><block type="oh_item"
        id="5{wN85d7VJ)R^2ZR/rJW"><mutation itemName="Rollo_Bastian"
        itemLabel="Rollo-Bastian"></mutation><field
        name="itemName">Rollo_Bastian</field></block></value><next><block
        type="oh_event" id="?o2*]_u|Jso,)W[GH4H:"><field
        name="eventType">sendCommand</field><value name="value"><shadow
        type="text" id="P$+T!h|~m[!!9$Ms.G{J"><field
        name="TEXT">value</field></shadow><block type="text"
        id="RR#%e}B[VRKGuHXMOv|Z"><field
        name="TEXT">DOWN</field></block></value><value name="itemName"><shadow
        type="oh_item" id=",n7Sp$qU!=i#uybw-z*`"><mutation itemName="MyItem"
        itemLabel="MyItem"></mutation><field
        name="itemName">MyItem</field></shadow><block type="oh_item"
        id="|Q2vFuRE5:@96ZMZqq^N"><mutation itemName="Rollo_Jan"
        itemLabel="Rollo-Jan"></mutation><field
        name="itemName">Rollo_Jan</field></block></value><next><block
        type="oh_event" id="1j/swBG3$|3,s;nsdXtJ"><field
        name="eventType">sendCommand</field><value name="value"><shadow
        type="text" id="P$+T!h|~m[!!9$Ms.G{J"><field
        name="TEXT">value</field></shadow><block type="text"
        id="}+D=CYWDW,]9hY1|YjvD"><field
        name="TEXT">DOWN</field></block></value><value name="itemName"><shadow
        type="oh_item" id=",n7Sp$qU!=i#uybw-z*`"><mutation itemName="MyItem"
        itemLabel="MyItem"></mutation><field
        name="itemName">MyItem</field></shadow><block type="oh_item"
        id="}G6f|ynU]1oIguTIN0Vg"><mutation itemName="Rollo_Jan"
        itemLabel="Rollo-Jan"></mutation><field
        name="itemName">Rollo_Jan</field></block></value><next><block
        type="oh_event" id="!^o^i?|]EJgUq|bP9W/M"><field
        name="eventType">sendCommand</field><value name="value"><shadow
        type="text" id="P$+T!h|~m[!!9$Ms.G{J"><field
        name="TEXT">value</field></shadow><block type="text"
        id="VeD.$OcWkGvi|I/r[R#8"><field
        name="TEXT">DOWN</field></block></value><value name="itemName"><shadow
        type="oh_item" id=",n7Sp$qU!=i#uybw-z*`"><mutation itemName="MyItem"
        itemLabel="MyItem"></mutation><field
        name="itemName">MyItem</field></shadow><block type="oh_item"
        id="oA=YqZT9ua$Uqy/PfMEw"><mutation itemName="Rollo_Essen_1_AufAb4"
        itemLabel="Rollo-Essen-1 AufAb4"></mutation><field
        name="itemName">Rollo_Essen_1_AufAb4</field></block></value><next><block
        type="oh_event" id="zomVnEE,i`{sMQSuO[HV"><field
        name="eventType">sendCommand</field><value name="value"><shadow
        type="text" id="P$+T!h|~m[!!9$Ms.G{J"><field
        name="TEXT">value</field></shadow><block type="text"
        id="sO^jM,7/=~6XfJ_37T{!"><field
        name="TEXT">DOWN</field></block></value><value name="itemName"><shadow
        type="oh_item" id=",n7Sp$qU!=i#uybw-z*`"><mutation itemName="MyItem"
        itemLabel="MyItem"></mutation><field
        name="itemName">MyItem</field></shadow><block type="oh_item"
        id="Z1-63l5Z5cut`4Dgo17H"><mutation itemName="Rollo_Essen_2_AufAb4"
        itemLabel="Rollo-Essen-2 AufAb4"></mutation><field
        name="itemName">Rollo_Essen_2_AufAb4</field></block></value><next><block
        type="oh_event" id="@E]^Jj[J)LI9;C+E03wV"><field
        name="eventType">sendCommand</field><value name="value"><shadow
        type="text" id="P$+T!h|~m[!!9$Ms.G{J"><field
        name="TEXT">value</field></shadow><block type="text"
        id=";B,IZq=s:|:tv^G,{ziH"><field
        name="TEXT">DOWN</field></block></value><value name="itemName"><shadow
        type="oh_item" id=",n7Sp$qU!=i#uybw-z*`"><mutation itemName="MyItem"
        itemLabel="MyItem"></mutation><field
        name="itemName">MyItem</field></shadow><block type="oh_item"
        id="G=l){CQO9Z{^@pM54f(~"><mutation itemName="Rollo_Essen_3_AufAb4"
        itemLabel="Rollo-Essen-3 AufAb4"></mutation><field
        name="itemName">Rollo_Essen_3_AufAb4</field></block></value><next><block
        type="oh_event" id="8%FCt.q2bgIzqEtgEqh+"><field
        name="eventType">sendCommand</field><value name="value"><shadow
        type="text" id="P$+T!h|~m[!!9$Ms.G{J"><field
        name="TEXT">value</field></shadow><block type="text"
        id=".rwQyZ?EACVm2UL~LEp["><field
        name="TEXT">80</field></block></value><value name="itemName"><shadow
        type="oh_item" id=",n7Sp$qU!=i#uybw-z*`"><mutation itemName="MyItem"
        itemLabel="MyItem"></mutation><field
        name="itemName">MyItem</field></shadow><block type="oh_item"
        id="?}3h;g_!7J|_w@g?M9CR"><mutation
        itemName="Rollo_Essen_Terrasse_AufAb4" itemLabel="Rollo-Essen-Terrasse
        AufAb4"></mutation><field
        name="itemName">Rollo_Essen_Terrasse_AufAb4</field></block></value></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block></xml>
      type: application/javascript
      script: |
        var thread = Java.type('java.lang.Thread')


        if (things.getThing('astro:sun:local').status == 'set') {
          thread.sleep(900000);
          items.getItem('Rollo_Wohnzimer').sendCommand('DOWN');
          items.getItem('Rollo_Bad').sendCommand('DOWN');
          items.getItem('Rollo_Eltern').sendCommand('DOWN');
          items.getItem('Rollo_kids1').sendCommand('DOWN');
          items.getItem('Rollo_kids2').sendCommand('DOWN');
          items.getItem('Rollo_Essen_1_AufAb4').sendCommand('DOWN');
          items.getItem('Rollo_Essen_2_AufAb4').sendCommand('DOWN');
          items.getItem('Rollo_Essen_3_AufAb4').sendCommand('DOWN');
          items.getItem('Rollo_Essen_Terrasse_AufAb4').sendCommand('80');
        }
    type: script.ScriptAction

Have another User this Problem?

1 Like

Yes - me, GUI is not working…
As workaroud I define the needed channel directly in the code tab.
Eg.

configuration: {}
triggers:

  • id: “1”
    configuration:
    thingUID: mqtt:topic:MQTT:Buttons_Remotes
    channelUID: mqtt:topic:MQTT:Buttons_Remotes:c_RC_IKEA_2
    type: core.ChannelEventTrigger
  • id: “3”
    configuration:
    thingUID: mqtt:topic:MQTT:Buttons_Remotes
    event: “”
    channelUID: mqtt:topic:MQTT:Buttons_Remotes:c_Btn_Living

This sounds like a UI regression. Please file an issue on the UI repository.

Me three. I can’t add a new thing channel trigger via the UI but using the ‘code’ tab I can copy and paste from another rule. Has anyone with a github account posted this yet?

Yes.

Thank you🙏

First and foremost, Thanks @JustinG for raising the issue!
I just updated my OH4 from 4.0.2 to 4.0.3 and on my side, this fixed the issue! :slight_smile: