Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[hdpowerview] Shades are marked as offline with communication error during startup #11702

Closed
jlaur opened this issue Dec 4, 2021 · 0 comments · Fixed by #11707
Closed

[hdpowerview] Shades are marked as offline with communication error during startup #11702

jlaur opened this issue Dec 4, 2021 · 0 comments · Fixed by #11707
Labels
bug An unexpected problem or unintended behavior of an add-on

Comments

@jlaur
Copy link
Contributor

jlaur commented Dec 4, 2021

The Hunter Douglas PowerView binding has some concurrency issues during startup which results in shades being marked as offline for a minute, after state has changed a few times.

Expected Behavior

Shades should be reported as online as soon as possible when they are in fact online.

Current Behavior

When binding is started, I always observe this behaviour:

2021-12-04 23:41:19.829 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'hdpowerview:hub:hub' changed from INITIALIZING to ONLINE
2021-12-04 23:41:19.832 [DEBUG] [ternal.handler.HDPowerViewHubHandler] - Received data for 11 shades
2021-12-04 23:41:19.858 [DEBUG] [ternal.handler.HDPowerViewHubHandler] - Updating shade '42949'
2021-12-04 23:41:19.924 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'hdpowerview:shade:hub:blind4' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
2021-12-04 23:41:19.967 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'hdpowerview:shade:hub:blind4' changed from INITIALIZING to ONLINE
2021-12-04 23:41:19.970 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'hdpowerview:shade:hub:blind4' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR)
2021-12-04 23:42:20.554 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'hdpowerview:shade:hub:blind4' changed from OFFLINE (COMMUNICATION_ERROR) to ONLINE

HDPowerViewHubHandler calls HDPowerViewShadeHandler.onReceiveUpdate after receiving shade data from the hub. This marks the thing online:

    protected void onReceiveUpdate(@Nullable ShadeData shadeData) {
        if (shadeData != null) {
            updateStatus(ThingStatus.ONLINE);

However, this is last line of initialize:

        updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR);

Possible Solution

Not sure, but maybe initial status should be taken from bridge:

  • Bridge is online: ONLINE.
  • Bridge is offline: OFFLINE with ThingStatusDetail.BRIDGE_OFFLINE.
  • No bridge: OFFLINE with ThingStatusDetail.BRIDGE_UNINITIALIZED.

Steps to Reproduce

Restart binding:
ssh openhab@localhost -p8101 'bundle:restart org.openhab.binding.hdpowerview'

@jlaur jlaur added the bug An unexpected problem or unintended behavior of an add-on label Dec 4, 2021
jlaur added a commit to jlaur/openhab-addons that referenced this issue Dec 5, 2021
Fixes openhab#11702

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
lolodomo pushed a commit that referenced this issue Dec 5, 2021
Fixes #11702

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
NickWaterton pushed a commit to NickWaterton/openhab-addons that referenced this issue Dec 30, 2021
Fixes openhab#11702

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
Signed-off-by: Nick Waterton <n.waterton@outlook.com>
mischmidt83 pushed a commit to mischmidt83/openhab-addons that referenced this issue Jan 9, 2022
Fixes openhab#11702

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
Signed-off-by: Michael Schmidt <mi.schmidt.83@gmail.com>
nemerdaud pushed a commit to nemerdaud/openhab-addons that referenced this issue Jan 28, 2022
Fixes openhab#11702

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
volkmarnissen pushed a commit to volkmarnissen/openhab-addons that referenced this issue Mar 3, 2022
Fixes openhab#11702

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
marcfischerboschio pushed a commit to bosch-io/openhab-addons that referenced this issue May 5, 2022
Fixes openhab#11702

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
andan67 pushed a commit to andan67/openhab-addons that referenced this issue Nov 6, 2022
Fixes openhab#11702

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
andrasU pushed a commit to andrasU/openhab-addons that referenced this issue Nov 12, 2022
Fixes openhab#11702

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
Signed-off-by: Andras Uhrin <andras.uhrin@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant