OH3: Astro trigger channel not working

I am trying to make my rollershutters auto close 1h after sunset.
The astro item is already configured with an offset of 60 mins.

But the rule is just not working if I use the trigger channel instead of a cron time.
To test the rule I always adjust the “latest time option” of the trigger channel.

triggers:
  - id: "0"
    configuration:
      thingUID: astro:sun:local
      event: END
      channelUID: astro:sun:local:set#event
    type: core.ChannelEventTrigger
conditions: []
actions:
  - inputs: {}
    id: "1"
    configuration:
      itemName: SHELLYROLLEREG01_Steuerung0offen100geschlossen
      command: DOWN
    type: core.ItemCommandAction

Tell us more about this part. You apply can Astro offsets to channels. State type channels (that can be linked to Items) are distinct from trigger event channels. Each has its own independent offsets.

And then, Astro performs it calculations at midnight or at boot time. Changes in Things may not take effect until next day.

I did it here.
I think the changes take affect imidiately, since the offset was applied to the time that is shown in the item, once I hit save on the channel settings.

Astro channel offsets for state (Item) channels are separate from trigger (event) channels.
So what you see in your Item state is completely unrelated to trigger events. Tell us more about the offsets that you have applied to the trigger channel.

I only changed the offset from 0 to 60. Nothing else I changed there.

astro:sun:local:set#end is a DateTime state channel, that you can link to an Item.
Applying an offset to that channel will not in any way affect the trigger channel astro:sun:local:set#event, which has its own independent offsets.

The Thing astro:sun:local:set has a whole collection of channels - #start, #end are DateTime state types that you can link to DateTime Items, #duration is a Number:Time state type, #event is a trigger that fires with START or END payloads and cannot be linked to an Item but can trigger rules.
The offsets apply to the channels, not the Thing.

This I know.
I think I understood everything correctly.
But still the trigger in the rule is not working.


Your trigger is changed to astro:sun:local:rise#event now, has that event happened yet?

Sorry it was meant to be astro:sun:local:set#event.
But still it is not working. I will see if it works today.
I even restarted the whole server.

EDIT:
As you can see here I also definded the correct event.

You can reassure yourself by looking in your events.log to see if and when events have previously taken place.

Note that astro:sun:local:set#event will actually generate two events, a START and an END, you’ve selected the END for your rule now.

Yes I know, that is exactly how I want it to be.
However it seems that the channel offset time is not taken into account.
It should be delayed by 60 mins.
The item I created also shows the delayed time.

2021-04-06 19:45:00.704 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:local:set#event triggered START
...
2021-04-06 19:49:00.703 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:local:set#event triggered END
2021-04-06 19:49:00.707 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'SHELLYROLLEREG01_Steuerung0offen100geschlossen' received command DOWN
2021-04-06 19:49:00.712 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'SHELLYROLLEREG02_Steuerung0offen100geschlossen' received command DOWN
2021-04-06 19:49:00.714 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'SHELLYROLLEREG03_Steuerung0offen100geschlossen' received command DOWN
2021-04-06 19:49:00.716 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'SHELLYROLLEREG04_Steuerung0offen100geschlossen' received command DOWN
2021-04-06 19:49:00.719 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'SHELLYROLLEREG05_Steuerung0offen100geschlossen' received command DOWN
2021-04-06 19:49:00.721 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'SHELLYROLLEROG01_Steuerung0offen100geschlossen' received command DOWN
2021-04-06 19:49:00.724 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'SHELLYROLLEROG02_Steuerung0offen100geschlossen' received command DOWN

You have not yet shown us the offset that you applied to the event channel. I’m not yet convinced you understand, the only offset you have shown us applies to one of the state channels and does not affect the time the event channel fires.

Those multiple commands in your events.log are a bit weird though? Have you ended up with multiple rules here?

Where do I find that setting in the WebUI?

No not really, I just have several roller shutters.

I don’t know, I don’t use MainUI. I assume if you look down the list of channels belonging to your Astro sun local Thing, you should see the events channels. There may be an ‘more’ button or something to get at them.

Okay I found the relevant config file.
/var/lib/openhab3/jsondb/org.openhab.core.thing.Thing.json

        {
          "acceptedItemType": "DateTime",
          "kind": "STATE",
          "uid": {
            "segments": [
              "astro",
              "sun",
              "local",
              "set#end"
            ],
            "uid": "astro:sun:local:set#end"
          },
          "channelTypeUID": {
            "segments": [
              "astro",
              "end"
            ],
            "uid": "astro:end"
          },
          "label": "Endzeit",
          "description": "Die Endzeit des Ereignisses",
          "configuration": {
            "properties": {
              "offset": 60,
              "earliest": "00:00",
              "latest": "00:00"
            }
          },
          "properties": {},
          "defaultTags": [],
          "autoUpdatePolicy": "DEFAULT"
        },

Is that the right place?

Probably. I wouldn’t advise editing that by hand, with no example events channel even.

Is there really no events channels shown in MainUI? I can see in earlier screenshot of yours, looking at Astro Thing channels, it shows a Range Event called rise#event. You’re looking to edit Range Event called set#event.

AHHHHHH. Yes! That should be it.
grafik
grafik

EDIT:
Working as expected. Many thanks @rossko57 !