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
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -202,16 +202,21 @@ public void handleCommand(ChannelUID channelUID, Command command) {
logger.debug("Received channel: {}, command: {}", channelUID, command);

if (ihc == null) {
logger.warn("Connection is not initialized, abort resource value update for channel '{}'!", channelUID);
logger.debug("Connection is not initialized, aborting resource value update for channel '{}'!", channelUID);
return;
}

if (ihc.getConnectionState() != ConnectionState.CONNECTED) {
logger.warn("Connection to controller is not open, abort resource value update for channel '{}'!",
logger.debug("Connection to controller is not open, aborting resource value update for channel '{}'!",
channelUID);
return;
}

if (thing.getStatus() != ThingStatus.ONLINE) {
logger.debug("Controller is not ONLINE, aborting resource value update for channel '{}'!", channelUID);
return;
}

switch (channelUID.getId()) {
case CHANNEL_CONTROLLER_STATE:
if (command.equals(RefreshType.REFRESH)) {
Expand Down