Roku "my home" channel?

What if we could meld SmartTiles and Roku - so you could see/control things using your tv remote?

I’ve poked around a bit at the Roku SDK, it looks somewhat icky but not impossible. Anyone interested in poking around this area?

4 Likes

I would love this idea! That said, I’m not a developer, but I’d be happy to help as a beta tester.

I haven’t seen anyone make a web browser in roku. I’m sure if it were possible someone would have by now. I think roku is getting closer to something like that though.

@schettj I actually started building this probably close to a year ago but other things came up. I didn’t get very far but I will dig back and see what code i still have.

@keithcroshaw So actually there is a mythical web browser for the roku called oversight. If you look hard you can find it in a few places on the web. You have to put your unit in developer mode to get it installed. Its what i was basing my code on. I will see what i can track down…

2 Likes

Seems like too much work for me. :stuck_out_tongue_closed_eyes:

I’ll stick to my iPad.

Nice. I was thinking more along the lines of how the “plex” channel works - you get very nice icons for series and shows, with descriptive text - seems like you could generate a Roku interface for the Dashboard so you can navigate by capability, or “recent activity” or any number of interesting things… and drill down to choosing phrases, modes, on/off control, etc…

It would be non-trivial, but probably cool.

1 Like

hi Schttj

I built a Roku manager and monitor for SmartThings my daughter this weekend, are you still interested in this if so I can share the code.


5 Likes

Hi guys

I have uploaded the code for use.

1 Like

Thank you for this awesome integration. I’ve found out that I can send keys PowerOn and PowerOff to control my Roku TV so I have modified your code to work with it. I’m also thinking on adding all keys to the DTH so it can be used as a keyboard. Would you like me to make pull requests to your code or may I publish that myself (with credits to you)?

Thank you again, it works with my Roku TV - I actually started implementing it, when I found yours. I was about 10% done at that point, but I then went on with your code.

Hi ady624

Awsome, glad it was useful.

Please send a pull request as I would love to have your mods as well.

Hi Ady624

Any chance I can get your code?

Oh sorry,forgot about it. There were other things I wanted to do but never finished. Like sync with the TV should it get a new IP…

Hi ady624

The IP address change is already managed by the Roku Manager app (I think I scheduled it for every 5 minutes) as it scans using SSDP and then adds or updates the devices details including IP address.

1 Like

Cool, not sure if my version does it, so it’s definitely got to be a pull request :smiley:

Actually, this is the change I made:

Replaced this:

//-------------- Switch Commands --------------//
        def on() {
            sendEvent(name: "switch", value: "on")      
        }
        def off() {
            sendEvent(name: "switch", value: "off")
        }
//^^^^^^^^^^^^^^ Switch Commands ^^^^^^^^^^^^^^//

with this:

//-------------- Switch Commands --------------//
def on() {
    rokuKeyPressAppAction("PowerOn")
    refresh()
}

def off() {
    rokuKeyPressAppAction("PowerOff")
    refresh()
}
//^^^^^^^^^^^^^^ Switch Commands ^^^^^^^^^^^^^^//

Awsome, I will implement it

First, thanks for this app / dh.

I wanted to use the my Rokus as part of automation in CoRE. Specifically I wanted to know if the device was in an app or at the screensaver / home. I noticed that the devices didn’t update when changing state (I realize the roku won’t send you status unless you ask for it.). So I made the connect app refresh the devices on a schedule.

Code for SmartApp

def initialize() {
	unsubscribe()
	unschedule()
	
    state.subscribe = false
	
	if (selectedDevices) {
		addDevices()
	}
    
    refreshDevices()

	runEvery5Minutes("ssdpDiscover")
    runEvery10Minutes(refreshDevices) //<--- Added this
}

def refreshDevices() { //<-- Added this whole method
	log.debug "Refreshing Rokus..."
    getChildDevices().each { it->
    	log.debug "Refreshing ${it.currentValue('userdevicename')}."
        it.refresh()
    }
    log.debug "Refreshing Rokus Complete."
}

attribute "userdevicename", "String" //<--Added this attribute

New to ST, is there a way to add the navigation buttons? Up, Down, Left, Right? Adding in some logic when launching “TV Time” routine with CoRE;

1 Like

Hi @MadMouse, are you still around, I’m thinking of building an app to provide Alexa control to Roku, main thing I think I’ll need is a way to translate the installed apps and IDs in the Roku in to a map… if you are able to let me know how to extract this from the XML then I think I can do the rest… if not then I’m sure I could work it out, just might save me a few hours! :wink:

Having done a little bit of reading, it looks like it could be much simpler than I thought… just need to write it now…