Your Digital Media Has Never Looked So Good

 
gregoryscott
Topic Author
Posts: 8
Joined: Tue Feb 12, 2019 9:35 am

Roku's USB to ESP8266 NodeMCU to Get '/query/...'

Tue Feb 12, 2019 9:46 am

I added an ESP8266 nodeMCU for TV and SoundBar IR commands. It also provides a LAN server delivering an HTML/javascript based remote controller to my devices - computer, tablets and mobile phones. 

I use this same remote setup for both a Roku4 w/ an old Dynex (dumb) TV as well as a newer TCL Roku Smart TV w/ soundbar.

Question is, can I access Roku data as used to be provided by ECP queries like '/query/apps' and '/query/active-app' via the Roku's USB port? ...if not, what is required to accomplish this end?
 
renojim
** Valued Community Member **
Posts: 3491
Joined: Mon Feb 15, 2010 1:35 pm

Re: Roku's USB to ESP8266 NodeMCU to Get '/query/...'

Tue Feb 12, 2019 12:29 pm

gregoryscott wrote:
can I access Roku data as used to be provided by ECP queries like '/query/apps' and '/query/active-app' via the Roku's USB port?

I'm not sure what you're asking here.  Are you saying that previously you could access the data via the USB port and you can't now?  If so, I didn't know that was ever possible.  If you're asking if there's anyway to access it now via the USB port, I'd have to ask why would you want that?  The only way I know of to access the data is via TCP on port 8060 (e.g., http://<device IP>:8060/query/apps). Surely you can access it that way, no?

-JT
 
User avatar
atc98092
Posts: 3882
Joined: Tue Dec 31, 2013 5:09 pm
Location: Auburn, WA

Re: Roku's USB to ESP8266 NodeMCU to Get '/query/...'

Tue Feb 12, 2019 1:09 pm

gregoryscott wrote:
Question is, can I access Roku data as used to be provided by ECP queries like '/query/apps' and '/query/active-app' via the Roku's USB port? ...if not, what is required to accomplish this end?

The USB port is for attaching a storage device containing media for playback, nothing more. It has no other function, and cannot be altered to do anything else. What renojim offered is the only method of retrieving information from a Roku. 
Dan
Nvidia Shield, Roku Stick (3600), Ultra (4640), Premiere (3920), Insignia 720p Roku TV, Sharp 4K Roku TV, Windows 10 Pro x64 running Serviio and Plex on a wired Gigabit network.
 
gregoryscott
Topic Author
Posts: 8
Joined: Tue Feb 12, 2019 9:35 am

Re: Roku's USB to ESP8266 NodeMCU to Get '/query/...'

Tue Feb 12, 2019 2:00 pm

Thank you both for your responses.

Sorry for the confusion renojim. No, I have never used the USB port for data access. What I meant was that I used to use javascript from my web page to access the data from ‘http://192.186.1.xxx:8060/query/apps’ but that that does not work anymore as per the security updates. So I am looking for another way and wrongly thought that that the USB port may be an alternative. But thanks to atc98092’s post now I know that I can not.

So I back to the same question, how else can I make this work again? 

Thank you both again for your time and responses.
 
Tajson
Posts: 337
Joined: Wed Jul 20, 2011 10:50 am

Re: Roku's USB to ESP8266 NodeMCU to Get '/query/...'

Tue Feb 12, 2019 2:29 pm

gregoryscott wrote:
So I back to the same question, how else can I make this work again?

Roku has "recently" limited developer tools etc so this could have been shut off with that change as well. Not saying that you should but you could enroll in the developer program.
 
User avatar
atc98092
Posts: 3882
Joined: Tue Dec 31, 2013 5:09 pm
Location: Auburn, WA

Re: Roku's USB to ESP8266 NodeMCU to Get '/query/...'

Tue Feb 12, 2019 4:05 pm

I just tried http://192.168.0.XX:8060/query/apps and received a response from my Ultra. Also tried it on one of my Roku TVs that isn't even turned on (in standby) and it too returned the query. The TV has developer mode enabled, but I don't remember doing that with the Ultra. Are you certain there isn't something amiss with your script? I'm assuming you made a typo with the second octet being 186 instead of 168. 
Dan
Nvidia Shield, Roku Stick (3600), Ultra (4640), Premiere (3920), Insignia 720p Roku TV, Sharp 4K Roku TV, Windows 10 Pro x64 running Serviio and Plex on a wired Gigabit network.
 
renojim
** Valued Community Member **
Posts: 3491
Joined: Mon Feb 15, 2010 1:35 pm

Re: Roku's USB to ESP8266 NodeMCU to Get '/query/...'

Tue Feb 12, 2019 4:12 pm

It seems unlikely that Roku would block access to /query/apps since isn't that how all remote control apps get the list of installed channels/apps?  They'd all stop functioning.

gregoryscott, are your ESP8266 nodeMCU and Roku on the same network? For example, you said your Roku's IP is 192.168.1.xxx. Is your ESP8266 nodeMCU at 192.168.1.yyy?

-JT
 
gregoryscott
Topic Author
Posts: 8
Joined: Tue Feb 12, 2019 9:35 am

Re: Roku's USB to ESP8266 NodeMCU to Get '/query/...'

Thu Feb 14, 2019 12:49 pm

Again thanks for the replies.  I've been without internet access since I last posted, argh!

I do get a proper response with http://192.186.1.xxx:8060/query/apps' in the browser's address bar, just not my javascript, which as suggested above, could be wrong. However, it did work some time ago and still all of my commands - keydown, keyup, keypress... work fine. I have tried javascript's 'fetch' and  'XMLHttpRequest' commands as well as a simple form submittal with  [font=-apple-system, Helvetica Neue, Helvetica, sans-serif]‘[color=#215eb0]http://192.186.1.xxx:8060/query/apps' set as the form's action, to no avail.[/color][/font]

Perhaps someone has a simple working example; HTMLw/ the correct javascript that they are willing to share with ma as a kick start.

As for the development program, it seems way over my head as I am too old to learn something radically new to me today. ...well not really, but I do forget more than I remember these days.

Again thanks to all.
 
User avatar
atc98092
Posts: 3882
Joined: Tue Dec 31, 2013 5:09 pm
Location: Auburn, WA

Re: Roku's USB to ESP8266 NodeMCU to Get '/query/...'

Thu Feb 14, 2019 2:45 pm

Again, I question your IP address in your example. I realize you X'd out the last octal, but unless your network is very non-standard it should be 192.168.xxx.xxx. If that's a copy from your javascript, that might be your issue. 
Dan
Nvidia Shield, Roku Stick (3600), Ultra (4640), Premiere (3920), Insignia 720p Roku TV, Sharp 4K Roku TV, Windows 10 Pro x64 running Serviio and Plex on a wired Gigabit network.
 
gregoryscott
Topic Author
Posts: 8
Joined: Tue Feb 12, 2019 9:35 am

Re: Roku's USB to ESP8266 NodeMCU to Get '/query/...'

Thu Feb 14, 2019 4:37 pm

Please bear with me. I do not understand the issue w/ the "local WiFi" IP address.
It is given by my router as: '192.168.1.123' or whatever, so to use ECP it would be '192.186.1.123:8060' ...no?
I mean, as I said above, most ECP commands work fine, just not so with the 'query' command and I do not understand why.

atc98092 - Do  mean it should be '192.186.001.123' .eg. '192.168.001.123:8060'???
I appreciate your time and patience.

P.S. I am a bit dyslexic 186 should be 168 for sure. Sorry. It is in code.
 
renojim
** Valued Community Member **
Posts: 3491
Joined: Mon Feb 15, 2010 1:35 pm

Re: Roku's USB to ESP8266 NodeMCU to Get '/query/...'

Fri Feb 15, 2019 12:58 am

You might want to post in the developer forum.  You don't have to be a developer.  You may be more likely to get help with javascript there.  If ECP commands are working and you're able to fetch /query/apps in a browser, I'd guess it has something to do with the code.  Also, as atc98092 said, double check the IP address you're using.  It should be 192.168.1.123:8060.

-JT
 
User avatar
atc98092
Posts: 3882
Joined: Tue Dec 31, 2013 5:09 pm
Location: Auburn, WA

Re: Roku's USB to ESP8266 NodeMCU to Get '/query/...'

Fri Feb 15, 2019 8:45 am

I'm only mentioning the IP address because the range you are showing isn't considered a private IP address, and Roku has remote access limitations when it thinks it's on a public network. If your router is truly assigning the IP address range of 192.186.1.x, it's configured incorrectly for a private network. 
Dan
Nvidia Shield, Roku Stick (3600), Ultra (4640), Premiere (3920), Insignia 720p Roku TV, Sharp 4K Roku TV, Windows 10 Pro x64 running Serviio and Plex on a wired Gigabit network.
 
User avatar
jeffrok
** Valued Community Member **
Posts: 5522
Joined: Sun Nov 30, 2008 4:51 pm
Location: Milwaukee, WI
Contact:

Re: Roku's USB to ESP8266 NodeMCU to Get '/query/...'

Fri Feb 15, 2019 10:29 am

In one post he says 192.186 and in another he says 192.168. I'm guessing just a typo (twice) in the first post.
Yeah, I got some Rokus.
https://youtu.be/d1CSEeqWl10
 
gregoryscott
Topic Author
Posts: 8
Joined: Tue Feb 12, 2019 9:35 am

Re: Roku's USB to ESP8266 NodeMCU to Get '/query/...'

Fri Feb 15, 2019 4:02 pm

Thanks again.

As suggested I did move this thread to theDevelopers Forum.

But in code I use "192.168.1.123" ...as I said, I am a bit dyslexic although my persistence pushes through.

[color=inherit]atc98092[/color],
I'm only mentioning the IP address because the range you are showing isn't considered a private IP address, and Roku has remote access limitations when it thinks it's on a public network. If your router is truly assigning the IP address range of 192.186.1.x, it's configured incorrectly for a private network.


Wow!  I had no idea of such; this may just be my problem. See, I just had to replace my old WiFi router [ R.I.P. ] with a new one - Linksys MAX-STREAM AC5400 MU-MIMO, and I set it up with defaults. Perhaps you may have some hints as how to change the settings to be compliant with the Roku's demands?

Thanks for the hint and maybe help too.
 
User avatar
atc98092
Posts: 3882
Joined: Tue Dec 31, 2013 5:09 pm
Location: Auburn, WA

Re: Roku's USB to ESP8266 NodeMCU to Get '/query/...'

Fri Feb 15, 2019 8:04 pm

Wow indeed! That is some mighty router. It's the first one I've ever seen with more than 4 Ethernet ports. Nice! Based on the documentation I found, if you are using its default settings it should be using the address range 192.168.1.x, so you're good there. Roku shouldn't be thinking it's a public network.
.
Linksys doesn't seem to have a comprehensive manual available, so I can't say for sure what options are available in the interface. But you want to ensure that wireless connected devices are allowed access to your local network. Some routers have a setting to only let wireless devices reach the Internet, but nothing within the network. I can't say how they might have such a setting labeled. But if it has a guest wireless network enabled, that too would block access to your internal network, so you can check that as well.
.
But the fact you can get the expected response from a web browser on your network would indicate there's no setting problem with the Roku or your network. Why it doesn't work via your Javascript, I can't help there. What exactly is a ESP8266 nodeMCU? How is it running the script? 
Dan
Nvidia Shield, Roku Stick (3600), Ultra (4640), Premiere (3920), Insignia 720p Roku TV, Sharp 4K Roku TV, Windows 10 Pro x64 running Serviio and Plex on a wired Gigabit network.

Who is online

Users browsing this forum: No registered users and 10 guests