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

[Netatmo] Room-Thing offline after restart #13403

Closed
mdillmann opened this issue Sep 17, 2022 · 3 comments · Fixed by #13467
Closed

[Netatmo] Room-Thing offline after restart #13403

mdillmann opened this issue Sep 17, 2022 · 3 comments · Fixed by #13467
Assignees
Labels
bug An unexpected problem or unintended behavior of an add-on

Comments

@mdillmann
Copy link

mdillmann commented Sep 17, 2022

Expected Behavior

Room thing still online after restart of OH

Current Behavior

If a room-action is defined, the room-thing is initially online. But after a restart of OH it stays offline.

Possible Solution

Race condition initializing actionhandler before room-thing is initialized.

Steps to Reproduce (for Bugs)

  1. define a room-action (in my case in a .rules file)
  2. restart OH

Log-Entries:

2022-09-14 14:58:10.726 [DEBUG] [mo.internal.handler.ApiBridgeHandler] - Initializing Netatmo API bridge handler.
2022-09-14 14:58:10.766 [DEBUG] [tatmo.internal.handler.DeviceHandler] - Initializing handler for bridge netatmo:home:f1a78f54ab:59cf54c5ae4763a9f18b4fdf
2022-09-14 14:58:10.770 [DEBUG] [.netatmo.internal.action.RoomActions] - Netatmo RoomActions service created
2022-09-14 14:58:10.771 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler ModuleHandler of thing netatmo:room:aa:bb:cc tried accessing its bridge although the handler was already disposed.
2022-09-14 14:58:10.790 [DEBUG] [tatmo.internal.handler.DeviceHandler] - Initializing handler for bridge netatmo:plug:aa:bb:dd
2022-09-14 14:58:10.799 [DEBUG] [tatmo.internal.handler.ModuleHandler] - Initializing handler for thing netatmo:room:aa:bb:cc
2022-09-14 14:58:10.824 [DEBUG] [tatmo.internal.handler.ModuleHandler] - Initializing handler for thing netatmo:valve:a:b:dd:ee

If the roomaction is removed, cache-cleaned and OH restarted the problem is gone

Your Environment

Observed in
OH 3.3 release
OH 3.4 M2

@mdillmann mdillmann added the bug An unexpected problem or unintended behavior of an add-on label Sep 17, 2022
@mdillmann
Copy link
Author

@clinique : I suspect the call-chain starting here
energy = commonHandler.getHomeCapability(EnergyCapability.class); in the setThingHandler to cause the race.

Code changed much with the introduction of "CommonInterface" and the capabilities and I can't figure out the flow.

@clinique clinique self-assigned this Sep 19, 2022
@clinique
Copy link
Contributor

@clinique : I suspect the call-chain starting here energy = commonHandler.getHomeCapability(EnergyCapability.class); in the setThingHandler to cause the race.

Code changed much with the introduction of "CommonInterface" and the capabilities and I can't figure out the flow.

You're correct, I land in the same place. Let's have a look at this.

@openhab-bot
Copy link
Collaborator

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/adding-a-bticino-smarther2-thermostat-using-the-openhab-netatmo-binding/144560/1

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.

3 participants