Problem setting altitude for Astro Binding

I have set up the astro binding as described here: http://docs.openhab.org/addons/bindings/astro/readme.html#full-example

astro:sun:home  [ geolocation="52.5200066,13.4049540,100", interval=60 ]

Unfortunetely I get an error in the log:

2017-07-21 11:06:33.197 [ERROR] [ding.astro.handler.AstroThingHandler] - Astro parameters geolocation could not be split into latitude and longitude, disabling thing 'astro:sun:home'

Reading this forum, I found a different way to set altitude:

astro:sun:home [ geolocation="52.5200066,13.4049540", altitude=100, interval=60 ]

This doesn’t create an error, but does not seem to have any effect on the times for sunrise and sunset (even when using extreme altitude of 1000).

So:

  • Is the example in the binding documentation wrong and should be updated?
  • Does the altitude setting work at all?

Which version of OH2 do you use?

I don’t think that an altitude of 1000 would be “extreme” either. :wink:

Version should be 2.0.0-1 (installed from the stable PPA).

@clel What do you get when you type bundle:list in karaf console. Can you see the following in PaperUI --> Configuration --> System?

The geolocation was changed/added on about 20th June. See here: Link

If you have an older version, then

astro:sun:home [ geolocation="52.5200066,13.4049540", altitude=100, interval=60 ]

is correct.

If you have a newer version, then it should be enough to fill in the geolocation in PaperUI --> Configuration --> System --> Regional Settings…

…but you also can use:

astro:sun:home  [ geolocation="52.5200066,13.4049540,100", interval=60 ]

That is probably the reason. I just upgraded to version 2.1 via packet manager.

Now I also have the location under regional settings and I can use

astro:sun:home  [ geolocation="52.5200066,13.4049540,100", interval=60 ]

Unfortunately changing altitude has no effect on sunrise and sunset time (even with more extreme values like 1800000000000).

@clel
Yes, there is no difference with an other altitude. No changes at my location (changed altitude from 240 m to 6000 m).
But “normally” it should change only 60 sec (earlier or later) each 1500 m. See here: Link

That means, if you are living on Mont Blanc (4810 m) or even on Mount Everest (8848 m) it will make a difference of about 3 minutes (Mont Blanc) and about 6 minutes (Mount Everest)… :smiley:

Alright. But nevertheless this should either get fixed/implemented or there should be a hint that altitude is not used, because it has almost no effect. Currently I thought this was a bug (maybe it even is) because the documentation page uses altitude.

Yes, it would be nice to have (in my opinion). I can imagine that altitude has an effect on sun elevation angle. Have you checked it?

No, I only checked rise and set (the only relevant values for me right now).

@clel
But if this will be corrected, then the times shouldn’t be rounded:

Sunrise_Time changed from NULL to 2017-07-21T05:38:00.000+0200
Sunset_Time changed from NULL to 2017-07-21T21:16:00.000+0200

Maybe you should better ask the developer of this binding: @gerrieg

From official documentation:

The altitude segment is optional and sharpens results provided by the Radiation group.

Radiation Group is:

group radiation

channel
    direct, diffuse, total (Number)

So no difference in duration…

Ah, ok. So then everything works just as explained, thanks for looking that up.