-
-
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
[homeconnect] Selected program not set at startup when program state is finished #10904
Comments
@bruestel : this is a problem with exception not being caught. |
Exceptions should be caught at any time. There is an exception when executing OH commands. Errors are only logged here. Can you tell me which part you mean exactly. I'll have a look at it. |
The exception not caught in my case is certainly this one: |
In fact, exceptions are caught in method |
Fix openhab#10904 Signed-off-by: Laurent Garnier <lg.hc@ree.fr>
I am working on a patch. |
Fix openhab#10904 Signed-off-by: Laurent Garnier <lg.hc@ree.fr>
Fix openhab#10904 Signed-off-by: Laurent Garnier <lg.hc@free.fr>
@bruestel : I finally found only 3 places (methods) requiring an additional exception catching. The uncaught exception was also the cause of the repeated calls (for each channel) as the cache was not filled. |
Unfortunately, when the program state is updated, there is no retry to load the program options. They will be loaded only when the program is updated. Maybe something else to improve. |
In fact, it is not. The request succeeded while the program is running but I discovered that not all options are returned. I got the available spin speeds but not the available washing temperatures. I guess this is because you cannot change the washing temperature while the program is started but you can still adjust the spin speed (when you are at the beginning of the program). This could lead to incomplete options being cached by the binding. Maybe we should cache the result only if all expected options are returned. |
This enhancement is now included in my PR. |
Thank you for your PR. LGTM.
I like how you solved this. |
* [homeconnect] Catch exception when appropriate Fix #10904 Signed-off-by: Laurent Garnier <lg.hc@free.fr>
* [homeconnect] Catch exception when appropriate Fix openhab#10904 Signed-off-by: Laurent Garnier <lg.hc@free.fr>
* [homeconnect] Catch exception when appropriate Fix openhab#10904 Signed-off-by: Laurent Garnier <lg.hc@free.fr>
* [homeconnect] Catch exception when appropriate Fix openhab#10904 Signed-off-by: Laurent Garnier <lg.hc@free.fr>
* [homeconnect] Catch exception when appropriate Fix openhab#10904 Signed-off-by: Laurent Garnier <lg.hc@free.fr>
If you start the binding while the current state of the program is "finished", the "selected program" channel is not set.
This is apparently linked to the fact the binding tries to retrieve the available options for this program and it fails (code 409 - Request cannot be performed in the current operation state) when the program is in this state. This leads to multiple calls.
The channel should be set even if retrieving of program options is not yet possible.
The result would be certainly the same if the program state was "running".
The text was updated successfully, but these errors were encountered: