[Release] Hubitat Ping

What HE release is your C-5 on? If prior to 2.2.7.x it will use the HTTP endpoint (new method came out with 2.2.7.x), and I can duplicate the endpoint failure for 8.8.8.8 consistently...

The C-5 is on 2.2.7.126; I'm glad to hear that you're able to duplicate the endpoint failure for 8.8.8.8.

It should be able to use either method then. Have tracked down the 8.8.8.8 or 8.8.8.4 issue using the HTTP endpoint - request is timing out (Status 408) which was being suppressed by the code. Will be changing that to bring back a message.

Hmm. I wonder why the "new" method isn't working. Very strange. Also, no idea why there's a timeout on the Google DNS IPs -- this doesn't make sense to me either.

I wasn't able to get the "new" method to work on my C5 either. Honestly, I didn't mess with it much when HTTP worked. Time constraints. I'm running 2.2.7.126.

1 Like

Sounds like lots of people are having problems with ping on the C5:

1 Like

Would it be possible to modify the code to support a DNS name (fqdn or otherwise) so that I don't need to use IP address? Several of the devices I want to monitor with Ping get a new IP occasionally from DHCP.

The hub is expecting the IP and errors out if you don’t send it in the correct format.

You may want to look at

if you need the DNS support.

1 Like

Maybe I just don’t understand how this driver works. Every time I enter an ip in the device the ip is removed as soon as I go back I. How do I get it to save an IP address?

Glad you got it up and running @Keo. I was going to ask a question / make a request, so can answer your question at the same time.

If you have configured a refresh interval in the preferences before you submit the ping request, you can refresh the device page and you should see a scheduled job to perform the ping on the frequency you set in the Preferences.

Hi @thebearmay,

Not sure if this has been asked, but would it be possible to add a call to sendPing in the initalize() method and add the Initialize capability, so that the regular pings continue after a reboot? I'm happy to do the change.

Thanks,
Simon

Would have to check to make sure that we have an address to ping, but other than that... Let me take a look at it.

Edit: Not where I can test this for another 12 hours, but if you want to, the modified code is at:
https://raw.githubusercontent.com/thebearmay/hubitat/main/development/hubPing.groovy

1 Like

Me neither, no rush. Thanks for taking a look. I can take a look in the next 24hrs.

2.1.5 is available with your change.

1 Like

Been a long day, might get to looking at it more closely tomorrow.... Thanks again.

1 Like

I know I have to be missing something simple but I keep getting the following error when trying to get Hubitat Ping to keep pinging on a schedule. Screenshots below. Anyone have an idea?

Looks like data.ipAddress got truncated to data.ip at some point. Just pushed 2.1.6 to fix. Thanks for catching this.

2 Likes

I hate to even post but I'm Seeing the error in line 117 now...

Maybe i have messed something else up. I'm getting 100% loss even though the devices are up. Hmmm.....

Getting this error when I try to update via HPM.

image

The error cleared after I manually updated it and then updated via HPM again.