ESP8266 nodeMCU calls to Roku’s ECP API
Posted: Tue Feb 19, 2019 11:26 am
I am trying to make a physical Roku remote for our house that includes an ESP8266 nodeMCU. (I am using the Arduino IDE). But I am having trouble accessing parts of the Roku’s API. Many API calls work well with simple HTTP, but not so for the ‘query’ command to request current Roku status information: available channels, current channel, …etc.
This request works from my MacBook Pro’s terminal application:
curl http://192.168.1.134:8060/query/apps
…and similarly, this works from my browser’s address bar:
http://192.168.1.134:8060/query/apps
Both of these inquiries return the anticipated response data:
Question: How can I code the ESP8266 to make a similar call successfully? I’m stumped!
Note: I am not an IT nor a developer, just an old man and “I do not know what I do not know” about these use-cases. That is, I do not know what exactly to post as a question to solicit proper help. Please bear with me.
Thank you in advance for your time and patience.
This request works from my MacBook Pro’s terminal application:
curl http://192.168.1.134:8060/query/apps
…and similarly, this works from my browser’s address bar:
http://192.168.1.134:8060/query/apps
Both of these inquiries return the anticipated response data:
Code: Select all
<apps>
<app id="12" subtype="ndka" type="appl" version="4.2.81179021">Netflix</app>
<app id="2285" subtype="rsga" type="appl" version="6.13.2">Hulu</app>
<app id="86398" subtype="rsga" type="appl" version="4.1.11">SYFY</app>
<app id="68669" subtype="rsga" type="appl" version="3.0.0">NBC</app>
…
</apps>
Question: How can I code the ESP8266 to make a similar call successfully? I’m stumped!
Note: I am not an IT nor a developer, just an old man and “I do not know what I do not know” about these use-cases. That is, I do not know what exactly to post as a question to solicit proper help. Please bear with me.
Thank you in advance for your time and patience.