Astro-binding; trigger latest & earliest daylight/night

Maybe it doesn’t make sense for rise#event to have a START and an END trigger. But with daylight#event it absolutely makes sense. And the event channel does not consider both events when setting boundaries… :wink:

As I don’t know the english equivalent: Tja… :wink:

1 Like

Hi,

During start i’m getting and exceptios with Astro with the latest snapshots

[ERROR] [org.eclipse.smarthome.binding.astro ] - [org.eclipse.smarthome.binding.astro.internal.discovery.AstroDiscoveryService(17)] The activate method has thrown an exception
java.lang.IncompatibleClassChangeError: Expected static field org.eclipse.smarthome.binding.astro.internal.discovery.AstroDiscoveryService.scheduler

Anyone has it?

Hi,
sorry to use this thread after 12 month quietness, but my topic relates exactly to the answer given by Udo… sorry Udo :wink:
I implemented the Astro binding and it worked very well. Now I try to trigger my rollershutters with the binding. But I need to have an offset and an earliest recognition. Therefore I implemented your suggestion above combined with the astro binding docs to get this. Unfortunately without success.

See my config:

Astro.things

astro:sun:home  [ geolocation="52.5200066,13.4049540,100", interval=60 ]
	{
	Channels: 
		Type rangeEvent : civilDawn#event  [
                      offset=70,
                      earliest="06:45",
                      latest="08:00"
                 ]
    	        Type rangeEvent : civilDusk#event  [
                      offset=-60,
                      earliest="16:30",
                      latest="22:00"
                ]
	}

rollershutter.rules

rule "open blinds"
	when
		Channel "astro:sun:home:civilDawn#event" triggered START
	then
		logInfo("REGWZGF", "Astro opens blinds")
		Rollo_EG_WZ_GFenster_position.sendCommand(0)
end

rule "close blinds"
	when
		Channel "astro:sun:home:civilDusk#event" triggered START
	then
		logInfo("REGWZGF", "Astro closing blinds")
		Rollo_EG_WZ_GFenster_position.sendCommand(100)
end

The blinds opening exactly at civildawn#event start and closing at civildusk#event start without recognition of offset and earliest…

Hope somebody is able to point me to the light in the darkness.

You seem to have 2 rules with the same name (Update NightState ON), I guess that won’t work (and should give you errors in the log)

Hi Marco,
thanks for the fast reply!
Unfortunately I do not get your point “2 rules with same name”… They are named differently
In addition to this, no errors in the log, since the rule works (but without recognition of offset and earliest).
So the rule fires exactly at civildawn and civildusk time (apparently in the logs).

I replied to binderth’s post, not yours :slight_smile:

but to help you: i guess you need to have ‘start’ and/or ‘end’ in your things file instead of ‘event’.

astro:sun:home  [ geolocation="52.5200066,13.4049540,100", interval=60 ]
	{
	Channels: 
		Type rangeEvent : civilDawn#start  [
                      offset=70,
                      earliest="06:45",
                      latest="08:00"
                 ]
    	        Type rangeEvent : civilDusk#end  [
                      offset=-60,
                      earliest="16:30",
                      latest="22:00"
                ]
	}
1 Like

Thanks for the heads-up!
…I’ll procrastinate my further digging into this after I’d fork my OH2-installations. I’d like to have a “stable-not-touch” version for all Basic functionality - and one more “experimental” one, which I could test some new approaches and bindings.

Thing is - even if the rules won’t work - the channels won’t change like described in the thing file (at least in my test last year). If the channels change - the rules are just the switching of items.

I’ll try to have a look on them as time passed by now! :wink:

hmm… I’ll have another look in the logs for that. As described in #9 I have multiple #start and #end and #event in my Things-file - so I’ll check on that.

Nope, please see for reference the documentation:

Please also take a look at Paper UI. You can see your thing and the channels.
My configuration (all text based)

Thing astro:sun:home "Sonne" @ "zuhause" [geolocation="49.91285478947813,8.661610652274543,130", interval=300] {
    Channels:
        Type rangeEvent : civilDawn#event  [
            offset=10,
            earliest="06:00",
            latest="08:00"
        ]
}

and the corresponding event channel in Paper UI:

As you can see, the values are correctly configured. But to be honest, I never checked if the event is triggered at the correct moment. :blush:

Hi,
my configuration as well is text based.
I checked the corresponding event channel in Paper UI, there are the correct entries found…
Had I made a mistake in the rules files? :thinking:

nope. please read the intro of openHAB, the rules have nothing to do with items and/or channels and or AddOns. The rules work with channels or items and define actions or calculations based on status on that entities.

so, if you have no entries in PaperUI for channels, this means you’ll most likely have errors in the definition of your channels. After writing the .Things files you should see entries in your logs.

Hi Thomas,
I think there is a total misunderstanding here (or I misspelled, sorry for my english).
My configuration is file based (old fashioned :wink: ) and PaperUI shows it correct (thanks Udo for pointing me to the crosscheck in PaperUI)!. Therefore I assume that the Channel event is configured correctly.
The other party in the game are the rules. Therefore I asked for mistakes there…
May I use the wrong trigger or stuff like that…

1 Like

Additionally to show the corresponding event in Paper UI:


My rule “open blinds” fires at 6:13 am (today) which is way before the setting for “earliest”…

ok - then if you see the configuration in the PaperUI and you just don’t get the reactions from the rules, it could be, that either you have indeed the wrong triggers - or you experience the same behaviour as I did. If I’m home and find time, I’ll check my config for the Outcome.

edit: after seeing your screenshot it seems you have the same “bug” or “feature” that I do. The channel triggers won’t correspond with the thing-definition

So did you check the real trigger time (i.e. astro:sun:home:civilDawn#start)? At which time should the channel trigger for real?

Hi Udo, Thomas,
I write it with a smile in my face:
Thank you for your support and really fast answers guys!
In the meantime it looks like it is working… May a reboot of today has done the job…
Will watch for the next days.

I´ll come back if it is not working at the end. Thanks again!

BTW: its not a Windows machine... its a Rasberry :wink:

Hi all,
I know, this topic is a bit older, but I wonder if I missed something in this conversation. I have experienced a strange behavior of my configuration:
astro:sun:home [ geolocation="53.49010302943347,10.32189222449969", interval=60 ] { Channels: Type start : rise#start [ offset=1, latest="08:00" ] }
On my paper UI the offset is visible, the “latest” entry remains empty.
What did I do wrong?

Thanks for your help,
Thomas