I have a fresh install of Openhabian, running Openhab 4.0.0 on a raspberry pi. I’m trying to set up a rule to trigger a script based on events from the Astro module. This worked fine when I was running OH3 and OH2, but it doesn’t now and I’m not really sure what the problem is.
I want the rule to trigger on astro:sun:local:civilDusk#event START, and I can see the event triggering in the log.
When creating the rule, I choose “Thing Event”. As the thing I choose “Local Sun (astro:sun:local)”. But when I then click on “channel” to choose the correct one, nothing happens. It doesn’t show a new dialogue, it’s just dead. This itself seems like a bug, as the thing does have trigger channels.
As kind of a workaround I try clicking Done and modify the code to add the channel there manually, so it looks like this:
configuration: {}
triggers:
- id: "1"
configuration:
thingUID: astro:sun:local
event: START
channelUID: astro:sun:local:civilDusk
type: core.ChannelEventTrigger
conditions: []
actions:
- inputs: {}
id: "2"
label: Run astro dusk script
configuration:
considerConditions: true
ruleUIDs:
- 59239ce01f
type: core.RunRuleAction
If I manually run the rule in the GUI, it works, so I know the action is correct, and that the script the action runs is correct. And I see the event being triggered in the logs. But the rule does not run when the event triggers. What am I doing wrong?