I want to use astro to switch on/off a light at sunrise/sunset

With a clean installation of openhab3, I try to create a trigger to switch on a light, but after installing Astro binding, and adding sun thing:

UID: astro:sun:sol
label: Sol
thingTypeUID: astro:sun
configuration:
  useMeteorologicalSeason: false
  interval: 300
  geolocation: XX.XXXXXXXXXXXXX,Y.YYYYYYYYYYYYY

when I try to create a channel, I can’t because There is no profile available for the selected item.
Should I install/enable something else? Should my Astro group be of special type?

Thanks in advance

You misunderstood the astro binding and the information available.
the sun raise event is a trigger channel, that can be used directly in rules, without the need to create additional items.
Creating the rule, select the trigger even with value „START“ and the rule will fire when sunrise starts.

It worked! Thanks a lot.

Hi,
I have just upgraded from OH2.5 to an all GUI OH3.2.4, which is running fine except for the Sunrise and Sunset Triggers. Searching for help led to this post from Sep 2022 showing Trigger:
image
Could you please let me know how to navigate to and build this Trigger.
I have loaded the Astro Sun Data Thing, but so far I have only found this type of trigger:
image

My current Item is:

  DateTime SunriseStart_Time   { channel="astro:sun:xxUIDxx:rise#start" }

My aim is also to advance and delay the Rise and Set time by 20 min.
Can you give me a hint, please.

You need to add a thing trigger to your rule, trigger channels are not linked to items.
This is written on the second line of your first screenshot.

Thanks for your time,
That is understood and trigger found, but how can I now delay or advance the trigger by +/- n minutes?

This can be done in the chanel configuration and is also in the astro binding docs.

Which seems to wasted when I see you are asking again in another topic :frowning:

Thanks Greg, perfect!! :slightly_smiling_face:

1 Like

All,

I am no so new to OH3 actually, but still have a very hard time understanding the astro trigger (giving my neighbor good laughs about weird times that our terrace lights switch on and off).

So I installed the astro binding. I have actually no “plus30” binding as in the example.

What I’d like to do in this rule is to switch on/off the lights when it is daylight outside starts/stops (see below).

Is this the recommended way of doing it?

Thanks,

Max


configuration: {}
triggers:

  • id: “1”
    configuration:
    time: 19:00
    type: timer.TimeOfDayTrigger
  • id: “6”
    configuration:
    thingUID: astro:sun:19c7b2f15b
    event: END
    channelUID: astro:sun:19c7b2f15b:daylight#event
    type: core.ChannelEventTrigger
    conditions: []
    actions:
  • inputs: {}
    id: “2”
    configuration:
    command: ON
    itemName: LichtStromEingang_Relay1_Output
    type: core.ItemCommandAction
  • inputs: {}
    id: “3”
    configuration:
    command: ON
    itemName: LichtTerrasseGarage_Power
    type: core.ItemCommandAction
  • inputs: {}
    id: “4”
    configuration:
    command: ON
    itemName: LichtTerrasseHaupt_Power
    type: core.ItemCommandAction
  • inputs: {}
    id: “5”
    configuration:
    command: ON
    itemName: StromTerrasse_Power
    type: core.ItemCommandAction

configuration: {}
triggers:

  • id: “1”
    configuration:
    time: 19:00
    type: timer.TimeOfDayTrigger
  • id: “6”
    configuration:
    thingUID: astro:sun:19c7b2f15b
    event: END
    channelUID: astro:sun:19c7b2f15b:daylight#event
    type: core.ChannelEventTrigger
    conditions: []
    actions:
  • inputs: {}
    id: “2”
    configuration:
    command: ON
    itemName: LichtStromEingang_Relay1_Output
    type: core.ItemCommandAction
  • inputs: {}
    id: “3”
    configuration:
    command: ON
    itemName: LichtTerrasseGarage_Power
    type: core.ItemCommandAction
  • inputs: {}
    id: “4”
    configuration:
    command: ON
    itemName: LichtTerrasseHaupt_Power
    type: core.ItemCommandAction
  • inputs: {}
    id: “5”
    configuration:
    command: ON
    itemName: StromTerrasse_Power
    type: core.ItemCommandAction

You could use the do only if not daylight like here: