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

[chromecast] Fix thing go offline after stop command #14158

Merged
merged 3 commits into from
Jan 7, 2023

Conversation

lsiepel
Copy link
Contributor

@lsiepel lsiepel commented Jan 5, 2023

Signed-off-by: lsiepel leosiepel@gmail.com

When the app running on the ChromeCast was stopped by switching the ON/OFF stop channel, the binding tried to stop the app without checking if it actually runs. Because the app wasn;t running, it gives an error and the thing goes offline.
This PR adds a check, and also restructured the class a bit.

Also when a command was givfen to play media by URL, but the URL was invalid or could not be loaded by the ChromeCast, the thing went offline for ~10 seconds. That mechanism is also change so that the Thing only goes offline when there is an actuall IOException, in other case it logs a warning about unplayable url.

3.4.1 Test JAR is here: https://1drv.ms/u/s!AnMcxmvEeupwjp4ILqWfPxAy7qJh4g?e=43fQde

Fixes: #9591 (tested and confirmed)

Signed-off-by: lsiepel <leosiepel@gmail.com>
@lsiepel lsiepel added the bug An unexpected problem or unintended behavior of an add-on label Jan 5, 2023
@lsiepel lsiepel requested a review from kaikreuzer as a code owner January 5, 2023 09:11
Signed-off-by: lsiepel <leosiepel@gmail.com>
Signed-off-by: lsiepel <leosiepel@gmail.com>
Copy link
Contributor

@lolodomo lolodomo left a comment

Choose a reason for hiding this comment

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

LGTM

@lolodomo lolodomo merged commit de8d784 into openhab:main Jan 7, 2023
@lolodomo lolodomo added this to the 4.0 milestone Jan 7, 2023
@lsiepel lsiepel deleted the chromecast-fixes branch January 7, 2023 09:14
borazslo pushed a commit to borazslo/openhab-mideaac-addon that referenced this pull request Jan 8, 2023
* Restructure commander
* Improve thing status handling on error

Signed-off-by: lsiepel <leosiepel@gmail.com>
wborn pushed a commit that referenced this pull request Feb 5, 2023
* Restructure commander
* Improve thing status handling on error

Signed-off-by: lsiepel <leosiepel@gmail.com>
@wborn wborn added the patch A PR that has been cherry-picked to a patch release branch label Feb 5, 2023
psmedley pushed a commit to psmedley/openhab-addons that referenced this pull request Feb 23, 2023
* Restructure commander
* Improve thing status handling on error

Signed-off-by: lsiepel <leosiepel@gmail.com>
nemerdaud pushed a commit to nemerdaud/openhab-addons that referenced this pull request Feb 28, 2023
* Restructure commander
* Improve thing status handling on error

Signed-off-by: lsiepel <leosiepel@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 patch A PR that has been cherry-picked to a patch release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[chromecast] Things go offline when sending stop command while "no application is running"
3 participants