waleedelmandouh Posted April 13, 2018 Posted April 13, 2018 Hi, I was wondering it if would be possible to add network integration for Roku devices to make ISY programs act as remote controllers. I know there is an IR sender device that should work with ISY, tried it and it doesn't work at all. Not blaming it on ISY though as the test of repeating the stored signal never passed. But recently many remote controls not just Roku are actually based on network connection with the controlled device. If this is done, all new AV devices can be easily controlled by ISY in and way we want.
oberkc Posted April 13, 2018 Posted April 13, 2018 Many of my roku devices (I probably have about eight of them) do NOT have IR control. I believe it depends upon which model you have. Those "point anywhere" remotes available on some do not use the wifi network (no joining of the network required). I believe they are RF, but not sure what standard is used (bluetooth? Proprietary?) ROKU has an app for your phone, however, that DOES work via your wifi network. I assume that these codes, if available, could be used as a network resource to send commands to the roku. Perhaps something like wireshark could sniff out those commands?
waleedelmandouh Posted April 13, 2018 Author Posted April 13, 2018 oberkc, yes this is exactly what i'm talking about. I don't wanna use IR anymore. I'm looking for a way to replicate the Roku WiFi network commands from ISY programs.
MWareman Posted April 13, 2018 Posted April 13, 2018 Roku devices have a local API you can call.I’m using it to press ‘Home’ on my bedroom Roku right after the power usage from my GEM indicates the TV is turned off (so PlayStation Vue stops streaming when the sleep timer turns off the TV).I’ll look it up when I get home later.
MWareman Posted April 13, 2018 Posted April 13, 2018 It’s documented here: https://sdkdocs.roku.com/plugins/servlet/mobile#content/view/1611563For some reason, it keeps prompting for authentication on my iPad - but displaying the content anyway. However, I cannot copy it out...
MWareman Posted April 13, 2018 Posted April 13, 2018 Got it... External Control Service CommandsThe external control services provided by ECP are included in a simple RESTful API accessed using HTTP on port 8060. Once you have the Roku device IP address, you can issue the following external control service commands to the Roku device.General ECP commandsCommand Descriptionquery/apps Returns a map of all the channels installed on the Roku device paired with their application ID.This command is accessed using an HTTP GET.query/active-appReturns a child element named 'app' that identifies the active application, in the same format as 'query/apps'. If no application is active, such as when the user is in the homescreen, the element only contains "Roku". If a screensaver is active, a second element will be included containing "screensaver". If the screensaver is an application-provided or plug-in screensaver, the same information is provided as 'query/apps'. If the screensaver is active, but is not running (such as due to system limitations), the screensaver element contains "black". This command is accessed using an HTTP GET.keydown/keyEquivalent to pressing the remote control key identified after the slash. This command is sent using an HTTP POST with no body.keyup/keyEquivalent to releasing the remote control key identified after the slash. This command is sent using an HTTP POST with no body.keypress/keyEquivalent to pressing down and releasing the remote control key identified after the slash. You can also use this command, and the keydown and keyup commands, to send keyboard alphanumeric characters when a keyboard screen is active, as described in Keypress Key Values. This command is sent using an HTTP POST with no body.launch/appIDLaunches the channel identified by appID. You can follow the appID with a question mark and a list of URL parameters to be sent to the application as an associative array, and passed to the RunUserInterface() or Main() entry point. This command is sent using an HTTP POST with no body.The launch command should not be used to implement deep-linking to an uninstalled channel, because it will fail to launch uninstalled channels. Use the install command instead for uninstalled channels.install/appIDExits the current channel, and launches the Channel Store details screen of the channel identified by appID. You can follow the appID with a question mark and a list of launch parameters to be sent to the application as an associative array, and passed to the RunUserInterface() or Main() entry point. If launch parameters are given, the channel is launched immediately after the user installs the channel, and deep-links to content provided in the launch parameters. This command is sent using an HTTP POST with no body.query/device-infoRetrieves device information similar to that returned by roDeviceInfo. This command is accessed using an HTTP GET.query/icon/appIDReturns an icon corresponding to the application identified by appID. The binary data with an identifying MIME-type header is returned. This command is accessed using an HTTP GET.Example:GET /query/icon/12inputSends custom events to the current application. It takes a user defined list of name-value pairs sent as query string URI parameters. The external control server places these name-value pairs into an associative array, and passes them directly through to the currently executing channel script using a Message Port attached to a created roInput object. Input Command Conventions includes detailed recommendations on how to pass your data. Messages of type roInputEvent have a GetInfo() method that will obtain the associative array. The arguments must be URL-encoded. This command is sent using an HTTP POST with no body.Example:POST /input?acceleration.x=0.0&acceleration.y=0.0&acceleration.z=9.8searchEnables an external client to drive the Roku Search UI to find and (optionally) launch content from an available provider. This command does not return any data back to the external client and is not intended to power a custom UI based on Roku data. This command is sent using an HTTP POST with no body.See search Examples below for usage information.Note: the search feature is available in firmware 7.5 or later. Terrible formatting. Hopefully you can make it out. I’ll try a tidy version later tonight...
MWareman Posted April 13, 2018 Posted April 13, 2018 The key values you can send: The following are the key names that are recognized by ECP: Home Rev Fwd Play Select Left Right Down Up Back InstantReplay Info Backspace Search Enter
waleedelmandouh Posted April 14, 2018 Author Posted April 14, 2018 MWareman, Wow, thanks a lot. This is amazingly helpful. I still need to figure out how to drive those commands by ISY programs. Do you have a example of how to do that?
waleedelmandouh Posted April 14, 2018 Author Posted April 14, 2018 Well, not by itself. But under it's description it says irs included under ISY Portal midule, which i have.
waleedelmandouh Posted April 14, 2018 Author Posted April 14, 2018 MWareman, I did some research and finally i figured it out, thanks a lot for your help. I have a problem with the launch/appid i tried it with many different channels and player in the house never works, any idea why or how to do it?
waleedelmandouh Posted April 14, 2018 Author Posted April 14, 2018 I finally got it man. I was missing the content id
Recommended Posts
Archived
This topic is now archived and is closed to further replies.