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

[homematic] Re-connect handling is not sufficient for HmIP devices #10439

Closed
MHerbst opened this issue Apr 3, 2021 · 2 comments
Closed

[homematic] Re-connect handling is not sufficient for HmIP devices #10439

MHerbst opened this issue Apr 3, 2021 · 2 comments
Labels
bug An unexpected problem or unintended behavior of an add-on

Comments

@MHerbst
Copy link
Contributor

MHerbst commented Apr 3, 2021

If a CCU is restarted the binding sometimes shows one or more connected HmIP things as offline even if the connection to the CCU has been restored. The state won't change until the Homematic binding is restarted.

This problem does not occur with the "classic" Homematic devices and it depends on the type and number of connected HmIP devices.

There are two problems that have to be solved for this issue:

  1. If a CCU is restarted it will answer to request before it completely ready again. In this case, the response message is an HTML document containing the message that the CCU is not ready yet. This needs to be checked and the binding has to wait until the CCU responds with a correct document.
  2. After the CCU is completely back all HM devices are also online. But for the HmIP devices, it can take several seconds (or minutes) until they are available in the CCU. With my HmIP-eTRV even the CCU did not show updates for some minutes after a restart. As a solution, the binding must retry the checks for each individual device whether it is online again.

This is a follow-up to issue #10075

@MHerbst MHerbst added the bug An unexpected problem or unintended behavior of an add-on label Apr 3, 2021
@eikowagenknecht
Copy link
Contributor

Thanks for analyzing this. If you need more help / testing I'm happy to assist again :-)

@openhab-bot
Copy link
Collaborator

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

https://community.openhab.org/t/homematic-ip-window-contact-state-doesnt-update/112090/39

NickWaterton pushed a commit to NickWaterton/openhab-addons that referenced this issue Dec 30, 2021
…ab#11429)

* Use globally unique id for registration of callback to allow ...

the connection of multiple OH installations with one CCU.

The bridge id is not sufficient for this purpose because it is same in
all OH installations.


Signed-off-by: Martin Herbst <develop@mherbst.de>

* Retry callback re-registration after connection is resumed

Some services on the CCU need longer to start and are not available
immediately after the connection to the CCU has been resumed.

Improves the solution for openhab#8808

Fixes openhab#10439

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Description was missing.

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Changed setting name and description to avoid confusion


Signed-off-by: Martin Herbst <develop@mherbst.de>

* Added a troubleshooting tip to solve a communication problem


Signed-off-by: Martin Herbst <develop@mherbst.de>

* Shortened the label name to follow the guide lines

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Print more information about the reason for the failure

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Using scheduler thread pool and simplified configuration

Instead of configuring separate values for retry delays and number of
retries only the maximum time for retries can be configured.
The init method uses fixed delays.

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Don't retry to send if gateway does not answer at all

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Improved reconnect handling

- unregister callback not necessary if connection is lost
- wait 30s until clients and servers are restarted to give the gateway
some time to recover

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Spotless

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Cancel an active future if the binding is stopped

Signed-off-by: Martin Herbst <develop@mherbst.de>
Signed-off-by: Nick Waterton <n.waterton@outlook.com>
mischmidt83 pushed a commit to mischmidt83/openhab-addons that referenced this issue Jan 9, 2022
…ab#11429)

* Use globally unique id for registration of callback to allow ...

the connection of multiple OH installations with one CCU.

The bridge id is not sufficient for this purpose because it is same in
all OH installations.


Signed-off-by: Martin Herbst <develop@mherbst.de>

* Retry callback re-registration after connection is resumed

Some services on the CCU need longer to start and are not available
immediately after the connection to the CCU has been resumed.

Improves the solution for openhab#8808

Fixes openhab#10439

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Description was missing.

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Changed setting name and description to avoid confusion


Signed-off-by: Martin Herbst <develop@mherbst.de>

* Added a troubleshooting tip to solve a communication problem


Signed-off-by: Martin Herbst <develop@mherbst.de>

* Shortened the label name to follow the guide lines

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Print more information about the reason for the failure

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Using scheduler thread pool and simplified configuration

Instead of configuring separate values for retry delays and number of
retries only the maximum time for retries can be configured.
The init method uses fixed delays.

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Don't retry to send if gateway does not answer at all

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Improved reconnect handling

- unregister callback not necessary if connection is lost
- wait 30s until clients and servers are restarted to give the gateway
some time to recover

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Spotless

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Cancel an active future if the binding is stopped

Signed-off-by: Martin Herbst <develop@mherbst.de>
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
…ab#11429)

* Use globally unique id for registration of callback to allow ...

the connection of multiple OH installations with one CCU.

The bridge id is not sufficient for this purpose because it is same in
all OH installations.


Signed-off-by: Martin Herbst <develop@mherbst.de>

* Retry callback re-registration after connection is resumed

Some services on the CCU need longer to start and are not available
immediately after the connection to the CCU has been resumed.

Improves the solution for openhab#8808

Fixes openhab#10439

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Description was missing.

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Changed setting name and description to avoid confusion


Signed-off-by: Martin Herbst <develop@mherbst.de>

* Added a troubleshooting tip to solve a communication problem


Signed-off-by: Martin Herbst <develop@mherbst.de>

* Shortened the label name to follow the guide lines

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Print more information about the reason for the failure

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Using scheduler thread pool and simplified configuration

Instead of configuring separate values for retry delays and number of
retries only the maximum time for retries can be configured.
The init method uses fixed delays.

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Don't retry to send if gateway does not answer at all

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Improved reconnect handling

- unregister callback not necessary if connection is lost
- wait 30s until clients and servers are restarted to give the gateway
some time to recover

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Spotless

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Cancel an active future if the binding is stopped

Signed-off-by: Martin Herbst <develop@mherbst.de>
marcfischerboschio pushed a commit to bosch-io/openhab-addons that referenced this issue May 5, 2022
…ab#11429)

* Use globally unique id for registration of callback to allow ...

the connection of multiple OH installations with one CCU.

The bridge id is not sufficient for this purpose because it is same in
all OH installations.


Signed-off-by: Martin Herbst <develop@mherbst.de>

* Retry callback re-registration after connection is resumed

Some services on the CCU need longer to start and are not available
immediately after the connection to the CCU has been resumed.

Improves the solution for openhab#8808

Fixes openhab#10439

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Description was missing.

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Changed setting name and description to avoid confusion


Signed-off-by: Martin Herbst <develop@mherbst.de>

* Added a troubleshooting tip to solve a communication problem


Signed-off-by: Martin Herbst <develop@mherbst.de>

* Shortened the label name to follow the guide lines

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Print more information about the reason for the failure

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Using scheduler thread pool and simplified configuration

Instead of configuring separate values for retry delays and number of
retries only the maximum time for retries can be configured.
The init method uses fixed delays.

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Don't retry to send if gateway does not answer at all

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Improved reconnect handling

- unregister callback not necessary if connection is lost
- wait 30s until clients and servers are restarted to give the gateway
some time to recover

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Spotless

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Cancel an active future if the binding is stopped

Signed-off-by: Martin Herbst <develop@mherbst.de>
andan67 pushed a commit to andan67/openhab-addons that referenced this issue Nov 6, 2022
…ab#11429)

* Use globally unique id for registration of callback to allow ...

the connection of multiple OH installations with one CCU.

The bridge id is not sufficient for this purpose because it is same in
all OH installations.


Signed-off-by: Martin Herbst <develop@mherbst.de>

* Retry callback re-registration after connection is resumed

Some services on the CCU need longer to start and are not available
immediately after the connection to the CCU has been resumed.

Improves the solution for openhab#8808

Fixes openhab#10439

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Description was missing.

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Changed setting name and description to avoid confusion


Signed-off-by: Martin Herbst <develop@mherbst.de>

* Added a troubleshooting tip to solve a communication problem


Signed-off-by: Martin Herbst <develop@mherbst.de>

* Shortened the label name to follow the guide lines

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Print more information about the reason for the failure

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Using scheduler thread pool and simplified configuration

Instead of configuring separate values for retry delays and number of
retries only the maximum time for retries can be configured.
The init method uses fixed delays.

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Don't retry to send if gateway does not answer at all

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Improved reconnect handling

- unregister callback not necessary if connection is lost
- wait 30s until clients and servers are restarted to give the gateway
some time to recover

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Spotless

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Cancel an active future if the binding is stopped

Signed-off-by: Martin Herbst <develop@mherbst.de>
andrasU pushed a commit to andrasU/openhab-addons that referenced this issue Nov 12, 2022
…ab#11429)

* Use globally unique id for registration of callback to allow ...

the connection of multiple OH installations with one CCU.

The bridge id is not sufficient for this purpose because it is same in
all OH installations.


Signed-off-by: Martin Herbst <develop@mherbst.de>

* Retry callback re-registration after connection is resumed

Some services on the CCU need longer to start and are not available
immediately after the connection to the CCU has been resumed.

Improves the solution for openhab#8808

Fixes openhab#10439

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Description was missing.

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Changed setting name and description to avoid confusion


Signed-off-by: Martin Herbst <develop@mherbst.de>

* Added a troubleshooting tip to solve a communication problem


Signed-off-by: Martin Herbst <develop@mherbst.de>

* Shortened the label name to follow the guide lines

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Print more information about the reason for the failure

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Using scheduler thread pool and simplified configuration

Instead of configuring separate values for retry delays and number of
retries only the maximum time for retries can be configured.
The init method uses fixed delays.

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Don't retry to send if gateway does not answer at all

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Improved reconnect handling

- unregister callback not necessary if connection is lost
- wait 30s until clients and servers are restarted to give the gateway
some time to recover

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Spotless

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Cancel an active future if the binding is stopped

Signed-off-by: Martin Herbst <develop@mherbst.de>
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

No branches or pull requests

3 participants