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

[ihc] Improve command handling when controller is not ready #10895

Merged
merged 3 commits into from
Jul 15, 2021

Conversation

paulianttila
Copy link
Contributor

When connection from binding to IHC controller is open, but controller
is in programming state, things state is offline with special status to
indicate that binding can't send or receive any resource updates at the
moment. Things status check during command sending will prevent
unnecessary resource updates which will eventually fail and binding then
tries to restart the connection.

Signed-off-by: Pauli Anttila pauli.anttila@gmail.com

When connection from binding to IHC controller is open, but controller
is in programming state, things state is offline with special status to
indicate that binding can't send or receive any resource updates at the
moment. Things status check during command sending will prevent
unnecessary resource updates which will eventually fail and binding then
tries to restart the connection.

Signed-off-by: Pauli Anttila <pauli.anttila@gmail.com>
@@ -212,6 +212,11 @@ public void handleCommand(ChannelUID channelUID, Command command) {
return;
}

if (thing.getStatus() != ThingStatus.ONLINE) {
logger.warn("Controller is not ONLINE state, abort resource value update for channel '{}'!", channelUID);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
logger.warn("Controller is not ONLINE state, abort resource value update for channel '{}'!", channelUID);
logger.debug("Controller is not ONLINE, aborting resource value update for channel '{}'!", channelUID);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Signed-off-by: Pauli Anttila <pauli.anttila@gmail.com>
@Skinah Skinah added enhancement An enhancement or new feature for an existing add-on bug An unexpected problem or unintended behavior of an add-on and removed enhancement An enhancement or new feature for an existing add-on labels Jun 24, 2021
Signed-off-by: Pauli Anttila <pauli.anttila@gmail.com>
@martinvw martinvw added rebuild Triggers Jenkins PR build and removed rebuild Triggers Jenkins PR build labels Jun 30, 2021
Copy link
Member

@kaikreuzer kaikreuzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@kaikreuzer kaikreuzer merged commit fe91fb6 into openhab:main Jul 15, 2021
@kaikreuzer kaikreuzer added this to the 3.2 milestone Jul 15, 2021
@kaikreuzer kaikreuzer changed the title [ihc] Improved command handling when controller is not ready [ihc] Improve command handling when controller is not ready Jul 15, 2021
dw-8 pushed a commit to dw-8/openhab-addons that referenced this pull request Jul 25, 2021
…#10895)

* [ihc] Improved command handling when controller is not ready

When connection from binding to IHC controller is open, but controller
is in programming state, things state is offline with special status to
indicate that binding can't send or receive any resource updates at the
moment. Things status check during command sending will prevent
unnecessary resource updates which will eventually fail and binding then
tries to restart the connection.

Signed-off-by: Pauli Anttila <pauli.anttila@gmail.com>
Signed-off-by: dw-8 <davy.wong.on+github@gmail.com>
dw-8 added a commit to dw-8/openhab-addons that referenced this pull request Jul 25, 2021
dw-8 pushed a commit to dw-8/openhab-addons that referenced this pull request Jul 25, 2021
…#10895)

* [ihc] Improved command handling when controller is not ready

When connection from binding to IHC controller is open, but controller
is in programming state, things state is offline with special status to
indicate that binding can't send or receive any resource updates at the
moment. Things status check during command sending will prevent
unnecessary resource updates which will eventually fail and binding then
tries to restart the connection.

Signed-off-by: Pauli Anttila <pauli.anttila@gmail.com>
Signed-off-by: dw-8 <davy.wong.on+github@gmail.com>
dw-8 added a commit to dw-8/openhab-addons that referenced this pull request Jul 25, 2021
…penhab#10895)"

This reverts commit 2a683ed.

Signed-off-by: dw-8 <davy.wong.on+github@gmail.com>
frederictobiasc pushed a commit to frederictobiasc/openhab-addons that referenced this pull request Oct 26, 2021
…#10895)

* [ihc] Improved command handling when controller is not ready

When connection from binding to IHC controller is open, but controller
is in programming state, things state is offline with special status to
indicate that binding can't send or receive any resource updates at the
moment. Things status check during command sending will prevent
unnecessary resource updates which will eventually fail and binding then
tries to restart the connection.

Signed-off-by: Pauli Anttila <pauli.anttila@gmail.com>
thinkingstone pushed a commit to thinkingstone/openhab-addons that referenced this pull request Nov 7, 2021
…#10895)

* [ihc] Improved command handling when controller is not ready

When connection from binding to IHC controller is open, but controller
is in programming state, things state is offline with special status to
indicate that binding can't send or receive any resource updates at the
moment. Things status check during command sending will prevent
unnecessary resource updates which will eventually fail and binding then
tries to restart the connection.

Signed-off-by: Pauli Anttila <pauli.anttila@gmail.com>
marcfischerboschio pushed a commit to bosch-io/openhab-addons that referenced this pull request May 5, 2022
…#10895)

* [ihc] Improved command handling when controller is not ready

When connection from binding to IHC controller is open, but controller
is in programming state, things state is offline with special status to
indicate that binding can't send or receive any resource updates at the
moment. Things status check during command sending will prevent
unnecessary resource updates which will eventually fail and binding then
tries to restart the connection.

Signed-off-by: Pauli Anttila <pauli.anttila@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 this pull request may close these issues.

None yet

4 participants