[SOLVED] Astro items check

Hi all, I’ve been struggling with a daily rule to trigger a switch at sunset.

The Astro Binding pages states the item for sunset should look like this:

DateTime Sunset_Time “Sunset [%1$tH:%1$tM]” { channel=“astro:sun:home:set#start” }

However the logfile shows:
2018-09-26 18:46:00.008 [vent.ChannelTriggeredEvent] - astro:sun:local:set#event triggered START

should the channel be { channel=“astro:sun:home:set#start” }
or should it be { channel=“astro:sun:home:event#start” }


There is a few different concepts in the astro binding that you have to separate:
You have start and end times, for example for the sun set, that would be astro:sun:local:set#start, which gives you the time that the sun starts to set, and astro:sun:local:set#end, which gives you the time that the sun set ends.
Furthermore you have durations, that just gives you the number of minutes that the sun set takes, and you have a range event, which triggers a START and END at the respective times. It is that range event that you would typically use in a rule:

rule "Do something when sun set starts"
        Channel "astro:sun:local:set#event" triggered START
        // do something

Thanks very much for your support. I’ll make the change as you describe and see how I get on at sunset time tonight :slight_smile:

Coincidentally, I just posted a way to test this manually…

1 Like

Thanks for the tip.

I wish i’d known about the manual trigger option weeks ago :smile: :smiley:

1 Like

It’s really handy for testing those solar eclipse event notifications!

1 Like

They lights came on as expected. If I want the trigger to occur 30 minutes before sunset, do I set the offset value to 30 or minus 30?

Earlier is negative, later is positive, so in your case you set it to minus 30.

1 Like

Astro now behaving as I want, many thanks for your help.