Power cycle my modem if needed

I would like to connect my modem via a smartplug. That smartplug should power cycle once every 2 or 3 days, but only if I do not interfere. So, if I do nothing it will power cycle every x days, if i do something, it will not power cyle.

Use case!

I recently went on a vacation for week and halfway that vacation I lost the connection to Homey. After checking, I discovered that all my internet connections were down. I could not see my doorbell camera, HUE wouldn’t connect and other stuff. I used the ISP tool to check if my modem was online; that was the case. Behind that modem (it’s in bridge mode) I could not remotely connect to my ASUS router… odd.

My son was willing to help and visited my house. He power cycled the router; still no connection. He power cycled the modem: all online again!

So, the ISP saying the modem was online was not true. Lesson learned :slight_smile:

To prevent this situation from happening again, I thought I could connect the modem via a power plug and have a flow power cycle it every x days. But only, if I lost the remote connection…

How could I do this with a flow?

Any suggestions / better solutions?

Get rid of the modem altogether?

2 Likes

As it seems that your modem was in an undefined state, you have to test if the incoming connection is lost. How to test that?

My ISP subscription (Ziggo) ends coming April. Might cancel it …

Even with Ziggo you can use your own modem nowadays: Eigen modem | Ziggo

But in my experience most large internet provider offer pretty bad hardware, my KPN fibre connection came with a horribly unstable box that I quickly replaced with a €50 Ubiquiti ER-X running OpenWrt. I don’t think I’ve ever had to reboot it.

1 Like

Perhaps I could create a boolean variable ‘vacation’ yes/no and set that as a condition to execute the flow…

If on vacation, variable is true, flow will activate every night at 2 am.

Just have to remember to set the variable…

You check connections with apps like NetScan and Healthchecks.
Based on the outcome (and maybe some waits :slightly_smiling_face:) you can power cycle the modem.

1 Like

I will try that! I can ping the ip of the modem!

You can test the sanity of you modem by switching on a light with homey, using a cloud service. With a light sensor you can see if the light intensity has changed. That way you know communication with Homey works quite good :blush:

Maybe the modem whas still online (Provider only see the external IP) (and you whre in Bridge mode. So the ISP see a active link (so online).
But maybee you must do it with at least two ping’s on to a external IP (like a DNS 1.1.1.1or 8.8.8.8) are with the app “internet controle” and with a test to your own external IP.
Combined you get the right status.
I think that most of the things that the connection between the modem and your Router broken.
Maybee you can also bring the WAN poort off your router Down and UP again.

1 Like

I use Smart Presence App and have set up a new device with the modem’s internal IP. That is a start and a great suggestion (solution).

Will need to test if a power off of the modem will set SP mode to ‘away’.

Thanks everyone!