Some of the Netgear routers have Amazon Alexa integration. Their guest network can be enabled/disabled and they can be rebooted through Alexa.
That means they have an API for this kind of remote control.
Can we create a device handler doing the actions through ST ?
Quite a few companies have built Alexa integrations which unfortunately are not available for anything else.
So the first thing to do is to contact the router company and see if they have an open API for those commands.
If not, there are some people who put an inexpensive android device literally next to the echo and use LANnouncer or something similar to have the tablet speak the appropriate commands to the echo. Obviously, it’s a hack, but it can work.
actually, I got traces from my router’s wan interface to understand what packet is coming and then maybe I could point out the API command they use.
But there’s a lot of traffic and I could not figure out.
I found the router’s api by tracing communication between router and its client app.
A sample communication is using basic http authentication and then a soap post to port 80.
POST /soap/server_sa/ HTTP/1.0
SOAPAction: urn:NETGEAR-ROUTER:service:WLANConfiguration:1#GetGuestAccessEnabled
content-type: text/xml;charset=utf-8
HOST: www.routerlogin.com
User-Agent: SOAP Toolkit 3.0
connection: keep-Alive
Cache-Control: no-cache
Pragma: no-cache
content-length: 540
I think I’ve figured out how to do it.
But I can’t use 2 consecutive hubaction commands in a function.
only the last one is run if I put them in the same function.
What is the proper way of doing it ?
I am still trying to do it.
I need to send 3 soap commands to the router to make one change.
So I put all of these in separate functions and I call them from one action bound to a device handler’s button tile.
But I need to get the response of each commands sent to the hub.
how can I do that ?
my sample code for 3 actions are below. GuestWirelessOff is the main function called when button is pressed.
Nighthawk routers are the best router on the market. On another hand, Alexa is also an interesting thing to connect smart devices. I love both. If getting any Alexa or router related problem follow troubleshooting steps here.