Hi,
i have a rule that triggers when sunset starts. Thanks a lot to ASTRO its very easy as you for sure know.
Is there a simple way to have a rule that starts every day 1h before sunset starts?
Thanks a lot, Norbert
rule "HouseNr_Switch ON via Sunset"
when
Channel 'astro:sun:local:set#event' triggered START
then
HouseNr_Switch.sendCommand(ON)
PvXL_Switch.sendCommand(OFF)
end
Binding docs describe offset.
Perhaps less obvious is that you can create another Thing and apply offsets to its features, while leaving your original Thing as normal.
I didnāt say it required a new Thing.
You can apply an offset to any channel. But when itās offset, itās offset. If you want both regular and offset versions of the exact same channel, you would need a separate Thing.
However, for something like ālights at duskā there are several dusk channels - civil, astro, etc. You can offset just one of those.
One more question as it seems to not work properly.
I used the eyisting āLocal Sunā thing i have related to Astro binding, i simply took astro:sun:local:civilDusk#startā¦which is in my location today 18:19ā¦
In addition i created an item which would not be required, as far as i understandā¦and it does the -45min offset correctlyā¦but based on the rule below the switch turned off at 19:45. Any idea??? could you please check if ( @rossko57 ) my rule should work that way? Iām uncertain if the set offset is considered if i do this based on an event???
2020-03-28 22:17:34.028 [vent.ItemStateChangedEvent] - LocalSun_CivilDusk_StartTime changed from 2020-03-28T18:19:00.000+0100 to 2020-03-28T17:34:00.000+0100
rule "PvXL_SwitchHouseNr_Switch OFF via Sunset"
when
Channel 'astro:sun:local:civilDusk#event' triggered START
then
PvXL_Switch.sendCommand(OFF)
end
What usually confuses people with the Astro binding is that state channels and events channels are completely different channels.
As such, they each have completely different offset and range settings.
Applying an offset to a āduskā state channel will have no effect on a āduskā event channel.
So an Item would be linked to a state channel.
while your rule is triggered from an event channel.
Youāve not shown us whatever you did with offsets, so I have to guess that you offset the state channel only.
Itās always difficult messing with astro settings as you might not get results for 24 hours, events for day ahead are calculated once at midnight.
Long story shortā¦based on my offset setting for element (whatever its called correctly)ā¦will it work based on my rule above (to take my offset into consideration and not stay on zero offset).
I donāt know, I donāt use PaperUI for this stuff so I donāt recognize which channel youāre tweaking there.
For an event trigger, you want to be tweaking the Range Event channel that is the same one you use for a rule trigger.
hm, somehow it does not take the offset correctly as you already mentioned aboveā¦
What i see is that the āitemā i created works properly and based on my offset. LocalSun_CivilDusk_StartTime changed from 2020-03-30T19:22:00.000+0200 to 2020-03-30T18:37:00.000+0200
Can you please tell me how i would define a rule that triggers when my item reached its timeā¦compared to what i have right nowā¦from the rule above. thanks!!!
sorry but still i do not make it right and it confuses me even more every day.
Iām on Civil Dusk for my Cityā¦
It seems whatever i change the offset for āastro:sun:local:civilDusk#startā it has no impact to the rule i do on āChannel āastro:sun:local:civilDusk#eventā triggered STARTā.
Should this channel take offsets into account or do i need anything put into this rule in order to work as it shouldā¦whatever i change in the offsetā¦it perfectly reflects immediately in āitemsā based on this Channel, but the channel rule itself always triggers without any offset?
That is correct.
You would want to change the offset for āastro:sun:local:civilDusk#eventā
States are not events.
They have different channels.
They have different offsets.
civilDusk#start is a state channel.
You can set an offset on that, it will not affect the events.
civilDusk#eventā is an event channel.
You can set an offset on that, it will not affect the states.