Interest in Edge Driver for Roku devices?

Wow! This is fantastic

1 Like

This are some old screenshots from Classic app. It might help with what was available before



Just to set everyoneā€™s expectations, we all need to remember that the proposal was just for an Edge device, not a SmartApp. :grin:

3 Likes

People are getting a little excited :rofl: and not too many pā€™s and qā€™s I see!

This is always an issue with IR commands, I use a smart plug on the tv for power. Or you can poll the tv with a device like a nodemcu and the Host Pinger smart app for certainty.

1 Like

Absolutely. TCL, Premeire and Stick would all be great. On/Off, volume and app selection would be the goal. The ā€œNetflix and Chillā€ scene would finally be complete :slight_smile:

@jkp good point! I had forgotten about that.

I was incorrect. I ā€‹just tried the following commands in Web Requestor and all work as expceted
keypress/power - turns TV on/off
keypress/powerOff - only turns off
keypress/powerOn - only turns on

1 Like

OK everybody, youā€™ve convinced me thereā€™s enough interest. Keep the comments coming on highest priority controls; meanwhile Iā€™ll get started on the driver. Iā€™ll try to have a first pass for you all to look at by sometime next week.

6 Likes

Very cool! Thanks for confirming.

Already a legend! Roku driver will be huge.

2 Likes

Quick update on progress of a Roku Edge driver:

I have the basics working with my 2 Roku sticks (model 3600X and 3800X). I havenā€™t spent a lot of time on a pretty interface - itā€™s fairly utilitarian at this point, but has a power control button (more on that below), media player status, current media app, ability to chose media app, and ability to send any keypress command supported.

I think one of the biggest issues will be that these states have to be retrieved from the Roku via a polling mechanism. There is no way that Iā€™ve seen so far to subscribe to any device states or otherwise get updates in realtime. Iā€™ve included a preferences setting to configure the polling interval and defaulted it to 20 seconds. I think an absolute minimum will be 5 seconds because of likely hitting SmartThings platform rate limits on field updates. Remains to be seen what impact frequent polling has on the performance of the Roku device itself.

Now regarding power, which based on all your input is the number one desired control: As discussed earlier, with the Roku sticks I have, once they are off (and some models cannot even be turned off), you cannot turn this back on again via the LAN - because, well, they are powered off! And the other issue to consider is that there will always be a delay until the next polling cycle to know when it is turned back on.

So net net, issuing commands is instant, of course since itā€™s all local. But having updates on the Rokuā€™s state will always be delayed depending on polling frequency.

Donā€™t know if the above is a show-stopper for any of you, but wanted to get this out there for comment.

Next Steps

  • I need to start seeing about utilizing the ā€˜prettierā€™ stock media playback controls
  • Iā€™ve started with what the documentation says is available on all Roku devices, but need to now expand that to Roku TV-related controls and attributes. For this part I will need a willing guinea pig or two to be my testers.
1 Like

I have a couple different Rokus, including RokuTV. I can test.
Roku Stick usually donā€™t have Power button.
Roku Premiere + does have power button, and it can turn TV on as is always connected to network.

1 Like

I can help test if needed.

1 Like

Happy to test for you

1 Like

I will happily test this, I have 3 Roku 4k streaming sticks and some Roku express.
Each of these support on/off via API.

This has got me think of it would be possible to take advantage of Google Cast API/TTS

1 Like

I truly think Iā€™m going insane. For the life of me I can no longer replicate the power on behavior by sending keypress/power to a roku stick. You and I both saw that working before! Now when I send a keypress/power with the TV turned off, I get no return at all from the http request. If I try it from a browser I get a ā€˜page canā€™t be foundā€™ error, and if I try it from Web Requestor, it just times out with no return. Were we hallucinating?! I could have sworn we both were able to turn the TV with Roku stick back on from being turned off. Can you please see if you can replicate it again? Or did I misunderstand and you see that only with a Roku TV?

Sending either keypress/power or keypress/PowerOff when the TV is on, turns it off as before.

Grant it, keypress/power is not in the documentation, so I was surprised it worked the first time we tried itā€¦

I have tried that from Web Requestor first day when you posted, and it worked

I canā€™t get it to work either. Iā€™m getting the same results as you.

1 Like

My RokuTV and Roku Premiere+ turns On and Off, and Premiere+ turns Samsung TV on and off. Only stick goes OFF, but there is no ON. I have to figure that out, as stick gets power from TV, and when itā€™s turned OFF, it shuts down TV and cuts power to itself :thinking:

This is a great post. I like this topic. I found many interesting things from this site. Thanks for posting this again.