# Having issues with some ECP commands

**URL:** <https://forum.developer.roku.com/t/having-issues-with-some-ecp-commands/9463>\
**Category:** Archived\
**Tags:** roku-developer-program\
**Created:** [August 10, 2020, 2:03pm UTC](https://forum.developer.roku.com/t/having-issues-with-some-ecp-commands/9463 "2020-08-10T14:03:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MrWassen](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@MrWassen](https://forum.developer.roku.com/u/MrWassen)\
**Post date:** [August 10, 2020, 2:03pm UTC](https://forum.developer.roku.com/t/having-issues-with-some-ecp-commands/9463/1 "2020-08-10T14:03:25Z")

</div>

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](http://192.168.237.101:8060/query/apps)

returns a list of applications.

However, a keypress command like [http://:8060/keypress/home](http://192.168.237.101:8060/query/apps)

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

---

<div class="post-metadata">

**Author:** ![renojim](https://avatars.discourse-cdn.com/v4/letter/r/ecae2f/32.png) [@renojim](https://forum.developer.roku.com/u/renojim)\
**Post date:** [August 10, 2020, 8:32pm UTC](https://forum.developer.roku.com/t/having-issues-with-some-ecp-commands/9463/2 "2020-08-10T20:32:09Z")

</div>

I don’t know if you can do it from a browser. Try using [curl](https://curl.haxx.se/).

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

```

---

<div class="post-metadata">

**Author:** ![MrWassen](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@MrWassen](https://forum.developer.roku.com/u/MrWassen)\
**Post date:** [August 10, 2020, 8:35pm UTC](https://forum.developer.roku.com/t/having-issues-with-some-ecp-commands/9463/3 "2020-08-10T20:35:59Z")

</div>

Thanks - that did the trick!

---

<div class="post-metadata">

**Author:** ![scott4566](https://avatars.discourse-cdn.com/v4/letter/s/f4b2a3/32.png) [@scott4566](https://forum.developer.roku.com/u/scott4566)\
**Post date:** [December 4, 2022, 9:57am UTC](https://forum.developer.roku.com/t/having-issues-with-some-ecp-commands/9463/4 "2022-12-04T09:57:53Z")

</div>

Powershell

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

```auto
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

```
