Added to the list
New version on GitHub...
2.1.6 - 08/25/20 - Added notifications when website is available again, other enhancements
(don't have time to test this, actually have something to do this morning! lol)
Hi Bryan. I wanted to chime in here to say that I think the issue still exists, and what we have now is just a workaround. I think I agree with @rjb.bob that the "Auto Reset Switches" isn't working the way we'd expect. I had a quick look at the code, and I can see that currently, the logic goes something like this when pinging and getting a good result:
- Ping the website
- If all good, run the turn on handler for switches group 1
- The handler first checks each switch in group 1, and if OFF, switch it ON
- It then moves to the reset switches option (and this is where I find the unexpected bahaviour)
- After the specified delay time, it checks each switch in group 1, and if currently ON, switches it OFF
If I've followed it correctly, it will always end up switching the group 1 switches back OFF, which is not what we would expect. Is this the way you intended it to work, or was it an oversight when you coded this part?
My assumption would be that the Reset Switches option should never actually turn any switches off, only back on.
Reset means to put back the way it was. So if the app turned the switch on and you selected the Reset option, after x seconds it will turn it back off.
If you don't want that to happen, simply don't use the Reset option.
Only if you select the Reset option. Don't use the Reset option and the light will stay On until you manually turn it off or the URL is available again.
New version on GitHub..
Cosmetic changes. Added more descriptions.
OK, but that's not exactly what's happening. ie. The switch in question was already on before Web Pinger checked the URL. After checking the URL and getting the "all good" signal, Web Pinger doesn't need to turn on the switch, because it's already on. But 30 seconds later, it then proceeds to switch it off. That's not really "resetting" the switch in my mind.
But it's no big deal. I guess that option wasn't for the purpose I thought it was. I'll just continue without it.
I think this app must be intended for a setup where the router and modem are two separate devices. In my case I have a single device, so obviously the "turn back on when the Internet becomes available" option will never be true since the router/modem is off and no Internet connection is possible. As with @jason-lane, I expected the reset option to turn the switch back some amount of time after it gets turned off, but that's apparently not what @bptworld intended.
I worked around it by using the app primarily for the ping function and turning off a virtual switch and using that to trigger a Rule that toggles the physical plug off and then on again.
You can connect a stand alone router to that all in one unit. I do it here with mine.
Is there a way to turn a switch on/off when the internet comes back on? I see the option to turn on a switch when the ping fails but I'd like to turn it back off when the ping succeeds again. I saw the option to auto reset switches but that says it will reset the switch after a set amount of time even if the ping is still failing.
I'd like to be able to see how long an internet outage was based on the switch events.
Thanks.
Go read the option again... it already does this.
Ok, I see that now thanks!
Clarification please. The false alarm safety net time, should it be more than 2 times the ping interval? In other words if I have the ping interval set for 15 minutes, then the safety net should be longer than 30 minutes?
Yes so you get more than one try at it. In worse case would need 31 minutes to ensure it catches the last one.
Thank you. That was what I thought. One more question. The switch I have to turn on it wouldn't come on then till after the safety net time? Assuming the internet was still down.
There was a large denial of service attack affecting a number of internet services yesterday just as a heads up.
I am not familiar with how you have it configured so with some more detail I could assist further.
I guess my question is, I have the ping interval set at 15 minutes. I set the safety net at 35 minutes. I have a virtual switch which I have in the app to turn on if URL is not available.
So that switch wouldn't come on until after the safety net? In other words it takes 2 pings before the app decides the URL is down?
Hope that makes sense. I'm not real good at describing things....
Can you post a screenshot of your web pinger app?
Well there's an easy way to test. Put in a non existent url and see if the switch turns on immediately.