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
[roku] Improve TV discovery model name and add timeout #16210
Conversation
Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
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.
LGTM
It may be better to use friendly-device-name or default-device-name to avoid duplicates and/or make it more easily identified in the inbox. Example:
|
That's fair. The friendly name then may make the most sense as it seems to be tied to what the user set when they configured the device. I have multiple of the same model in the house so this would make it obvious which is which. |
Sorry I didn't see your edit about the quotes. Could you deliberately swap the quote for "in."? If not, perhaps concatenate in user-device-location? Just trying to figure out some way to make it easily identifiable. I have 6 of the same devices in the house, having something to go "oh that's that one" is very helpful.
|
What about |
I agree. That should resolve everything. May still want to strip a quote in the event a manufacturer doesn't play nice and includes it. |
Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
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.
LGTM and Thank You!
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.
LGTM, thanks.
@@ -109,17 +109,19 @@ roku:roku_tv:mytv1 "My Roku TV" [ hostName="192.168.10.1", refresh=10 ] | |||
|
|||
String Player_ActiveApp "Current App: [%s]" { channel="roku:roku_player:myplayer1:activeApp" } | |||
String Player_ActiveAppName "Current App Name: [%s]" { channel="roku:roku_player:myplayer1:activeAppName" } | |||
String Player_Button "Send Command to Roku" { channel="roku:roku_player:myplayer1:button" } | |||
String Player_Button "Send Command to Roku" { channel="roku:roku_player:myplayer1:button", autoupdate="false" } |
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.
Seeing this reminded me of #12141. Do you think a similar solution would be relevant here as well? Not for this PR obviously, just a side note.
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.
Seeing this reminded me of #12141. Do you think a similar solution would be relevant here as well? Not for this PR obviously, just a side note.
I can address that in a future PR. Is this just a substitute/implicit way of setting autoupdate="false"?
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.
The veto policy will make sure that the command is sent, but without automatically updating the item state:
https://www.openhab.org/docs/developer/bindings/thing-xml.html#auto-update-policies
Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com> Signed-off-by: Andras Uhrin <andras.uhrin@gmail.com>
Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com> Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
Improve the label that is given to the thing by the discovery process. Previously TV things were not easily identified as a Roku device by the model name provided by the API. The
friendly-model-name
anduser-device-location
fields are now combined to help the user identify the thing in case of duplicate devices in different rooms. The strings are formatted to remove any extraneous characters as seen in the friendly-model-name example.Addresses #15797 by setting a timeout on http requests sent to the roku device. Previously if the device was to crash while an http request was in progress it could cause the binding to hang.
Addresses #16164 by setting the uuid property to prevent manually added things from appearing in the inbox.