-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[daikin] Update channels immediately after a successful API command #17149
Conversation
@Jogobo - FYI |
30b7e6d
to
70f1adb
Compare
Signed-off-by: Jimmy Tanagra <[email protected]>
70f1adb
to
0038bf3
Compare
@psmedley if you're still using Daikin binding, WDYT? |
LGTM - I would hope this might fix issues where if you send two commands in short succession - the second command can end up reverting the 1st command - presumably as the autorefresh sometimes hasn't completed. |
Could you elaborate / give an example please? |
As, in most cases, you cannot set a single value via HTTP set command I guess it depends on the parameter combinations chosen in the binding. First you set the new desired temperature with your temp item to 21°C which results in |
No, I believe this is what happens instead:
For each action for the channel, it first gets the current info so nothing is "stale" / old. And that's all already done prior to this PR. |
My example is similar to @Jogobo I have a rule setup so that if the set point or inside temp change, and the delta between them is >= 2C - then increase the fan speed. I have other rules to set the setpoint to 16C overnight - but up to 23C during the day. When the setpoint goes from 16C to 23C is also triggers the fan speed rule - and on a decent number of occasions, the setpoint ends up reverting to the 'old' setpoint of 16C. This was with the code in 4.2.0 |
I can't immediately imagine how this could have happened. Could you make this problem appear consistently, perhaps by lowering the polling refresh rate to say 10 minutes and triggering the sequence of events manually? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, just one comment.
.../org.openhab.binding.daikin/src/main/java/org/openhab/binding/daikin/internal/api/Enums.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Jimmy Tanagra <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies, I've been busy. I just did some experimentation with trying to reproduce - I can't - even with refresh set to 600 seconds. |
Did not come across the problems @psmedley had. So from my side there is no reason to prevent the changes from being merged. |
…penhab#17149) * [daikin] Update channels immediately after a successful API command Signed-off-by: Jimmy Tanagra <[email protected]>
…penhab#17149) * [daikin] Update channels immediately after a successful API command Signed-off-by: Jimmy Tanagra <[email protected]> Signed-off-by: Patrik Gfeller <[email protected]>
…penhab#17149) * [daikin] Update channels immediately after a successful API command Signed-off-by: Jimmy Tanagra <[email protected]>
…penhab#17149) * [daikin] Update channels immediately after a successful API command Signed-off-by: Jimmy Tanagra <[email protected]>
…penhab#17149) * [daikin] Update channels immediately after a successful API command Signed-off-by: Jimmy Tanagra <[email protected]> Signed-off-by: Ciprian Pascu <[email protected]>
This was requested in #16479 (comment)
In summary, when sending an API call to change something, the device will return a
ret=OK
if it accepted the values that we've set. Therefore, we should know the updated value already, without having to wait for the next poll. We therefore update the relevant channel immediately.This helps for when changing something requires immediate feedback, such as increasing/decreasing the set temperature. Previously, the only way to get a smooth user experience is by relying on autoupdate.