Web controlled relay for internet router.

=_Part_0_185155195.1690614530126 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit

Simplest way is a plug in electronic timer to switch off at 3am and on at 3:01. A single disconnection event in 24 hrs shouldn't really bother DLM, although I sometimes get a resync a few hours later.

Reply to
Graham.
Loading thread data ...

Can anyone suggest a web controlled relay which will switch something off when asked and then switch it on again automatically a few seconds later. i.e. suitable for restarting and internet router remotely!

Reply to
Michael Chare

When you say 'web controlled', that could mean:

  1. accessible via a web page on the local network
  2. the above plus some port forwards and a dynamic DNS entry to make it accessible over the internet
  3. the widget phones home to its manufacturer and they give you a control panel to login to control your widgets
  4. the same as #3 but with a mobile app

Which one did you want?

If you're rebooting the router because it has problems, how do you propose to access it if the router is broken enough that the network connection is not working?

(you can probably get them with a mobile modem inside, but that gets complicated with SIM cards and stuff)

Theo

Reply to
Theo

If you're not worried about the Chinese possibly snooping on your domestic activity etc, one of these for a Tenner ?

formatting link

Reply to
Mark Carver

If you really do want to power cycle a router when it loses contact with the internet, then a simple computer like a Raspberry Pi can be configured to ping a collection of different external sites and operate a relay if all of them stop responding for a certain length of time. If you want to control it manually when it is working, then the same Pi could be used in a variety of ways. It could provide a simple web site that you access remotely (after setting up port forwards in the router to allow incoming access and either having a fixed ip address or a means to discover what the current address is.)

John

Reply to
John Walliker

It has a potential problem if the router is turned off - it will not automatically connect back to the router's wi-fi without manually operating the switch on the side of the plug.

If initially programmed to turn off or on at certain times a day it will continue to do so irrespective of a working wi-fi connection.

Reply to
alan_m

No, but you could log in, and set up an off-on event to happen almost immediately, it would then switch back on according to that schedule irrespective of there being an active internet connection.

However, the OPs idea seems flawed anyway, because if you need to restart remotely the router because it's crashed, you won't be able to access any sort of remote device in that instance anyway !?

Reply to
Mark Carver

... which is why getting a device to detect the lack of internet is useful. I do this at a few very remote locations.

John

Reply to
John Walliker

Indeed! It's like trying to lift yourself up by standing in a bucket and pulling on the handle.

The only option would be to pre-program regular off/on events (say every day at 03:00) so that the router gets re-booted regardless.

Reply to
Roger Mills

Yeah, a heartbeat, watchdog type thing. Saved my bacon many times.

"The server wasn't working, you say! How strange, it appears to be working now!" :-)

Raspberry Pi is good + Athom power plugs make good relays.

formatting link
Reply to
Pancho

And if you are worried, then sticking it on its own VLAN solves that if your router has the capability to do it.

Reply to
John Rumm

Or you do it with out of band signalling - say using a mobile connection

- send it a restart SMS when you need it.

Reply to
John Rumm

The router is running OPNsense. It is partly working, but some how it has got stuck. I can use VNC to a raspberry pi and then use the pi's web browser to login to the router. When I select the reboot option the router does not respond which it should do. Marks Tapo looks like it might work. Thank you all

The Tapo

Reply to
Michael Chare

You should be able to ssh into OpnSense, and do a command line reboot.

Reply to
Pancho

Well I am building one at the moment. Raspberry pi zero W, although for your application, a straight Pi zero and an ethernet hat might be more reliable,, and a relay hat with four relays on.

Its destined to control, my central heating a bit more precisely than it currently is. It should save me serious money.

A simple web interface to control, the 4 relays directly, would be trivial. to build - I am being far more complex than that. Even simpler would be to use a command line via e.g. ssh remote login and type in something like 'relay 1 off' 'relay 1 on' etc.

However if the internet router is the thing to be restarted, how are you going to connect to it?

Also, why not spend your money on a better internet router that doesn't need restarting?

Since I bought my Draytek Vigor for over a hundred folding ones, I have never deeded to reboot it, unless after a configuration change. It crashes every time the power cuts, and it always comes back up smiling.

Reply to
The Natural Philosopher

Years ago I found my router had suffered a "lock out" during the night. I decided it was the occasional "brown out" on the mains. I bought a small UPS and the problem went away.

Reply to
charles

If the router is so unreliable why are you bothering, just replace it with something more reliable. Also remember a lot of glitches occur due to the naff psus these things have, add some years wear on capacitors etc, and you have a very bad recipe for reliability!

Brian

Reply to
Brian Gaff

I remember a couple of years back I was getting crashes on the Virgin router. They guy just threw away the psu and plugged in a new one, its been fine ever since. Under engineering at its best I thought. Brian

Reply to
Brian Gaff

The Vigor 130 seems to be one of the few VDSL modems that has no nasty firmware bugs. John

Reply to
John Walliker

opnSense is just router software, mainly a web frontend to FreeBSD. It is a fork of pfSense, which I've run for a decade. On my hardware it is dependable (crash maybe 1 or 2 times a year). Apart from the DNS server, which is a little flaky, it is Unbound

Back in the day, the benefit was you could run it on hardware powerful enough to have fast VPN tunnels (100Mb/s+). Which routers like the Draytek couldn't do. With improvements in Arm processors (e.g. RK2558), more efficient software Wireguard VPN, Docker, and my improved understanding of networking, this is no longer necessary.

I'll probably continue using pfSense because, I prefer hands on software to a locked down commercial router, but there is probably no longer a compelling reason to do so.

Reply to
Pancho

HomeOwnersHub website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.