[Deprecated] Web Pinger

it actually pings perfectly well on the networks look at my log when I turn on the printer;

I just realize why the reset was not working, and just leaving the zigbee plug off once it could not ping the printer

In the child code it looks like two paranthesis were missing on the reset fonction, I just changed it and it works.

the code

here is the log

The problem I will face is if the router does not reboot properly on the first go I will be stuck with this Pollverify already called, and it will not try to reboot again untill it eventaully reconnect?

Thank you again for your help.
Geoffroy

Ok I managed to get it to work. the router will reboot not only once, and stay in a loop of Pollverify untill it reconnects again. But it will reboot every X minutes. chosen in "False alarm safety net (minutes)"

I just changed the code from True to False in the PollVerify:

An here is the resulting log.

Hope this helps anyone that intends to use a zigbee plug to reboot his router when it looses connectivity.

2 Likes

Now that's thinking outside of the box! Great job.

Hey @bptworld - can it do TTS / Music device TTS also ?
would love HE to be able to tell me via TTS if the internet goes out.

No plans on adding speech but I'll put it on the list.

Question though,
If the Internet is out, how would it reach your TTS devices? Google, Alexa, Sonos, etc. all use cloud services. Correct?

2 Likes

Preloaded mp3 on local server played on local speaker renderer.

#facepalm
Good point, for some reason I assumed the Sonos was local/wifi not cloud.

If the internet is out, how does a pushover get out ?

If the internet is down it will turn on a switch.

1 Like

Is there a way to start the child app as soon as the hubitat hub boots up.

I had a power outage last night... the Hubitat rebooted when power was restored, but the Child app that I created did not restart automatically?

Thank you for your help.
Kind regards
Geoffroy

It can take up to 5-10 minutes before everything is back to life after a reboot. We have no control on the order that things come back. Just have to be patient.

Thank you for explaining this to me, I thought that I had to manually start the app.

Nice app to alter coding for first timers
-removed turn off handler definition
-block additional calls for poll() per 5 sec
-ping every 3 minutes
-check again every 5 minutes if after fail
-made it blue :sunglasses:

Turn off handler is embedded in a separate rule sequence for 2 devices

Been wanting this for a long time, thanks for adding!

1 Like

I found something in webpinger (thank you @BPTWorld for your apps. ), could be an error.

If webpinger fails to access the website, turnsOn a swtich, but if you turnOff the switch manually, it will not turn on again in the next poll. Leaving it always off.

i modify the code in lines 203+

		} catch (e) {
    		if (state.downHost == "false") {
    			if (state.pollVerify == "false") {
    				runIn(60*threshold, pollVerify)
        			state.pollVerify = "true"
        		}
        		if(logEnable) log.debug "Request failed (NO status code) to ${state.website}, calling pollVerify with a ${threshold} minute threshold"
    		} else {
                if(switches) turnOnHandler()
                if(switches2) turnOffHandler()
                if(logEnable) log.debug "pollVerify already called"
    		}
		}

To force the switches On and Off Respectively

1 Like

Thanks, updated on GitHub.

Hi Bryan. I have an internet outage last night, continuing now, but the web pinger app didn't respond and set my switch. Any ideas how I can test for any issues please?

I use this to test for access to Google, so it's a simple test of connectivity. I have it run every 15 mins and the retest set to 3 hrs (because I also use this as a proxy test for power out, eg. if the router fails due to Power Out for 3 hrs).

I'll have to do some testing.

Thanks

Thank you Bryan. I wondered whether the app allows such a lengthy time before the 2nd ping. It didn't seem to function correctly last night but I have been suffering a few issues with my hub recently so cannot put a finger on your app specifically by any means :mask:

Bryan, I'm setting up your App Web Ping utilizing " Turn Switch(es) OFF if URL is not available, ON if everything is good". I want to have my modem turned off if internet down, then turn back on , when the internet available to reboot the modem. My question is with the 'Auto reset switch" option. What is it resetting the switch to. In my scenario, my switch was originally on ( modem on). When internet goes out, the switch turns off and when the internet restored, the switch comes back on. What state does the Auto reset switch bring the switch to? Also were is the pause feature for the child? Sorry if this seems like a dumb question. Love your apps! Guess its time to donate again lolo. Tony