[SOLVED] Astro Binding Sun Set Event not triggering

Yes you should, but your log above only goes to noon and doesn’t show any evening events like sunset, dusk, civil dusk… We need to see evening logs before we can say for sure that there is no event

Here is more of the log. I had just posted all the events from 4/30.

2018-04-30 00:18:00.007 [vent.ChannelTriggeredEvent] - astro:moon:local:rise#event triggered START
2018-04-30 00:59:00.002 [vent.ChannelTriggeredEvent] - astro:moon:local:phase#event triggered FULL
2018-04-30 02:30:00.002 [vent.ChannelTriggeredEvent] - astro:sun:local:morningNight#event triggered START
2018-04-30 08:40:00.001 [vent.ChannelTriggeredEvent] - astro:sun:local:astroDawn#event triggered START
2018-04-30 08:40:00.016 [vent.ChannelTriggeredEvent] - astro:sun:local:morningNight#event triggered END
2018-04-30 09:22:00.002 [vent.ChannelTriggeredEvent] - astro:sun:local:astroDawn#event triggered END
2018-04-30 09:22:00.016 [vent.ChannelTriggeredEvent] - astro:sun:local:nauticDawn#event triggered START
2018-04-30 10:01:00.002 [vent.ChannelTriggeredEvent] - astro:sun:local:nauticDawn#event triggered END
2018-04-30 10:01:00.016 [vent.ChannelTriggeredEvent] - astro:sun:local:civilDawn#event triggered START
2018-04-30 10:32:00.002 [vent.ChannelTriggeredEvent] - astro:sun:local:civilDawn#event triggered END
2018-04-30 10:32:00.015 [vent.ChannelTriggeredEvent] - astro:sun:local:rise#event triggered START
2018-04-30 10:36:00.002 [vent.ChannelTriggeredEvent] - astro:sun:local:rise#event triggered END
2018-04-30 10:36:00.016 [vent.ChannelTriggeredEvent] - astro:sun:local:daylight#event triggered START
2018-04-30 11:15:00.002 [vent.ChannelTriggeredEvent] - astro:moon:local:set#event triggered END
2018-04-30 17:36:00.003 [vent.ChannelTriggeredEvent] - astro:sun:local:noon#event triggered START
2018-04-30 17:37:00.005 [vent.ChannelTriggeredEvent] - astro:sun:local:noon#event triggered END
2018-05-01 01:22:00.002 [vent.ChannelTriggeredEvent] - astro:moon:local:rise#event triggered START
2018-05-01 02:32:00.003 [vent.ChannelTriggeredEvent] - astro:sun:local:morningNight#event triggered START
2018-05-01 08:38:00.002 [vent.ChannelTriggeredEvent] - astro:sun:local:astroDawn#event triggered START
2018-05-01 08:38:00.017 [vent.ChannelTriggeredEvent] - astro:sun:local:morningNight#event triggered END
2018-05-01 09:21:00.002 [vent.ChannelTriggeredEvent] - astro:sun:local:nauticDawn#event triggered START
2018-05-01 09:21:00.018 [vent.ChannelTriggeredEvent] - astro:sun:local:astroDawn#event triggered END
2018-05-01 09:59:00.002 [vent.ChannelTriggeredEvent] - astro:sun:local:civilDawn#event triggered START
2018-05-01 09:59:00.018 [vent.ChannelTriggeredEvent] - astro:sun:local:nauticDawn#event triggered END
2018-05-01 10:31:00.003 [vent.ChannelTriggeredEvent] - astro:sun:local:rise#event triggered START
2018-05-01 10:31:00.016 [vent.ChannelTriggeredEvent] - astro:sun:local:civilDawn#event triggered END
2018-05-01 10:34:00.002 [vent.ChannelTriggeredEvent] - astro:sun:local:daylight#event triggered START
2018-05-01 10:34:00.016 [vent.ChannelTriggeredEvent] - astro:sun:local:rise#event triggered END
2018-05-01 11:48:00.002 [vent.ChannelTriggeredEvent] - astro:moon:local:set#event triggered END
2018-05-01 17:36:00.002 [vent.ChannelTriggeredEvent] - astro:sun:local:noon#event triggered START
2018-05-01 17:37:00.002 [vent.ChannelTriggeredEvent] - astro:sun:local:noon#event triggered END
2018-05-02 02:24:00.002 [vent.ChannelTriggeredEvent] - astro:moon:local:rise#event triggered START
2018-05-02 02:34:00.002 [vent.ChannelTriggeredEvent] - astro:sun:local:morningNight#event triggered START
2018-05-02 08:36:00.002 [vent.ChannelTriggeredEvent] - astro:sun:local:astroDawn#event triggered START
2018-05-02 08:36:00.015 [vent.ChannelTriggeredEvent] - astro:sun:local:morningNight#event triggered END
2018-05-02 09:19:00.002 [vent.ChannelTriggeredEvent] - astro:sun:local:astroDawn#event triggered END
2018-05-02 09:19:00.017 [vent.ChannelTriggeredEvent] - astro:sun:local:nauticDawn#event triggered START
2018-05-02 09:58:00.002 [vent.ChannelTriggeredEvent] - astro:sun:local:nauticDawn#event triggered END
2018-05-02 09:58:00.018 [vent.ChannelTriggeredEvent] - astro:sun:local:civilDawn#event triggered START
2018-05-02 10:30:00.003 [vent.ChannelTriggeredEvent] - astro:sun:local:rise#event triggered START
2018-05-02 10:30:00.018 [vent.ChannelTriggeredEvent] - astro:sun:local:civilDawn#event triggered END
2018-05-02 10:33:00.003 [vent.ChannelTriggeredEvent] - astro:sun:local:rise#event triggered END
2018-05-02 10:33:00.016 [vent.ChannelTriggeredEvent] - astro:sun:local:daylight#event triggered START
2018-05-02 12:24:00.002 [vent.ChannelTriggeredEvent] - astro:moon:local:set#event triggered END

Not getting dusk or civil dusk for that matter either.

I changed my rule to:

rule "Sunset Rule"
when
    Channel 'astro:sun:local:noon#event' triggered START
then
    OSP_LightSwitch_01_Switch.sendCommand(ON)
end

And that worked as expected. So I believe I can safely rule out the issue being double quotes vs single quotes.

All I can think is that triggers that are falling after the end of the UTC day aren’t happening. Not sure how I could test that. Maybe set my location to London and see if that affects anything.

What version of OH are you running?

Version: 2.3.0-SNAPSHOT (#1267)

Odd, very odd…
Did you set your time zone?

I did that earlier today and gave openhab a restart, but I’ll have to wait until tonight to see if that changes anything.

Edit: Setting my timezone in the openhab settings didn’t help.

I too have the same issue. About 10 days ago, I updated my OH2 to the latest snapshot (at the time) and now Astro sunset no longer triggers rules but the Sunset event shows up in the log.

Note: I just went to myopenhab.org to see if there’s a way to figure out what version I’m running (to let y’all know) while remote, and discovered two new astro items in my Paper UI Inbox; Local Moon, and Local Sun. Are these related to my issue? Are there new Astro insructions for implementation of the use of Sunset event? Thanks.

I too encountered this problem since a few days.

My rule which is not working:

rule "Rollos Astro hoch"
when
    Channel 'astro:sun:home-offset:rise#event' triggered START
then
	Rollos_is_day.sendCommand(ON)
        ...

But this rule works every day without any problem so far:

rule "Rollos abends Astro zufahren"
when
	Channel 'astro:sun:home-offset:civilDusk#event' triggered END
then
	Rollos_Nachtstellung.sendCommand(ON)
end

I was on a snapshot from 2018-05-04 (#1271), today i made another update to snapshot #1278. But now i have to wait until tomorrow morning to check if this works now.

But i think it worked the first few days with the snapshot #1271, i think the first problem with this rule was 2 or 3 days ago.

Today in the morning, it worked again, my blinds opened.

I´m on #1278.

Wait another day and the mark the thread as solved.
Running on SNAPSHOT can cause trouble!

This is not my thread, the opener of this thread can do this only?

Some more replays of the other users, which encountered the same problem? Is it working for you again with the latest snapshot, too?

Just been through my logs, It always worked for me!
Yes only the opener of the thread. I’ll edit the thread title to solved anyway

This recent change is probably related. It appeared in #1275 first (I think). Try again with the most current OH snapshot and If you feel it is still misbehaving please leave a comment in that Github issue describing your problem.

Does this work at all?
I don’t see this entry in my events.log.
But I see this.

astro:sun:home-offset:civilDusk#event

So this will work, but what about the first one? Is this not available any more?

Here is a newer thread related to this astro binding problem.

And yes, this rise#event works.

My astro rules worked the last 2 weeks without problem, but today it worked not. 2 of my astro things are ok, but the 3rd one makes problems every now and then.

hi, i have a problem with the setup things channel , me channel trigger perfectly but i try to implement the earliest and latest parameter without success , please can you help me with this ? i read the doc and read many post about … .

here is the things :

astro:sun:Crepusculaire "Info Crepusculaire Ere" @ "crepusculaire" [ geolocation="50.57985513905061,3.3648933599336908", interval=60]{

Channels:

////au couche du soleil/////////

 Type rangeEvent : set#event [

            latest="22:00"

                            ] 
////au leve du soleil/////////

 Type rangeEvent : rise#event [

            earliest="07:00"            

                            ]
}

and here the rule :

rule "Ouvrir les Volets au leve du soleil Tout les jours"

    when   

                   Channel "astro:sun:Crepusculaire:rise#event" triggered START  ///leve du soleil declenche  

    then

   exc....

   end 

what wrong with my setup ? any idea ?

thanks a lot for your help

Sorry to bring this up again but I came across the exact same error in the last days. My astro events are not firing anymore:

OH Version: openHAB 2.5.4-1
Raspberry Pi 4 Raspbian GNU/Linux 10 (buster)

astro.rules:

rule "general.rules - Daylight - Start"
when
  Channel "astro:sun:homeoffset:set#event" triggered START
then
  Astro_Shutter_Rule_Timestamp.postUpdate(new DateTimeType())
  var Number executions = Astro_Shutter_Executions.state as Number
  if (executions == NULL) 
  {
    executions=0 
  }
  executions = executions +1
  Astro_Shutter_Executions.postUpdate(executions)

  vDaylight.sendCommand(OFF)
end

vDaylight remains NULL which gives me the impression the rule was never executed.

My astro.items file looks as follows:

astro:sun:home [ geolocation="48, 11", interval=300]
astro:moon:home [ geolocation="48, 11", interval=300]
astro:sun:homeoffset [ geolocation="48, 11", interval=300] {
     Channels:
         Type start : set#start [
            offset=-30
        ]
        Type rangeEvent : set#event [
            offset=-30
        ]
        Type start : rise#start [
            offset=0
        ]
        Type rangeEvent : rise#event [
            offset=0
        ]
}

Thanks in advance for your ideas!

You could always add a logInfo() to the beginning of your rule to find out.

However, Astro events should show up in your events.log

If Astro_Shutter_Executions did have state NULL when the rule ran, it would fail (and leave an error message in your openhab.log)
You cannot cast NULL to a Number.
You can test if state is NULL before trying to do that, though.

Thanks for your reply. The rule itself worked half a year without any issues, then it stopped. I have now recreated the astro thing and separated rise and set in two separate things.

Now it is working, still I dont have any idea why it stopped, though.