Having issues with some ECP commands

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://:8060/query/apps

returns a list of applications.

However, a keypress command like http://: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

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

curl -d "" http://rokuip:8060/keypress/Home

Thanks - that did the trick!

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