This SmartApp creates virtual button devices for the apps installed on your Roku device. I’m using this with a Google Home to switch inputs on my TCL Roku TV, for example “OK Google, switch to the xbox” triggers IFTTT to press the “Roku: Game console” button.
Instructions:
• Install the requirements above and then launch the “Roku (Connect)” SmartApp to discover and pair your Roku device
• Launch the Roku Virtual Buttons SmartApp and select your Roku device, then tap the Done button
When the settings are saved, the SmartApp will create button devices for each app on your Roku, they should appear in your My Home list with the prefix "Roku: "
Thanks for this magic trick! Works awesome I do have a question and comments once I get to play with this. I have google home and I can’t wait to test this, Have not figured out a way, or the command to turn off the TV via ST. I, would like to turn off the TV by voice command if the remote is not handy or “lost” at the moment.
I use a Logitech Harmony to turn my tv on and off, but it should be possible to add another button tile to turn the TV off via the remote API. It wouldn’t be able to turn the TV on, however, as it disconnects from the WiFi network a few minutes after going into standby mode. I’ll look into adding an “off” button to the list of actions.
Sometimes I use the ROKU app to turn the TV off, but using ST with voice commands would be better. I would try to do it myself but not enough knowhow for now. Need beta tester let me know.
I also get an error. It says, via red error ribbon on the top of the screen, “An unexpected error occurred.” This happens right after I launch the Roku Virtual Buttons SmartApp and select my Roku device, give it a name and then tap the Done button.
I don’t have an amazing solution or lots of documentation here. But I’ve figured out how to turn off and turn on a TCL Roku TV.
Given the TV hasn’t fell asleep, you can power it on by sending a GET request to /keypress/Power. But your TV usually falls asleep. To wake it, you can send a WOL packet to the MAC address.
To turn the TV off, a GET request of /keypress/PowerOff should do.
Here is a Device Type that will only turn the TV on and off. Feel free to combine it with c99koder’s Device Type.
Very cool, I didn’t realize the TV responded to WOL packets! I’ll integrate this with my device type and add power on / off buttons to the smartapp soon
java.lang.IllegalArgumentException: Command ‘getAllActivities’ is not supported by device 9911e824-c9bc-4ea0-94a1-83073e4b44e7 of type ‘Roku’. Supported commands: [on, off, refresh, startActivity, homeButton, selectButton, previousButton, nextButton, launchAppId, startActivityWithContent, pressKey] @ line 44
How would I expose the Roku remote buttons as momentary pushbuttons?
(or otherwise call the commands defined in the MadMouse app from, say CoRE or similar?)
Cool. I wanted to see if this will work if I have a Roku 3 as opposed to a Roku TV. Also, I have Sling TV that I watch on my Roku. Is there anyway to create a virtual button so I can go into Sling and watch a particular channel?