Developers

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
MrWassen
Reel Rookie

Having issues with some ECP commands

Jump to solution

Hi guys,

I am looking to control my Roku 3 from a home automation system and started by testing ECP commands from a browser on the LAN but am having mixed results:

Queries seem to work fine, e.g. http://<Roku IP address>:8060/query/apps 

returns a list of applications.

However, a keypress command like http://<Roku IP address>:8060/keypress/home

returns an http 400 error.

Is there anything additional that needs to be enabled on the device for this to work? Any help would be appreciated.

Thanks

Dennis

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
renojim
Community Streaming Expert

Re: Having issues with some ECP commands

Jump to solution

I don't know if you can do it from a browser.  Try using curl.

curl -d "" http://rokuip:8060/keypress/Home
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.

View solution in original post

Tags (1)
3 REPLIES 3
renojim
Community Streaming Expert

Re: Having issues with some ECP commands

Jump to solution

I don't know if you can do it from a browser.  Try using curl.

curl -d "" http://rokuip:8060/keypress/Home
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
Tags (1)
MrWassen
Reel Rookie

Re: Having issues with some ECP commands

Jump to solution

Thanks - that did the trick!

Tags (1)
0 Kudos
scott4566
Reel Rookie

Re: Having issues with some ECP commands

Jump to solution

Powershell

Browser doesn’t use post do it won’t work via a browser.

Invoke-RestMethod -Uri "http://$($deviceIP):8060/launch/2213" -Method Post
    Start-Sleep -Seconds 5
    Invoke-RestMethod -Uri "http://$($deviceIP):8060/keypress/Select" -Method Post
    Start-Sleep -Seconds 1
    Invoke-RestMethod -Uri "http://$($deviceIP):8060/keypress/Right" -Method Post
    Start-Sleep -Seconds 1
    Invoke-RestMethod -Uri "http://$($deviceIP):8060/keypress/Select" -Method Post
    Start-Sleep -Seconds 1
    Invoke-RestMethod -Uri "http://$($deviceIP):8060/keypress/Right" -Method Post
    Start-Sleep -Seconds 1
    Invoke-RestMethod -Uri "http://$($deviceIP):8060/keypress/Play" -Method Post
    Start-Sleep -Seconds 1
    Invoke-RestMethod -Uri "http://$($deviceIP):8060/keypress/Pause" -Method Post
    Start-Sleep -Seconds 1
0 Kudos
Community is Being Upgraded!

We’re upgrading Roku Community to bring you a faster, more mobile-friendly experience. You may notice limited functionality or read-only access during this time. Read more here.

Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 19th and you may notice reduced functionality. In the meantime, for additional assistance, visit our Support Site.

We're sorry for this disruption — we’re excited to share what’s next!