-
-
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
[roku] binding - initial implementation #9571
Conversation
Signed-off-by: Michael Lobstein <[email protected]>
I'll post some tips whilst you wait for someone to do a review. In your roku.xml file you have channels that are not camelCase. active_app should become activeApp which will mean multiple files including the readme need to be updated. Apply this to all your channels. |
catch (RokuHttpException e) { Remove the logger.debug line and instead just put the message into the ThingStatus updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, "Enter a nice friendly string of text here."); |
Signed-off-by: Michael Lobstein <[email protected]>
Thanks, I updated the channel names. I think it is OK to leave off the exception message from the ThingStatusDetail. This exception is caused by a communication failure and in that situation the exception message will not provide anything useful to the user. |
bundles/org.openhab.binding.roku/src/main/resources/OH-INF/thing/roku.xml
Show resolved
Hide resolved
I'm going to play devils advocate for a second (because I can totally make a case in both directions). Why should the Roku get a binding? The new HTTP binding works really well with the Roku's with very minimal effort. I posted an example at https://community.openhab.org/t/roku-support-on-oh3-using-http-binding/110533 a few days back. What will this binding bring that the HTTP binding is unable to provide? |
Generally speaking when compared to using the HTTP binding to scrape an endpoint, a dedicated binding will provide a more robust implementation. For roku, this binding provides device discovery, a dynamically updated drop-down to launch installed apps, status channels that update when a stream is playing (play state, elapsed time & total time) and a drop down with available remote button commands (filtered based on standalone roku vs roku tv). Also to speed the development of future improvements, all available xml data elements from the api are mapped in the dto objects. |
...penhab.binding.roku/src/main/java/org/openhab/binding/roku/internal/handler/RokuHandler.java
Outdated
Show resolved
Hide resolved
...penhab.binding.roku/src/main/java/org/openhab/binding/roku/internal/handler/RokuHandler.java
Outdated
Show resolved
Hide resolved
...penhab.binding.roku/src/main/java/org/openhab/binding/roku/internal/handler/RokuHandler.java
Outdated
Show resolved
Hide resolved
...ing.roku/src/main/java/org/openhab/binding/roku/internal/discovery/RokuDiscoveryService.java
Outdated
Show resolved
Hide resolved
...ing.roku/src/main/java/org/openhab/binding/roku/internal/discovery/RokuDiscoveryService.java
Show resolved
Hide resolved
bundles/org.openhab.binding.roku/src/main/resources/OH-INF/thing/roku.xml
Outdated
Show resolved
Hide resolved
...ing.roku/src/main/java/org/openhab/binding/roku/internal/discovery/RokuDiscoveryService.java
Outdated
Show resolved
Hide resolved
...ing.roku/src/main/java/org/openhab/binding/roku/internal/discovery/RokuDiscoveryService.java
Outdated
Show resolved
Hide resolved
...ing.roku/src/main/java/org/openhab/binding/roku/internal/discovery/RokuDiscoveryService.java
Outdated
Show resolved
Hide resolved
...ing.roku/src/main/java/org/openhab/binding/roku/internal/discovery/RokuDiscoveryService.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Michael Lobstein <[email protected]>
Signed-off-by: Michael Lobstein <[email protected]>
A) If someone is willing to build and maintain (and review it) it that is not "you" then why care? OP, Thank you for your work. Sorry I know you were playing Devils Advocate but that hits a raw nerve for me. For the record I don't use Roku and have no intension of doing so, but good to know it is there. |
Signed-off-by: Michael Lobstein <[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.
LGTM
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
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/roku-support-on-oh3-using-http-binding/110533/11 |
* Roku binding - initial implementation * update channel names to camelCase * review changes * spelling * update README.md Signed-off-by: Michael Lobstein <[email protected]> Signed-off-by: John Marshall <[email protected]>
* Roku binding - initial implementation * update channel names to camelCase * review changes * spelling * update README.md Signed-off-by: Michael Lobstein <[email protected]>
* Roku binding - initial implementation * update channel names to camelCase * review changes * spelling * update README.md Signed-off-by: Michael Lobstein <[email protected]>
This PR is the initial implementation of a new binding to control Roku Streaming Media Players & Roku TVs.
Test build available here:
https://github.com/mlobstein/mlobstein-beta-test/raw/master/org.openhab.binding.roku-3.1.0-SNAPSHOT.jar
https://github.com/mlobstein/mlobstein-beta-test/raw/master/org.openhab.binding.roku-3.1.0-SNAPSHOT-sources.jar