Network Diagnostic via Ping

Considering this thread is many months old.... they added the routines for developers to utilize ping in apps/drivers. And they added a ping action to rule macine. Hopefully thats what you are looking for.

2 Likes

Dang, and nobody said a word here? Ha ha

Thanks. Will go explore that avenue...

1 Like

It was listed in the change logs...

4 Likes

My Hubitat and Konnected are working just fine. I just found this topic after experimenting with NEMS on a RPi4. NEMS is way overkill and IMHO unpleasant. If I can remotely work the Hubitat app, then my modem, router, and the Hubitat are working. The only device not verified in this way is my Konnected board and the switch which powers it. So, a simple periodic ping test of the Konnected board would test the last xxx feet of my network. All NEMS was going to do is a ping anyway.

Easy to run ping in a RM app, but no result is provided. So, I found and added the "Hubitat Ping" driver.

I find little information on how to actually use "Hubitat Ping" that make sense. Anyone have a link to a RM example or something I can start from? Ideally a failure from the ping test would allow me to send a Pushover message (for example).

Thanks,

If you're talking about this one:

I may be able to answer your questions. Easiest way to kick off a notification or message using this would be to set the Ping Repeat to a timeframe that you feel is reasonable, save the change, and then enter the IP address you want to have checked and hit Send Ping. After that it's just a matter of setting up a rule that is triggered by the presence attribute (may be under Custom Attributes in RM) going to not present, with an action of send notification.

1 Like

Belated reading of this thread. Your post is a great outline of why this was a worthwhile add.

The automations/actions that could be readily handled with this info available to HE are more than what first come to mind.

It's more work for somebody(s) but wouldn't it be neat to somehow have change log tie-backs to threads that discussed the very issue/feature/request/desire.

That way you could read the change log and find the related contextual discussions that led to it. Or stumble upon the key thread(s) and see a link to the resulting change logs.

Looks like I have to learn Groovy to complete this. Easy in RM to send the pings periodically, I'm using 15 minutes as there is a low expectation of failure. Another RM using the cron option runs two minutes later to check, but I found no way to check the ping result in RM.
Thanks for the reply, this will open up a new set of opportunities to get the most out of my HE.
Cheers and Happy Holidays!

1 Like

See it as an opportunity if nothing else.... In the meantime you will either come up with a way to translate it to RM, there will become available a way to achieve what you want, or you / someone else will come up with a solution using RM.

Thinking about it some more, I use ping to assess the availability of my hubs... now I'm re-thinking my setup....

1 Like

Are you volunteering to help?

I have seen staff post updates in dozens of threads to let users know that a promised feature request or bug fix was subsequently included in a firmware update. That always impresses me. It must be hard to catch 100% of those threads though.

Collaborate on a tagging construct that might make it easier, sure.

I didn't expect every single thread would be picked up but if feature/capability ideas come in part from reading some of these threads, and said ideas make a development short list or active fix list, perhaps tagging it (right then and there) in a manner that allows subsequent and automatic linking to future release notes is how to go about this. Something to ponder.

If you use the device driver not really. Couple different ways of triggering RM from it:

  1. If presence changes to not present
  2. If responseReady changes to ready
  3. If percentLoss changes or changes to
2 Likes

I think I've got it. Added a device for Hubitat Ping and using the presence signal as a start. In test now, will work it out.

I still will try to get some groovy in my mental tool basket. Retired software engineer and manager in embedded comms. Never programmed Java, lots of C and such.

Thanks for your support and help. Get more and more pleased I went with Hubitat for my alarm integration as I do more with it. I'm trying to convince some friends to go this route as well.

1 Like

Groovy is fairly easy if you've done C# or Java; syntax is C-ish (C++ is closer), but if (more like when if you're like me) you get stuck, just holler here in the community and one of us will chime in...

1 Like

The RM and device definition was really easy. But, I ran into unexpected problems with the device.

Hope these pasted screen captures show up.

The graphic shows the IP address and the test result from the "Send Ping" button.

However, when I hit the " Save Device" or "Save Preferences" buttons, the screen changes to:

The IP address has vanished and was replaced with a red line.

The Log below shows several things.

  1. At 18:15:00.247 the RM rule ran
  2. At 18:30:00:238 the RM rule ran
  3. At 18:45:00:247 the RM rule ran
  4. At 18:46:29.213 I ran the ping from the device screen as shown above. It works.

Additionally, while collecting test results, I disconnected the Konnected board Ethernet cable from the POE switch. Same results.

So I'm not sure what is going on. The ping works, I'm sure about the device and therefore the RM rule. Don't understand why the device blanks the IP address field when I save it,

Order of operations should go something like

  1. Set polling interval
  2. Save preferences
  3. enter IP address
  4. Click Send Ping

The first ping will run and then reshedule itself based on the polling interval selected. After the first ping the device will use the lastIpAddress as the IP to ping. If you refresh the screen, you see a scheduled job at the bottom.

That was the magic hat trick I needed. Until your comment on the scheduling I didn't piece together how the device ping repeat cycle and my RM rule period would sync, they don't and work happily asynchronously. Quick testing is now all good.
Now, to add devices and rules for various RPi devices (PiHoles and a camera).
Still going to play with groovy and try that out.

Merry/Happy/select-your-holiday greeting-here.
Cheers,
Thanks.
SK!

1 Like

I am process of test driving the HE and deciding if it is a suitable Veraplus replacement. (So far, I am very unimpressed with HE.) Before I move any z-wave devices, Iā€™ve started with the easy items such as a weekly reboot (Rebooter), and a nightly WOL (WakeOnLan (By Ramdev)) of my NAS. Both are working and I believe they are setup properly.

Having an indication of whether each ip-addressable device in my network is online is my current task. My goal is an indicator of the state of each device. (I assume Hubitat Ping is the correct app for accomplishing this task.) The first image I created and attached helped me understand @thebearmay description of operation. The second image is of a dashboard with four pinged devices.

Summary of the steps I completed to add a tile to dashboard.

  1. Install Hubitat Ping (I installed Hubitat Package Manager first)
  2. Add a new virtual device, scroll to the end of Type list for Hubitat Ping
  3. Configure the virtual device with IP address
  4. Create a dashboard. Once a dashboard is created, new devices must be added via apps>dashboard name>choose devices.
  5. Edit the dashboard by adding a tile
  6. Select the virtual device and use ā€œpresenceā€ as a template. I assume thereā€™s a method to change the image and or icon.

If there a better method, please describe it.


A weekly reboot of the hub shouldnā€™t be necessary, but itā€™s a good utility to have around. For a visual the built in dashboard is the quickest way to get started, but there are other community dashboards available also. As for changing the icon if you want to do it for an individual tile click on the 3 vertical dots in the upper right of the tile to get to:

and click on the Custom Icon box to see the options

If you want to change the template, click on the cog wheel in the upper right of the dashboard, click on Templates, scroll down and select Presence and click on the state desired and change the icon:

Another option is to have a rule monitor the presence for the ping and alert if it changes to not present.

1 Like

Thanks for the info @thebearmay. It appears that if I change the template for Presence, it will be changed for all devices that use that template.

I reboot every device once per week to clean out its bit bucket. I wish it werenā€™t needed with modern device, and software design and implementation techniques, but I have many examples were such a restart fixes problems.