Astro binding to move a switch

Hello there,

a few days ago I installed openhab2 on raspbian. I´m trying to turn a switch ON at sunset. I installed astro bindung using Paper UI, things (astro:sun:local) and channels (astro:sun:local:rise#start etc.) were created.

In my sitemap the time for sunrise (LocalSun_Rise_StartTime) and sunset (LocalSun_Set_StartTime) are displayed correctly.

But using this rule, nothing happens at all:

rule "Lichtan"
          Channel 'astro:sun:local:set#event' triggered START

With a cron-job the switch works fine.

The openhab.log says:

2018-08-10 15:28:45.899 [INFO ] [thome.binding.astro.internal.job.Job] - Scheduled Astro event-jobs for thing astro:sun:local
2018-08-10 15:28:46.051 [INFO ] [thome.binding.astro.internal.job.Job] - Scheduled Astro event-jobs for thing astro:moon:local

The event.log says nothin at all…

I´ve no idea what to do, maybe just too blind to see. Thanks in advance.

Did you already restart openHAB?

several times, deleted cache…

Do you have any other rule with the same name?

1 Like

The Rule looks right and the Thing looks healthy. It is updating or else you wouldn’t see the DateTime Item’s with valid times.

I just looked at my events.log and there doesn’t appear to be anything logged by default when the sunrise/sunset events occur.

Just to verify the problem is with the Astro binding, add a logInfo to that Rule so you can see in openhab.log whether or not the Rule is firing and the problem is actually with the sendCommand, or not.

okay, this is the rule now

rule "Lichtan"
          Channel 'astro:sun:local:set#event' triggered START
         logInfo("Lichtan.rules", "This is a log entry of type Info!")

but nothing happend in openhab.log. I´ve used an offset for testing and in paperui and sitemap I can see that the time of sunset has changed correctly according to the offset.

@ Udo-Hartmann: I only have this rule and a default.rules.

What version of OH did you install and how did you install it?

I´ve used the package repository and followed the linux installation guide. But in fact I can´t tell you what version I installed. It seems to me that my sd-card crashed after a reebot and now it´s dead. So I will have to set it up again…

Thanks for your help. I will get back to this within the next days.

OK. This could have been a symptom of a wearing out SD card, though it is more likely that the file system became corrupted during a power failure. Avoid at all costs from yanking the power from an RPi without properly shutting it down. It can result in corruption.

I would recommend giving openHABian a look. It might be less work for you to get back up and running.

That´s what I did. I installed openhabian. Configuration of the astro binding finally took 5 minutes and everythings works as it should…

thank you very much
best regards