Problem with Astro binding

Hi.
Some days ago i started to play with openHAB. It took some time to get the actual Raspian running on my RPi2, but now i have the KNX bindng running. The next step is to control the Rollershutter using the Astro binding, but it refuses to work so i need a little help please.

My configuration:
openHAB v1.8.0 on RPi2
org.openhab.binding.astro-1.8.0.jar is in the addons directory
openhab.cfg
################################# Astro Binding #######################################

The latitude

#astro:latitude=51.xxxxxx

The longitude

#astro:longitude= 6.xxxxxx

Refresh interval for azimuth and elevation calculation in seconds

(optional, defaults to disabled)

astro:interval=120

I put some test lines in the items file:
String Sonnenuntergang ‚ÄúSonnenuntergang [%1$tH:%1$tM]‚ÄĚ (EG_Kueche) { astro=‚Äúplanet=sun, type=rise, property=end‚ÄĚ }
String Sonnenuntergang2 ‚ÄúSonnenuntergang2 [%s]‚ÄĚ (EG_Kueche) { astro=‚Äúplanet=sun, type=rise, property=end‚ÄĚ }
String Nautic_Dusk_Duration_Str ‚ÄúNautische Abendd√§mmerung (Dauer) [%s]‚ÄĚ (EG_Kueche) { astro=‚Äúplanet=sun, type=nauticDusk, property=duration‚ÄĚ}

The all appear in the classic UI but without any numbers. I enabled debug Output This is printed out:
2016-02-02 20:50:36.360 [DEBUG] [.a.internal.bus.AstroActivator] - Astro binding has been started.
2016-02-02 20:50:36.432 [DEBUG] [i.internal.GenericItemProvider] - Start processing binding configuration of Item ‚ÄėSonnenuntergang (Type=StringItem, State=Uninitialized)‚Äô with ‚ÄėAstroGenericBindingProvider‚Äô reader.
2016-02-02 20:50:36.502 [DEBUG] [.b.AstroGenericBindingProvider] - Adding item Sonnenuntergang with AstroBindingConfig[planet=sun,type=rise,property=end]
2016-02-02 20:50:36.503 [DEBUG] [i.internal.GenericItemProvider] - Start processing binding configuration of Item ‚ÄėSonnenuntergang2 (Type=StringItem, State=Uninitialized)‚Äô with ‚ÄėAstroGenericBindingProvider‚Äô reader.
2016-02-02 20:50:36.506 [DEBUG] [.b.AstroGenericBindingProvider] - Adding item Sonnenuntergang2 with AstroBindingConfig[planet=sun,type=rise,property=end]
2016-02-02 20:50:36.508 [DEBUG] [i.internal.GenericItemProvider] - Start processing binding configuration of Item ‚ÄėNautic_Dusk_Duration_Str (Type=StringItem, State=Uninitialized)‚Äô with ‚ÄėAstroGenericBindingProvider‚Äô reader.
2016-02-02 20:50:36.510 [DEBUG] [.b.AstroGenericBindingProvider] - Adding item Nautic_Dusk_Duration_Str with AstroBindingConfig[planet=sun,type=nauticDusk,property=duration]

Thats all. Any help is appreciated.

Should be:

DateTime Sonnenuntergang ‚ÄúSonnenuntergang [%1$tH:%1$tM]‚ÄĚ (EG_Kueche) { astro=‚Äúplanet=sun, type=rise, property=end‚ÄĚ }
DateTime Sonnenuntergang2 ‚ÄúSonnenuntergang2 [%s]‚ÄĚ (EG_Kueche) { astro=‚Äúplanet=sun, type=rise, property=end‚ÄĚ }
Number
Nautic_Dusk_Duration_Str ‚ÄúNautische Abendd√§mmerung (Dauer) [%s]‚ÄĚ
(EG_Kueche) { astro=‚Äúplanet=sun, type=nauticDusk, property=duration‚ÄĚ}

I changed to DateTime, but in the UI the result is the same, Sonnenuntergang -:-
There must be another problem.

When you edit the .items file these are in, do you see this statements in the log?

 2016-02-03 12:57:41.122 [INFO ] [.b.a.internal.job.JobScheduler] - Scheduled a daily job at midnight for astro calculation

There are two Astro jar files, one for the action and one for the binding. Make sure you have org.openhab.binding.astro-1.8.0.jar in your addons folder. If you only have org.openhab.action.astro-1.8.0.jar you have the wrong jar file. Having both is fine.

Here is an example of a couple of working Astro Items.

Switch          Twilight_Event                                                          (Weather)       { astro="planet=sun, type=set, property=start, offset=-90" }
DateTime    Twilight_Time   "Twilight [%1$tr]"  <moon>  (Weather)       { astro="planet=sun, type=set, property=start, offset=-90" }
Switch      Sunset_Event                                (Weather)   { astro="planet=sun, type=set, property=start" }
DateTime        Sunset_Time             "Sunset [%1$tr]"        <moon>  (Weather)       { astro="planet=sun, type=set, property=start" }
Switch          Sunrise_Event                                                           (Weather)       { astro="planet=sun, type=rise, property=start" }
DateTime        Sunrise_Time    "Sunrise [%1$tr]"       <sun>   (Weather)       { astro="planet=sun, type=rise, property=start" }

org.openhab.binding.astro-1.8.0.jar is in the addons Directory.
There is no JobScheduler entry in the log file.
I tested your working items, this is the result.

Hmmm. Something is wrong with the binding then.

Did you install via apt-get (highly recommended)? If so, try removing and reinstalling the astro binding. If not delete the astro binding from addons and redownload the addons and copy this newly downloaded one in the addons directory.

Yes, i used apt-get. I used this turorial.


I updated to v1.8.1 five minutes ago but with the same result.

Try using only 1 item per individual function from the Astro binding. Nothing worked when I set up one item for sunset minus 20 minutes and another for sunset minus 40 minutes. Deleting one of them made the other work so I used createTimer to trigger the additional item.

That is odd. In my Items (copied in above) I have two items associated with sunset and they both work. It is not at all clear what is going on here.

1 Like

I tried it anyway with only this item
DateTime Sunrise_Time2 ‚ÄúSunrise [%1$tr]‚ÄĚ (EG_Kueche) { astro=‚Äúplanet=sun, type=rise, property=start‚ÄĚ }
but with the same result. No output,

At this point what I would do is uninstall everything OH and reinstall. It makes no sense to me that it isn’t working but the fact that you do not see some expected log statements from the Astro binding leads me to believe the problem is with the binding, not your Items or Sitemap.

I only installed a clean Raspian Image , update, upgrade and OH 1.8.0
Then i updated to 1.8.1, that¬īs all. There should be no reason to do all this again.
Maybe it is a Linux Problem.
Do i have to have a cron message in the log?

All you should see in your log is:

2016-02-06 07:00:23.583 [INFO ] [.b.a.internal.bus.AstroBinding] - AstroConfig[latitude=53.xxxxx,longitude=7.yyyyyy,interval=3600,systemTimezone=Europe/Berlin (MEZ +0100),daylightSavings=false]
2016-02-06 07:00:26.630 [INFO ] [.b.a.internal.job.JobScheduler] - Scheduled a daily job at midnight for astro calculation

No. I dont have any of this lines. The only ones depanding on Astro are:
2016-02-06 14:35:00.852 [DEBUG] [.a.internal.bus.AstroActivator] - Astro binding has been started.
2016-02-06 14:35:00.943 [DEBUG] [i.internal.GenericItemProvider] - Start processing binding configuration of Item ‚ÄėSunrise_Time2 (Type=DateTimeItem, State=Uninitialized)‚Äô with ‚ÄėAstroGenericBindingProvider‚Äô reader.
2016-02-06 14:35:01.023 [DEBUG] [.b.AstroGenericBindingProvider] - Adding item Sunrise_Time2 with AstroBindingConfig[planet=sun,type=rise,property=start]

That¬īs it.

Do you have the astro action AND astro binding in your addons folder?
I read a post a while ago where that caused problems, so you could try to put just the astro binding in your addons folder and remove the astro action …

I found the Problem. In the cfg file the lat/lon values had the comment (#) at the beginning of the line. After removing it, everything works fine. I have no idea how this could happen, because the text in my first post war directly copied form the cfg file und i am sure that i removed them.

Sorry for the noise.
Thanks to all who tried to figure out my problem, which was as often in front of the Monitor :slightly_smiling:

Happens to me a couple of times a week :grinning:

Glad it’s working, have fun.