If you use the Auto reset option, then the switch will reset to whatever state is was before the app changed it. So if the switch was on and the url was not found, the app would turn the switch off, The Auto reset switch would then turn it back on in however many seconds you have it set to. Make sense?
Also, the pause option was removed from all of my apps since it was no longer needed. Any app can be disabled within the HE apps list.
Good Heavens I know I'm old and my eyes aren't the greatest but gee you think the powers to be could at least darken that "X" on the top right lolo. My screen shows it barely visible just grayed out, but when I finally found it and clicked on it the disable options appeared.
Your ALWAYS there for us. Wont bother ya again. Stay well Tony
Could I please get some tip on how to get the pinger working? I originally set it up for www.google.com and when I disconnect the cable modem nothing happens. I switched to a full URL using https://www.ibm.com with no change and finally I put a bogus URL - the pinger still shows "200 OK in the logs" even though internet is down and that URL does not exist and the office plug says ON instead of going OFF and back ON. You can see in the log that HE can't get to Alexa API (cable modem is powered off). It must be something stupid, but I can't find it, any ideas please?
I also use google.com with no issues. I may be in left field but check the two options "Time between Ping" and "False alarm safety net".Possibly you didn't give the app enough time to read the router disconnect .
Thanks but I don't think that's the problem as I tried time between pings set as 10 minutes and false alarm set to 2 minutes while the modem was off for 45 minutes.
Looking at the logs I posted above it seems strange to me that no matter what I put in the website field, including the https://www.sdfsdfsdfsdfsdf.com (which is non existent) the log always shows "200 OK"
This really is a long shot . You said you disconnected your modem . if you have a seperate Router could you try unplugging that? I know unplugging the modem should do the same but give it a try. I've had no issues what so ever and again i also use google.com
Not sure why your setup isn't working. Here's a screenshot of mine working just fine.
You can see google.com checking in just fine and then I change it to kajfsdlkfjasdklf.com and it fails, 4 min later it sends me a text that the internet is down.
This is interesting - when I replaced the value with the same of yours - it works (except I never get the notification, not important at this point)
However when I change back to google.com and disconnect it's back to 200 OK even though there is no internet connection. The only difference I can find in my terminal is that for some reason my router will point to a non routable IP for google.com but will say "host unknown" for kajfsdlkfjasdklf.com But the HTTP request never gets there it timeouts on my router
EDIT: Found the culprit!!
For anyone else, check your router settings to make sure "redirect on WAN is DISABLED" This was added feature to my Asus a while back when I auto updated the router and until now I never noticed it. After turning it OFF I tested and everything works as expexcted
@bptworld
I was checking your code and there is a few things that I am not sure understand.
A few times you have a code like
if(switches) turnOffHandler()
if(switches2) turnOnHandler()
if(logEnable) log.debug "Successful response (${resp.status}) from ${state.website}"
but inside for example turnOnHandler
You turn ON de switches and switches2, Why?
Another comment, every time you detect that the device your are "pinging" is available, your are forcing to turn ON, could be more optimal to check the status of the switch and only turn ON if is OFF?
I have now 7 devices that I am checking in a second HUB, and this is generating an update in the second HUB and retransmitting the info to the first HUB,
Sorry my English is not so good, but let me explain the code problem, this is one example, I am checking my LUTRON Hub (I did not install version 2.0.8)
So I am trying to use this to detect if my internet goes down and restart my gateway in an attempt to reconnect, but no matter what URL I give it, google.com or 1.1.1.1 or 8.8.8.8, it always seems to fail, and even when it does fail, it does not seem to correctly detect the state of my virtual switch, and set the state of my virtual switch.
I have a theory for each of the problems listed above:
I have hub security enabled, would that effect the ability of this app to ping the websites? For transparency, I have AT&T U-VERSE Fiber with a Netgear Orbi Router with a Pi Hole DNS sink using Cloudflare DNS.
The offending code that results in the inability to turn my switch on and off seems to be the function call of .deviceValue, which when looking at the Device Object documentation, seems it should be .getDataValue, and the same would go for the .on and .off calls, which should be a .updateDataValue call. Please correct me if I am wrong, but I just wanted to let you know what I found.
I wonder if this is related to the error I've started seeing in my logs:
2020-06-13 17:15:00.223 errorjava.lang.IllegalArgumentException: Command 'deviceValue' is not supported by device. on line 314 (poll)
This error appears every 5 minutes in my logs, which is the polling interval that I've set up. I'm not sure when this started happening, but I feel like it started with one of the recent (1-2 weeks) platform updates.