Astro Binding gets not initialized

I’m running OpenHAB 2.1 on my Raspi.
Yesterday, I installed the Astro-Binding for some future projects. Currently, I like just to get some information out of it.

The items definition is following the Astro example: Astro Items+Sitemap+Map+♈ Binding Example

But, the values for Sunset and Sunrise do contain NULL values only and get not updated. I don’t find any reason for this … Someone may had a similar issue?

Can you share what you see in your openhab.log?
Is the Astro binding started (Karaf console)?

Here we are:

karaf console:

192 | Active   |  80 | 0.9.0.b5               | Astro Binding

Astro Binding (192) provides:
-----------------------------
[org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory]
[org.eclipse.smarthome.config.discovery.DiscoveryService]

items definition:

DateTime Sunrise_Time       "Sonnenaufgang [%1$tH:%1$tM]" <sun> { channel="astro:sun:home:rise#start" } 
DateTime Sunset_Time        "Sonnenuntergang [%1$tH:%1$tM]" <sun>  { channel="astro:sun:home:set#start" }

openhab.log

2017-11-23 18:12:37.728 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'astro:sun:local' to inbox.
2017-11-23 18:12:37.739 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'astro:moon:local' to inbox.
2017-11-23 18:12:43.042 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-binding-astro': Error restarting bundles
2017-11-23 18:14:27.977 [INFO ] [ding.astro.handler.AstroThingHandler] - Scheduled astro job-daily-moon at midnight for thing astro:moon:local
2017-11-23 18:14:28.110 [INFO ] [thome.binding.astro.internal.job.Job] - Scheduled Astro event-jobs for thing astro:moon:local
2017-11-23 18:14:31.741 [INFO ] [ding.astro.handler.AstroThingHandler] - Scheduled astro job-daily-sun at midnight for thing astro:sun:local
2017-11-23 18:14:31.847 [INFO ] [thome.binding.astro.internal.job.Job] - Scheduled Astro event-jobs for thing astro:sun:local
2017-11-23 18:17:41.958 [INFO ] [ding.astro.handler.AstroThingHandler] - Scheduled astro job-daily-moon at midnight for thing astro:moon:local
2017-11-23 18:17:42.009 [INFO ] [thome.binding.astro.internal.job.Job] - Scheduled Astro event-jobs for thing astro:moon:local
2017-11-23 18:18:18.769 [INFO ] [ding.astro.handler.AstroThingHandler] - Scheduled astro job-daily-sun at midnight for thing astro:sun:local
2017-11-23 18:18:18.888 [INFO ] [thome.binding.astro.internal.job.Job] - Scheduled Astro event-jobs for thing astro:sun:local
2017-11-23 18:28:00.425 [INFO ] [ding.astro.handler.AstroThingHandler] - Scheduled astro job-daily-moon at midnight for thing astro:moon:local
2017-11-23 18:28:00.494 [INFO ] [thome.binding.astro.internal.job.Job] - Scheduled Astro event-jobs for thing astro:moon:local
2017-11-23 18:28:11.624 [INFO ] [ding.astro.handler.AstroThingHandler] - Scheduled astro job-daily-sun at midnight for thing astro:sun:local
2017-11-23 18:28:11.675 [INFO ] [thome.binding.astro.internal.job.Job] - Scheduled Astro event-jobs for thing astro:sun:local
2017-11-23 18:38:09.375 [INFO ] [ding.astro.handler.AstroThingHandler] - Scheduled astro job-daily-sun at midnight for thing astro:sun:local
2017-11-23 18:38:09.916 [INFO ] [thome.binding.astro.internal.job.Job] - Scheduled Astro event-jobs for thing astro:sun:local
2017-11-23 18:38:10.287 [INFO ] [ding.astro.handler.AstroThingHandler] - Scheduled astro job-daily-moon at midnight for thing astro:moon:local
2017-11-23 18:38:10.345 [INFO ] [thome.binding.astro.internal.job.Job] - Scheduled Astro event-jobs for thing astro:moon:local
2017-11-23 18:38:10.883 [INFO ] [ding.astro.handler.AstroThingHandler] - Scheduled astro job-daily-sun at midnight for thing astro:sun:local
2017-11-23 18:38:10.969 [INFO ] [thome.binding.astro.internal.job.Job] - Scheduled Astro event-jobs for thing astro:sun:local
2017-11-23 18:38:11.161 [INFO ] [ding.astro.handler.AstroThingHandler] - Scheduled astro job-daily-moon at midnight for thing astro:moon:local
2017-11-23 18:38:11.188 [INFO ] [thome.binding.astro.internal.job.Job] - Scheduled Astro event-jobs for thing astro:moon:local
2017-11-24 00:00:00.158 [INFO ] [thome.binding.astro.internal.job.Job] - Scheduled Astro event-jobs for thing astro:moon:local
2017-11-24 00:00:00.258 [INFO ] [thome.binding.astro.internal.job.Job] - Scheduled Astro event-jobs for thing astro:sun:local
2017-11-24 09:30:13.434 [INFO ] [ding.astro.handler.AstroThingHandler] - Scheduled astro job-daily-sun at midnight for thing astro:sun:local
2017-11-24 09:30:13.559 [INFO ] [thome.binding.astro.internal.job.Job] - Scheduled Astro event-jobs for thing astro:sun:local
2017-11-24 09:30:41.887 [INFO ] [ding.astro.handler.AstroThingHandler] - Scheduled astro job-daily-moon at midnight for thing astro:moon:local
2017-11-24 09:30:41.910 [INFO ] [thome.binding.astro.internal.job.Job] - Scheduled Astro event-jobs for thing astro:moon:local	

Some information from the events.log

2017-11-23 18:38:07.430 [ItemChannelLinkAddedEvent ] - Link 'Sunrise_Time-astro:sun:home:rise#start' has been added.
2017-11-23 18:38:07.433 [ItemChannelLinkAddedEvent ] - Link 'Sunset_Time-astro:sun:home:set#start' has been added.
2017-11-23 18:38:07.436 [ItemChannelLinkAddedEvent ] - Link 'Azimuth-astro:sun:home:position#azimuth' has been added.
2017-11-23 18:38:07.439 [ItemChannelLinkAddedEvent ] - Link 'Elevation-astro:sun:home:position#elevation' has been added.
2017-11-23 18:38:07.443 [ItemChannelLinkAddedEvent ] - Link 'MoonPhase-astro:moon:home:phase#name' has been added.
2017-11-23 18:38:08.848 [ThingAddedEvent           ] - Thing 'astro:sun:local' has been added.
2017-11-23 18:38:08.922 [hingStatusInfoChangedEvent] - 'astro:sun:local' changed from UNINITIALIZED to INITIALIZING
2017-11-23 18:38:09.080 [hingStatusInfoChangedEvent] - 'astro:sun:local' changed from INITIALIZING to ONLINE
2017-11-23 18:38:10.193 [ThingAddedEvent           ] - Thing 'astro:moon:local' has been added.
2017-11-23 18:38:10.213 [hingStatusInfoChangedEvent] - 'astro:moon:local' changed from INITIALIZING to ONLINE
2017-11-23 18:38:10.225 [hingStatusInfoChangedEvent] - 'astro:moon:local' changed from UNINITIALIZED to INITIALIZING
2017-11-23 18:38:11.040 [ThingUpdatedEvent         ] - Thing 'astro:sun:local' has been updated.
2017-11-23 18:38:11.301 [ThingUpdatedEvent         ] - Thing 'astro:moon:local' has been updated.
2017-11-23 20:47:00.051 [ChannelTriggeredEvent     ] - astro:moon:local:set#event triggered END
2017-11-24 05:59:00.009 [ChannelTriggeredEvent     ] - astro:sun:local:morningNight#event triggered END
2017-11-24 05:59:00.018 [ChannelTriggeredEvent     ] - astro:sun:local:astroDawn#event triggered START
2017-11-24 06:38:00.068 [ChannelTriggeredEvent     ] - astro:sun:local:astroDawn#event triggered END
2017-11-24 06:38:00.071 [ChannelTriggeredEvent     ] - astro:sun:local:nauticDawn#event triggered START
2017-11-24 07:18:00.021 [ChannelTriggeredEvent     ] - astro:sun:local:civilDawn#event triggered START
2017-11-24 07:18:00.050 [ChannelTriggeredEvent     ] - astro:sun:local:nauticDawn#event triggered END
2017-11-24 07:54:00.011 [ChannelTriggeredEvent     ] - astro:sun:local:rise#event triggered START
2017-11-24 07:54:00.031 [ChannelTriggeredEvent     ] - astro:sun:local:civilDawn#event triggered END
2017-11-24 07:58:00.010 [ChannelTriggeredEvent     ] - astro:sun:local:rise#event triggered END
2017-11-24 07:58:00.018 [ChannelTriggeredEvent     ] - astro:sun:local:daylight#event triggered START

In Karaf, when I do a bundle:list, I get:

205 | Active   |  80 | 0.9.0.201711202142     | Astro Binding

So it seems I have a higher release. There are some issues in OH 2.1 with Astro, upgrading to 2.2 might solve it.

2017-11-23 18:12:43.042 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-binding-astro': Error restarting bundles

You could try this: clear the cache.

So, I stopped the service, cleared the cache and restarted the service. No changes.
Next, I rebooted the complete system. No changes.

In the openhab.log I found suddenly:

2017-11-24 15:20:58.681 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'astro:sun:local' to inbox.
2017-11-24 15:20:58.698 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'astro:moon:local' to inbox.

Checking the inbox in the PaperUI, nothing there to approve.

I restarted the service again, to check if the inbox messages appears again, yes it does.
Checking the inbox via karaf revealed nothing different to the paperUI: no new items.

Is there a way to update the astro-binding? For installation I used the PaperUI.
And do I need to define a things file for the astro binding, or should the integration via PaperUI be sufficient?

karaf is listing the following things, which looks ok to me.

openhab> smarthome:things list
astro:sun:local (Type=Thing, Status=ONLINE, Label=Local Sun, Bridge=null)
avmfritz:FRITZ_DECT_200:b213cab3:087610053251 (Type=Thing, Status=ONLINE, Label=Warmwassersteuerung, Bridge=avmfritz:fritzbox:b213cab3)
astro:moon:local (Type=Thing, Status=ONLINE, Label=Local Moon, Bridge=null)
avmfritz:FRITZ_DECT_Repeater_100:b213cab3:116570057984 (Type=Thing, Status=ONLINE, Label=FRITZ!DECT Rep 100, Bridge=avmfritz:fritzbox:b213cab3)
ntp:ntp:2bbc6b72 (Type=Thing, Status=ONLINE, Label=NTP Server, Bridge=null)
avmfritz:fritzbox:b213cab3 (Type=Bridge, Status=ONLINE: FRITZ!Box online, Label=FRITZ!Box, Bridge=null)

I think you problem is:

your thing:
astro:sun:local

your item:
channel=“astro:sun:home:rise#start”

This does not match, use astro:sun:local:rise#start instead.

I completely missed that. I was focusing on this error:

2017-11-23 18:12:43.042 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-binding-astro': Error restarting bundles

Besides the problem that @icompas is using the wrong channel, I suspect there is another problem in play as well.

To answer your other questions:

  • The fact these Astro-things appear in your inbox when OH restarts is normal behaviour. I have that too (also with the ChromeCast binding);
  • Since you have installed the Astro binding trough PaperUI, you already have the latest binding for your OH release. You can however consider to upgrade your OH install (but please follow @HomeAutomation’s suggestion first - that might suffice);
  • No need to create a .things file;

@HomeAutomation, @Dries

Gents, thanks for this hint… I totally oversaw this one. :frowning:
And guess what, as soon it was corrected, all is working fine. :slight_smile:

can the defaults for Astro things and Chrome things have there Defaults configured or flagged off once set so not to keep re initializing with there defaults ? ( i guess in the binding ? )