need usb-controlled 110v switch that can be programatically operated from command line
My provider's modem loses communication, at least weekly.
I have had it replaced, and the problem persists. Could be a problem up-stream of the modem. A power-cycle brings it back, but sometimes I'm away from home, and would like to log in... I can write the program to check for loss of communications, and send commands to the usb device on my system, but haven't found a controller that does that. The normal operation would be for power to be on, and only be interrupted for a few seconds, if comms have been down for maybe an hour. Best would be a device that plugs in to normal power outlet, and provides 1 or possibly 2 switchable outlets. Does anyone know of such an item? Cheap? ;^) |
I think you're in Catch-22. If you need to reset the isp's modem, you obviously have lost internet access. You said so yourself, because you can't reach your printer.So how can you communicate by wifi to the reset switch??
Even presuming the home setup is over-complicated technically, you don't need such a gimmick at all. Save or email whatever files you want to yourself, and print them when you go home. If your printer is that slow, buy new. If someone is there, let them reset your modem. And give your isp a rocket. EDIT: It's a good rule to keep gimmicks away from mains. They're a very bad mix, and a fire risk. You could end up explaining to your home insurance company why they should pay up for a fire caused by your gimmick. |
probably an ups helps. From the other hand an esp32 (or a SBC) and an IoT plug can do that.
like this: https://www.mindolife.com/product/smart-plug/ (I do not suggest it, just show as an example) |
Many smart plugs require the internet or some sort of cloud environment. I found this relay box but you need something like a Pi to control it. A Pi Zero W is only around $15 US but you need the power supply, memory card etc to make it functional which adds up.
https://www.amazon.com/Iot-Relay-Enc.../dp/B00WV7GMA2 There are ethernet and USB relays you can wire up if you want a DIY project. |
I found this:
https://pwrusb.com/products/powerusb-basic which fits the bill, except for cheap... I guess I wasn't clear enough.. what I want is for the system to detect loss of internet access (easy enough, ping works), and then, after a few consecutive failures, to issue the command to power-cycle the provider's modem. If it can also power-cycle the wifi router (separate hardware), then that's ok, but the controlling system is hard-wired to the router, which is hardwired to the provider's modem.. no wifi involved. |
Quote:
But based on your last post I don't really know what is missing for you. |
When I have experienced this, I have found that I can still access my modem from a web browser and navigate to a reboot option. I have never tried to do this programmatically, but it may be an approach to consider.
|
Quote:
|
Quote:
That said, I'd probably first consider telling your provider that the modem you have is junk, and ask for a new one. They often upgrade hardware but don't say anything to older customers since it's cheaper to leave the old stuff there until someone complains. |
Quote:
|
Not necessarily bad hardware. If you have cable internet then your ISP should be able to read the signal level at the MODEM (most other services should be able to as well) and see if it is marginal. Internet needs more signal strength then TV. At one time I had a bad signal but the ISP reading supposedly was acceptable. The true reading with a meter at my house proved it was not. Bad wiring, connector corrosion (my problem), loose connectors or even a bad splitter can cause problems. You can have similar problems with other types of Internet service as well.
|
Get a 24 hour timer and let it reboot every day? Some electronic models can be set to a minute. Mechanical might be 15 minutes minimum.
|
The mechanical ones are typically 30 minute intervals and digital by the minute. That would be the simplest although depending when the outage happens it could be after the reset.
I am not suggesting this particular device but there are several USB relays that appear as virtual serial ports. It would not be difficult to write a program to interface with these devices. Be sure if you choose one of these devices it exceeds the current required by your MODEM/router. It would also be a bit of a DIY project to wire up a cable. https://www.amazon.com/Module-Intell...8235f6f86353c9 |
A universal digital timer might cost under $10.
I have some KASA devices that are supposed to work even if it doesn't have wifi. So you can get them and use them on a schedule or if wifi you can control remotely. |
All times are GMT -5. The time now is 02:57 PM. |