Astro Binding OH3

Hey, since using OH3 I get this Error from the Astro Binding ERROR] [o.internal.handler.AstroThingHandler] - Can’t update state for channel astro:sun:local:season#timeLeft : null

I‘m not using the local:season#timeLeft and it is not linked.

Some ideas to solve the problem

Thanks

What OH3 version exactly?

It works fine for me with no errors on the Stable release with a Docker install.

Does that apply to OH 3 too?

Yes

1 Like

Thanks!

Than I will wait

Another Bug in the Astro Binding is the Zodiac .
Virgo is now displayed and not Capricorn.

Is this bug back again in OH3.2.M2? I have activated the timleft channel and get update of timeleft only when I deactivate and activate the astro thing, but not in normal operation.
Or do I have to consider something additional?

I still have a problems using astro sun rise and sun set with offset things and rules.
I am using OpenHab 3.1.0!

I created an astro thing:
astro:sun:home1 “Sun_plus30”[ geolocation=“51.49073114618457,3.911122083663941”, interval=60 ] {
Channels:
Type rangeEvent : rise#start [
offset=23,
latest=“08:30”
]
}

Then I created a rule which should react on the channel:

rule “Zon op rule home1 na 30 min.”
when
Channel ‘astro:sun:home1:rise#event’ triggered START
then
executeCommandLine(Duration.ofSeconds(5),"/var/lib/openhab/print_cmd.sh",“het is 30 minuten na zonsopkomst.”)
logInfo(“write text1”, “text geschreven in eigen file /etc/openhab/html/test.txt: het is 30 minuten na zonsopkomst.”)
end

The rule gest triggerd on the original sun:rise#event, and not on the astro:sun:home1:rise#event:

I Use the event.log and openhab.log to check when the rule gets triggerd.
openhab.log:
2021-09-21 07:30:00.073 [INFO ] [penhab.core.model.script.write text1] - text geschreven in eigen file /etc/openhab/html/test.txt: het is 30 minuten na zonsopkomst.

events.log:
2021-09-21 07:30:00.002 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:home2:rise#event triggered START
2021-09-21 07:30:00.003 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:home2:civilDawn#event triggered END
2021-09-21 07:30:00.005 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:home1:rise#event triggered START
2021-09-21 07:30:00.009 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:home1:civilDawn#event triggered END
2021-09-21 07:30:00.011 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:local:civilDawn#event triggered END
2021-09-21 07:30:00.014 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:local:rise#event triggered START

Here you can see that all start events arr triggerd on the same time! NO OFFSET is USED!!!

Where do I go wrong!!!
Please help out!

looking to the examples in the documentation the offset is defined either for

Type rangeEvent : rise#event

or for

Type start : rise#start

When are you expecting an update? Have you set interval?

I have altered the trigger event from:
Type rangeEvent : rise#start [
in
Type start : rise#start [

I’ll look into it tomorrow, and let you know if that works!

That’s not for a trigger event, that will effect the static state channel.

According to:
[SOLVED] Sunset event with offset on wrong time - Setup, Configuration and Use / Scripts & Rules - openHAB Community

The thing config should look like:
astro:sun:SchinMin30 [ geolocation=“51.1222,5.875652” ] {
Channels:
Type start : set#start [
offset=-30
]
Type rangeEvent : set#event [
offset=-30
]
}

So I have used this as the basis for my things file!

astro:sun:UpHomePlus30  [ geolocation="51.49073114618457,3.911122083663941", interval=60 ] {
    Channels:
        Type start : rise#start [
            offset=30
        ]

        Type rangeEvent : rise#event [
            offset=30
        ]
}

Rule:

rule "UpHomePlus30_rule"
when
    Channel 'astro:sun:UpHomePlus30:rise#event' triggered START
then
    executeCommandLine(Duration.ofSeconds(5),"/var/lib/openhab/print_cmd.sh","UpHomePlus30: is triggered.")
          logInfo("write text1", "text geschreven in eigen file /etc/openhab/html/test.txt: UpHomePlus30: is triggered.")
end

Will see tomorrow what happend!

Yes, interval is set on 300s as default.

The last updated item config did the trick.
offset triggers now on the right time!

1 Like