[Release] Hubitat Ping

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.


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:

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.


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.


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.

Think I found your issue, testing the fix right now. Missed that you were using the HTTP endpoint method when I looked before. As to 100% loss on a device that is up, only time I've that consistently is when I was testing against (Google DNS).

Edit: 2.1.7 is now available to address the IP parameter passing bug

It appears that the 100% loss issue was either a cable or an unmanaged switch. For a test, I moved the hub directly to the router and all losses are gone, so I left it there. I hate coincidental failures. I just created a RM rule to repeat ping every xx seconds and that worked I but will grab the new version.

This update fixed the repeating actions (using the HTTP Endpoint).

Thanks for providing this. It's a great tool.

1 Like

Update to include the initialize option appears to work the way I want it to. Just restarted my hub and saw the schedule job come up for my device. Thanks again...

1 Like