[SOLVED] Astro Offset via PaperUI + Trigger Rule Command

I’m a little confused with the Offset capabilities in Astro. Lack of sleep isn’t helping.

I had this working in a previous version, but I fat fingered the install and broke the damned thing, so can’t refer back. My config (1114, snapshot) is purely PaperUI configured, with a single .rules file.

Basically, I’m struggling with the offset function. For example, I have the Civil Dusk Start Time, offset by -120, which is roughly when it starts to get dark and I need some lights to start to function.

Viewing the string of this thing, gives me the right output, but when I believe the rule should trigger, it does not. I read somewhere I need the offset on the event, but doing that resulted in the End Time also being brought forward by 2 hours (-120), regardless of using “…#event triggered END”

I’m sure I’ve just got a small “typo” unless, Im completely misunderstanding Astro. The rule is below, my concern is around the “trigger”.

I know I could manually add some new offset channels to my thing, using a .things, but I’m trying to stay fully PaperUI

rule "Twilight Started"
when
	Item Twilight changed to ON or
	Channel 'astro:sun:local:civilDusk#event' triggered START or //civilDusk with -120 offset, starts to get dark from here
	Item TimePeriodOfDay changed to Twilight	
then
		logInfo("EXTRA", "Its Twilight: " + now)
		logInfo("EXTRA", "Channel astro:sun:local:civilDusk#event triggered START")
		sendMail("blah@prowl.com", "Time of Day", "Its Twilight: " + now)				
		Dawn.sendCommand(OFF)
		Morning.sendCommand(OFF)
		Day.sendCommand(OFF)
		Twilight.sendCommand(ON)
		Evening.sendCommand(OFF)
		Night.sendCommand(OFF)	
		TimePeriodOfDay.postUpdate("Twilight")

Go play with the little one. OH can wait. :wink:

I could be wrong on this but I always thought that when you apply an offset it affects all the channels. If that is the case being able to set it on each Channel is certainly misleading.

I see sihui is replying while I type this. I’m sure he will correct me if I’m wrong. :slight_smile:

1 Like

The channel trigger triggers on the range event channel, the start or end time channels are only for displaying the data on your sitemap.
So in your case you should configure the same offset for the civil dusk range event and the civil dusk start time.

This can be done via PaperUI too: just add a new thing manually.

Holy moly, how are you doing THAT?

I’m on the forum so much I’ve become psychic. :wink:

It only works on a computer, not on a phone or tablet.

When you have the text entry reply open you will see the person’s icon and name on the right. It says something like “sihui is also responding”.

I noticed it a week or so ago.


Look here when you reply to someone. Eventually you will see what I’m talking about. :smiley:

Thx, will check that out :rofl: