Elero transmitter stick + astro binding

Hi,

for a long time I’ve been trying to get elerotransmitterstick binding to work with the astro binding.

I want to shut down my roll shutters at sunset. But the events of the astro binding are not triggered at the correct time. All events are triggered at around 00:00:30, right after midnight.

If I remove the elero things the events are triggered at the correct time.

I tried a lot of things to solve this but I think that theremight be an incompatibility between the astro binding and the elerotransmitterstick binding.

Does anybody know a solution or a work around?

Here an excerpt of my log:

2021-06-27 00:00:30.433 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘SunRiseTime’ changed from 2021-06-26T05:19:00.000+0200 to 2021-06-27T05:20:00.000+0200
2021-06-27 00:00:30.455 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘Sunrise_Time’ changed from 2021-06-26T05:19:00.000+0200 to 2021-06-27T05:20:00.000+0200
2021-06-27 00:00:30.467 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:home:nauticDawn#event triggered START
2021-06-27 00:00:30.472 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:home:civilDawn#event triggered START
2021-06-27 00:00:30.477 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:home:nauticDawn#event triggered END
2021-06-27 00:00:30.482 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:home:rise#event triggered START
2021-06-27 00:00:30.487 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:home:civilDawn#event triggered END
2021-06-27 00:00:30.492 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:home:daylight#event triggered START
2021-06-27 00:00:30.497 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:home:noon#event triggered START
2021-06-27 00:00:30.502 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:home:noon#event triggered END
2021-06-27 00:00:30.508 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘SunSetTime’ changed from 2021-06-26T21:23:00.000+0200 to 2021-06-27T21:23:00.000+0200
2021-06-27 00:00:30.513 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:home:set#event triggered START
2021-06-27 00:00:30.519 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:home:civilDusk#event triggered START
2021-06-27 00:00:30.524 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘Sunset_Time’ changed from 2021-06-26T21:23:00.000+0200 to 2021-06-27T21:23:00.000+0200
2021-06-27 00:00:30.530 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:home:set#event triggered END
2021-06-27 00:00:30.536 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘CivDawn_Time’ changed from 2021-06-26T05:19:00.000+0200 to 2021-06-27T05:20:00.000+0200
2021-06-27 00:00:30.542 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:home:civilDusk#event triggered END
2021-06-27 00:00:30.548 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:home:nauticDusk#event triggered START
2021-06-27 00:00:30.553 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:home:rise#event triggered END
2021-06-27 00:00:30.558 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:home:nauticDusk#event triggered END
2021-06-27 00:00:30.564 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:home:daylight#event triggered END
2021-06-27 00:00:30.569 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:home:morningNight#event triggered START
2021-06-27 00:00:30.575 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘CivDusk_Time’ changed from 2021-06-26T21:27:00.000+0200 to 2021-06-27T21:27:00.000+0200

Due to a failure of the boot partition of my SD card, I completely reinstalled Openhab.
I use a Rasperry Pi OS, installed openjdk-11-jdk and finally openhab3 (3.1.0).
I installed astro-binding and the elerotransmitterstick binding. Configured both, created astro:sun:local as a thing and created a rule using the built-in editor on the openhab configuration page.

triggers:
  - id: "1"
    configuration:
      thingUID: astro:sun:local
      channelUID: astro:sun:local:astroDusk#event
    type: core.ChannelEventTrigger
conditions: []
actions:
  - inputs: {}
    id: "8"
    configuration:
      itemName: WohnzimmerRechts
      command: DOWN
    type: core.ItemCommandAction
  - inputs: {}
    id: "7"
    configuration:
      itemName: WohnzimmerMitte
      command: DOWN
    type: core.ItemCommandAction
  - inputs: {}
    id: "6"
    configuration:
      itemName: WohnzimmerLinks
      command: DOWN
    type: core.ItemCommandAction
  - inputs: {}
    id: "5"
    configuration:
      itemName: Kueche
      command: DOWN
    type: core.ItemCommandAction
  - inputs: {}
    id: "4"
    configuration:
      itemName: Esszimmer
      command: DOWN
    type: core.ItemCommandAction
  - inputs: {}
    id: "3"
    configuration:
      itemName: ElternTuer
      command: DOWN
    type: core.ItemCommandAction
  - inputs: {}
    id: "2"
    configuration:
      itemName: ElternFenster
      command: DOWN
    type: core.ItemCommandAction

I didn’t find any astro events in the log after the initial configuration, although the sun has set in the meantime.

Does anybody know how I can solve that?

No point working on rules until that is sorted.
Is Astro binding installed? What start-up messages does it give you in your openhab.log? Does your xxx.things file load? What does that contain?

I greped in the events log for astro:

2021-12-05 18:01:44.915 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'astro:sun:local' changed from UNINITIALIZED to INITIALIZING
2021-12-05 18:01:44.962 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'astro:sun:local' changed from INITIALIZING to ONLINE
2021-12-06 00:00:31.138 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:local:morningNight#event triggered START

and the complete openhab.log is(I censored the location at one digit):

2021-12-05 18:00:34.769 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Time zone set to 'Europe/Berlin'.
2021-12-05 18:00:34.879 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Location set to '4x.23096221515749,9.877223968505861'.
2021-12-05 18:00:34.884 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Locale set to 'de_DE'.
2021-12-05 18:01:05.113 [WARN ] [org.openhab.core.net.NetUtil        ] - Found multiple local interfaces - ignoring 192.168.178.24
2021-12-05 18:01:29.455 [INFO ] [.core.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007
2021-12-05 18:01:40.363 [INFO ] [org.openhab.ui.internal.UIService   ] - Started UI on port 8080
2021-12-05 18:01:41.463 [INFO ] [e.automation.internal.RuleEngineImpl] - Rule engine started.
2021-12-05 18:01:43.692 [INFO ] [ab.ui.habpanel.internal.HABPanelTile] - Started HABPanel at /habpanel
2021-12-05 18:28:57.235 [WARN ] [tick.internal.stick.SerialConnection] - response does not match command channels. Skipping response.
2021-12-05 23:01:03.411 [WARN ] [.io.rest.auth.internal.TokenResource] - Couldn't find a user with a session matching the provided refresh_token
2021-12-05 23:01:03.416 [WARN ] [.io.rest.auth.internal.TokenResource] - Token issuing failed: invalid_grant
2021-12-05 23:01:38.055 [WARN ] [.io.rest.auth.internal.TokenResource] - Not refreshing token for session 2145d409-1def-489d-a1d2-3df3ebe2c31b of user Fire, missing or invalid se>
2021-12-05 23:01:38.059 [WARN ] [.io.rest.auth.internal.TokenResource] - Token issuing failed: invalid_grant

From my experience the astro binding will work perfectly fine, as soon as I removed the elerotransmitterstick binding. I will do that now and post the logs tomorrow again.

Just checked the events log. All the astro events occured right after disabling the elerotransmitterstick thing…

2021-12-06 17:15:18.345 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'elerotransmitterstick:elerochannel:769b2ac958:2' changed from UNINITIALIZED (HANDLER_MISSING_ERROR>
2021-12-06 17:15:18.349 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'elerotransmitterstick:elerochannel:769b2ac958:13' changed from UNINITIALIZED (HANDLER_MISSING_ERRO>
2021-12-06 17:15:18.354 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'elerotransmitterstick:elerochannel:769b2ac958:1' changed from UNINITIALIZED (HANDLER_MISSING_ERROR>
2021-12-06 17:15:18.358 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'elerotransmitterstick:elerochannel:769b2ac958:12' changed from UNINITIALIZED (HANDLER_MISSING_ERRO>
2021-12-06 17:15:18.361 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'elerotransmitterstick:elerochannel:769b2ac958:4' changed from UNINITIALIZED (HANDLER_MISSING_ERROR>
2021-12-06 17:15:18.365 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'elerotransmitterstick:elerochannel:769b2ac958:15' changed from UNINITIALIZED (HANDLER_MISSING_ERRO>
2021-12-06 17:15:18.369 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'elerotransmitterstick:elerochannel:769b2ac958:3' changed from UNINITIALIZED (HANDLER_MISSING_ERROR>
2021-12-06 17:15:18.377 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'elerotransmitterstick:elerochannel:769b2ac958:14' changed from UNINITIALIZED (HANDLER_MISSING_ERRO>
2021-12-06 17:15:18.382 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'elerotransmitterstick:elerochannel:769b2ac958:5' changed from UNINITIALIZED (HANDLER_MISSING_ERROR>
2021-12-06 17:15:18.397 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:local:astroDawn#event triggered START
2021-12-06 17:15:18.400 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:local:morningNight#event triggered END
2021-12-06 17:15:18.404 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:local:nauticDawn#event triggered START
2021-12-06 17:15:18.408 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:local:astroDawn#event triggered END
2021-12-06 17:15:18.412 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:local:civilDawn#event triggered START
2021-12-06 17:15:18.416 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:local:nauticDawn#event triggered END
2021-12-06 17:15:18.419 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:local:civilDawn#event triggered END
2021-12-06 17:15:18.423 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:local:rise#event triggered START
2021-12-06 17:15:18.426 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:local:rise#event triggered END
2021-12-06 17:15:18.429 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:local:daylight#event triggered START
2021-12-06 17:15:18.432 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:local:noon#event triggered START
2021-12-06 17:15:18.435 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:local:noon#event triggered END
2021-12-06 17:15:18.438 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:local:daylight#event triggered END
2021-12-06 17:15:18.441 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:local:set#event triggered START
2021-12-06 17:15:18.444 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:local:set#event triggered END
2021-12-06 17:15:18.447 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:local:civilDusk#event triggered START
2021-12-06 17:15:18.450 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:local:nauticDusk#event triggered START
2021-12-06 17:15:18.453 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:local:civilDusk#event triggered END
2021-12-06 17:15:18.457 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:local:astroDusk#event triggered START
2021-12-06 17:15:18.460 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:local:nauticDusk#event triggered END

I am quite convinced that the elerotransmitterstick interfers with firing of the astro events. But I am not really sure what causes this. Maybe this is in some kind related to Astro-Binding: all events are triggered at the same time shortly after midnight ?!

@vbier Any idea if there could be something that blocks the astro events?

I collected the thred information after enabling the elerotransmitterstick again, file is too large to show directly. No BLOCKED threads. Enabling Elerotransmitterstick seems to add some threads in TIMED_WAITING.

elero_threads.txt (99.8 KB)

It certainly appears that something “unsticks” in the scheduled events processing, and all the overdue Astro events arrive at once.
And as that happens within milliseconds of disabling Elero Things, the connection seems real.

That would be ordinary enough, for scheduled polling activity.

1 Like

I have been using both bindings together for years without problems. They still work for me in 3.1.

On which platform? Raspberry pi?

At the beginning yes, but before openHab 3 came out i switched to an Intel based setup.

Since I could find a solution, I switched to FHEM. And it works as expected.