Discussions

More than a smart TV—a better TV. Learn more about using your Roku TV, locate help resources, and share your experience.
cancel
Showing results for 
Search instead for 
Did you mean: 
ronmon
Level 7

Port-Forwarding for WAN Control?

Ultimately, I would like to control my TCL Roku TVs via Alexa Lambda, so I need WAN control; I trying to get port-forwarding working to accomplish this.
Currently LAN control works great (e.g. sending a POST to http://192.168.0.60:8060/launch/tvinput.dtv?ch=3[/url:2pjhq3f8]  -- turns on the TV @ channel 3) .
I ...
/launch/tvinput.dtv?ch=3[/url:2pjhq3f8]”.  I get no errors, but nothing happens.  I fear the port fo...

0 Kudos
7 Replies
renojim
Level 10

Re: Port-Forwarding for WAN Control?

It won't work because ECP commands are only accepted from the LAN. There's a Roku skill that may already do what you want: https://www.amazon.com/Roku/dp/B07KCPWH27

-JT
0 Kudos
ronmon
Level 7

Re: Port-Forwarding for WAN Control?

That's unfortunate. I have been using the app, and like it very much.  I however want to bundle functions to different devices (Roku being one) with the same verbal Alexa command which I can't do with the app.
0 Kudos
Elijah_Baley
Level 8

Re: Port-Forwarding for WAN Control?

I do not really know what Lambda is but I use a Harmony Hub with my Harmony remote and that combo seems to give me full Alexa control of my Roku. As an additional benefit I also get control of my receiver, Fire TV and Shield TV. It requires no port forwarding or any "special" setup.

I really like the simplicity that the Hub gives me in my setup controlling every device I have and making it easy to change setups as needed.

I will investigate Lambda just to see what it offers but I really doubt it will be shown to be an improvement over what I have.
Two Roku Ultras, three Roku 3s and a Roku 1
"Part of the secret of success in life is to eat what you like and let the food fight it out inside." Mark Twain
Van Roy's Law: An unbreakable toy is useful for breaking other toys.
0 Kudos
ronmon
Level 7

Re: Port-Forwarding for WAN Control?

Lambda, as I understand it <may not even be the correct reference>, is the back end of Alexa voice control.  I was able to get Alexa using this to send the HTTP POST -- that initiated my initial post.  Since this comes from the cloud, I needed WAN access.

Harmony Hub has been my back-up plan.  My Plan A, has been this Lambda thing because I have multiple TCL TVs, and I believe I could get the Alexa in a room to control its respective TCL TV (the one in the same room as the Alexa) using the same command in every room.  Again my goal is to bundle multiple commands to different Alexa controlled devices (including different ROKUs) into a single Alexa voice command. With the Harmony, I believe I would need to have a Hub in front of each TV and have a specific command for each TV.  Right?

Harmony is my plan B, my friend let me borrow his to experiment, but I have not started looking at it yet.  With this option, I would initially (at least) be restricted to controlling just my main TV in this way ... which may be OK.

I have not given up on Plan A.  I plan to look to see if I can use one of my PCs to respond to the WAN request and translate it to a HTTP LAN request -- a mini-server-ish kind of thing.  This should provide the Roku with something from the LAN (right?). Figuring it out my be over my head, if so, there is always Plan B!

Thanks for the reply!
0 Kudos
renojim
Level 10

Re: Port-Forwarding for WAN Control?

"ronmon" wrote:
I have not given up on Plan A.  I plan to look to see if I can use one of my PCs to respond to the WAN request and translate it to a HTTP LAN request -- a mini-server-ish kind of thing.  This should provide the Roku with something from the LAN (right?). Figuring it out my be over my head, if so, there is always Plan B!

This was my first approach.  It required my own Alexa skill and a server running on my network.  While I still have that in place, I've changed to having my devices appear as smart lights/plugs to my Echo device using a Philips Hue bridge emulator written in Python.  In this way I can say, "Alexa, turn on Roku" and the emulator will launch my music channel on one of my Rokus.  I also have other "devices" that can be turned on or off that will cause commands to be sent.  For instance, I say, "Alexa, turn on skip" and the emulator will send the right arrow remote control button press command via ECP to skip to the next song.  I now have numerous "devices" that Alexa can turn on/off that cause all sorts of things to happen.

-JT
0 Kudos
ronmon
Level 7

Re: Port-Forwarding for WAN Control?

Thank you.

There are many “things” I would like to do if I get this going, but initially I need to simply turn off one device, turn on another device, and start Roku on channel 3.  I have an Alexa routine to do the turn off/on, and I can tell Alexa to go to channel 3 (which also turns Roku on in the same room as the Alexa) [because of the Roku app]. I want to take these two verbal Alexa commands and make them one. 
 
It sounds like you have done just that!  I do not know python, so before I head down that path, I have some questions (and likely more in the future).
 
There is a lot of Harmony talk in the link you sent; I would like to not have to introduce Harmony at this point.  Is it needed to do the above Alexa bundling?
 
If I understand it, you initially created a server to translate from WAN to LAN.  How simple was that? Would that be a good initial path to take?
0 Kudos
renojim
Level 10

Re: Port-Forwarding for WAN Control?

"ronmon" wrote:
There is a lot of Harmony talk in the link you sent; I would like to not have to introduce Harmony at this point.  Is it needed to do the above Alexa bundling?

No need to have a Harmony (or even any need to know anything about one).  The project originally used the Harmony Hub in conjunction with the Philips Hue emulator.  The Alexa/Echo integration was added later.
 
"ronmon" wrote:
If I understand it, you initially created a server to translate from WAN to LAN.  How simple was that? Would that be a good initial path to take?

I have a tiny Linux based computer (an old Seagate Dockstar) that runs Debian and is on full time.  The whole WAN to LAN translation required an Alexa Lambda skill (written in Python, but there are other choices), an HTTP server with PHP support running on the Dockstar (I used nginx, but there are others), a PHP script to handle the commands (I didn't just have the Lambda skill send an ECP command and then "localize" it), and of course port forwarding set up on my router (that runs OpenWRT).  If it sounds complicated that's because it was, so I don't think I'd call it a good initial path.  It was a fun little project, but there were many pieces and it took some time to get them all working.

By comparison, the Philips Hue emulator was easier to get working.  Don't let Python scare you.  I'm no Python expert, but if you've done any programming in any language you should be able to pick it up enough to add your "devices".  I've run Python under Debian Linux and under Windows, but I don't have any Windows machine that I keep running full time.

I know there's a javascript version of an emulator, but I wasn't interested in that.  Another path I went down at one point was to use a Wemo emulator.  It was even easier than the Philips Hue emulator, but the number of Wemo devices Alexa supports is limited (at the time I was playing with it you could only have 16 Wemo devices; I don't know if that's changed).  As far as I know there are unlimited Philips Hue devices you can have and they also support more than just on and off (intensities and colors), so you can say something like, "Alexa, set VX to 70".  I haven't had a need for a color, so I don't know if it's really supported in the emulator.

Feel free to PM me if you try any of these approaches and have any questions.

-JT
0 Kudos