[Release] Hubitat Ping

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.

I think it's a Github issue. I occassionally get that, and on a retry it usually goes through.

I retried it about 15 times over the course of a few days.

That is strange. Was there anything in the logs - haven't touched the code in a while but if there was a typo that wouldn't let the code compile it will cause an error like that.