A smart plug to monitor your router and automatically reset power if WiFi fails
plus.google.com
plus.google.com
A- every 15 minutes check my internet connection: connectivity (reaching Goodle DNS host),
B- if connectivity fail, execute D-2 below, if not see next step below
C- then use SpeedTest download / upload; if download/upload speed are too slow then attempt a second test 30 seconds later
D- if the second attempt fail again then:
1- send an SMS with Twilio to my cell phone to let me know the modem will reboot, and wait 10 seconds
2- issue a "off" command to my Belkin Wemo (cable modem plugged into it), then wait another 30 seconds and issue a "on" command
On top of that I have installed InfluxDB + Grafana on my Pi so I can log the connection latency to Google DNS, and the download/upload speed. Example:
https://imgur.com/gallery/dgeFR
The Belkin Wemo command do use only my local Wifi, so even if the modem is down since my Pi is on the same LAN it can control the Wemo without problem.
It was a fun little project for my Pi. All written in Python. If anyone interested I can probably post the code somewhere.
[updated for formatting]
There's a whole community about hacking these plugs: https://plus.google.com/communities/115308608951565782559
I was quite surprised that the link leads to some random G+ page about "smartplug" hacking while people here are talking as if it was a commercial product.
http://www.aliexpress.com/item/2015-New-Smart-Wifi-plug-sock...
http://wiki.mikrotik.com/wiki/Manual:System/Watchdog
http://www.amazon.com/Mikrotik-hAP-AC-Lite-RB952Ui-5ac2nD/dp...
http://www.amazon.com/MikroTik-RB951Ui-2HnD-5-Port-Wireless-...
http://www.amazon.com/Mikrotik-RB941-2nD-TC-Lite-2-4Ghz-802-...
http://www.amazon.com/MikroTik-RouterBOARD-2-4GHz-Access-Poi...
http://www.amazon.com/MikroTik-RouterBOARD-2-4GHz-Ceiling-Ac...
My MikroTik's fantastic reliability (48d uptime, and that was b/c I accidentally pulled the power cord), combined with a queue policy to throttle bandwidth to avoid my ISP's humongous queues, makes me feel sorry for others whenever I hear them complain about their router always crashing, or Netflix causing Minecraft to lag.
...so that you can return it during the return period.
I'm quite irritated that TP-Link is locking out OpenWrt now. For the last 7 years, TP-Link is all I've purchased or recommended. Not now though.
In my experience Pepwave/Unifi/Microtik are good prosumer brands.
For more consumer-y stuff, it might be worth it to have a look at the Apple/OnHub routers too.
You can also pick up enterprise gear on eBay at pretty good prices, brands such as Cisco/HP/Aerohive/Ruckus etc., but configuring/updating might be a pain.
This isn't so much a problem with the regular UniFi APs, but the UniFi AC AP costs $300!
I'm replacing a hodgepodge of hardware, including some Apple routers and APs. The Apple products worked reasonably well. I had to keep them fairly isolated (for heat) or else they required reboots. But given their price point, I would probably look somewhere else.
Throughput was a major complaint for many reviewers of the Unifi models I researched. No individual reviewer convinced me the units themselves were the problem, but the sheer number of such reviews did.
Peplink's Pepwave units look awesome and were my second choice.
For all the others, I could either not find enough reviews to reach any conclusions or could not find a model that fit my needs.
Also many come with decent warranties
This is after several terrible experiences with expensive name-brand home routers, which I agree are usually trash.
It's not the wifi itself, it's the internet connection that goes down. So this did not help...
However, this is not an issue with "dumb" ethernet-WiFi bridges.
Obviously it is possible to increase the TTL of incoming traffic if that's what you wanted to know. Linux iptables can do that, IIRC BSD pf too, and some consumer routers even have an option in the GUI.
This is silly and illogical, if you have a reliability problem fix it, adding more parts is not likely to help. What happens when this smart plug malfunctions and restarts your router every 5 minutes?
It's obvious, you get another gadget which bypasses the plug when it switches off despite network being up. Capacitors in the router will keep it running for the few milliseconds it takes to enable bypass.
You'd be far better off putting the money you'd spend on this gadget towards a better wireless router and call it a day.
Trust me, hanging or rebooting is the best of the bad things your router can do to you.
I had one which would pass LAN->WAN packets without NAT translation if the endian-swapped destination address matched the LAN address block. Want to access X.1.168.192 on default settings? Sorry, not today.
And, of course, I didn't use 192.168.1.0/24 but 10.0.0.0/8. It took me weeks to figure out that the thing those few websites which suddenly stopped working had in common was IPs ending with .10 .
This was few years ago and since then I haven't bought a single router which wouldn't run OpenWRT or at least DD-WRT.
Obviously you buy a smart plug that monitors the first smart plug and restarts it if it cuts power to the router while the wifi is working :)
Now, if that one starts malfunctioning ...
I've been using Ankuoo and Maginon devices quite a bit at home -- they run around $25, are easy to setup, conveniently communicate information to Chinese owned domains (ok, that bit bugs me, but I've blocked the communication) and they are a script away from this product.
If this is based on the Marvell Chipset that so many of these devices are based on, I wonder how frequently it'll reset the router not because WiFi went out but because the device dropped off the network due its own problems. I've had some very spotty results with a device that I had plugged into the same power strip as my router and a large number of other devices. Despite being 4 feet from the router, it continually dropped off the network until I moved it to a wall outlet far away from the power strip (I'm guessing interference from the myriad of moderately high wattage equipment I had plugged in but I'm no EE).
Something like this could be made on-the-cheap with a CHIP and a relay ($10 for the CHIP $5-10 for the relay, $~1-5 for USB power) and a little bit of scripting. Personally, I've wanted a feature like this since my router and cable modem are not easy to get to when I (rarely) need to cycle them. I purchased a 4-port relay and plan to pair it with a Banana Pro, wire it to Ethernet, set it up on WiFi and coupled with software running on my OpenWRT router, have it decide which to cycle in the event of an outage. Even with that complex of a build, I'm looking at $55.00 including power (which doesn't count much for me since I've got a USB block with an available port that I plan to use).
https://twitter.com/internetofshit/status/708565761330176000
"On one level: this is a great idea On another level: WiFi routers shouldn't be so shit that this exists"
"So many people saying they actually want this thing?! It's apparently real"
ISPs in Germany can force you to use their router. I have a proper one which remains unused :/
Of course in an ideal world, wireless routers would be smart enough to reset themselves, without having to add another $60 to their price. But we are only in 2016.
But the typical solution to this particular problem is to correctly employ a watchdog[1] that will restart your program if it halts. In fact, this wifi-monitoring plug is serving as a watchdog itself.
int main(void) { for (;;); }Not really, the HP is about writing a program which automatically proves halting/not-halting for every possible program you feed into it.
https://www.kickstarter.com/projects/dobots/crownstone
Prior art. So you can just get our open source power outlets without patent-pending stuff.
I reboot it about once a year, as in, it has been rebooted three times that didn't involve firmware updates in its entire life, or about five times total.
If your router is that flakey, just replace the router.
To summarize: many consumer level routers tend to lock up due to firmware bugs, hardware defects, or overheating. Because they're closed devices, the solution is usually power off/power on & let the restart clear up any issues and restore proper wifi functionality. This device ingeniously automates that step.