Rule using astro channel not triggering SOLVED

Platform information:

  • OpenHab 2.5.10-1 installed on pi 4
  • OS: Raspbian 10
  • Java Runtime Environment: OpenJDK Runtime Environment (build 11.0.9+11-post-Raspbian-

Issue of the topic:
My initial target is to add some time of day functionality (day - night) in my presence rules.

To this end I have created a proxy item called NightState with following configuration

Switch      NightState             "Night State"

and written following 2 rules to change its state according to astro channel

 rule "Night State ON at sunset"
    Channel 'astro:sun:home:set#event' triggered START
rule "Night State OFF at sunrise"
    Channel 'astro:sun:home:rise#event' triggered START 

Now the issue is that this rule seems not to fire as expected when sunset & sunrise events trigger.
I have checked both log files ( openhab.log - event.log ) but nothing logs as error, plus the astro channels for sunrise and sunset seem to fire properly when checking the event.log.

2020-12-09 07:30:00.029 [vent.ChannelTriggeredEvent] - astro:sun:local:rise#event triggered START

I use the VS-Code extension and the syntax checking of the rule seems also to be right.

What other options do I have to perform debugging, any ideas on why the rule does not fire and change the state of the associated item?

astro:sun:home != astro:sun:local

Hi jswim788, can you elaborate a bit more, what should the substitution be?
Sorry I am just starting with openhab automation.

Ok I think I understood what the change should be and substituted home with local.
Will see if tonight it fires correctly.

1 Like

Be sure that you have created a astro:sun thing that is either called home or local.
You can define multiple astro things. I have one atsro thing for allowing me to put the house into a night mode (allow lights to turn on if any movement).

Case solved thank both of you.
As @jswim788 mentioned it was the channel name that caused the issue. Changing home --> local fixed it.