Action based on tcp ping

Looking to make an action based around server status’s which would be detected by a ping of a specific port. I’m assuming it would be any easy enough thing to write.

Essential there would be a list of IP address’s and ports, system would ping each in the list. If any didn’t respond it would turn a hue light to a set color. If response is received goes to a different color.

Any thoughts how to do this.

1 Like

I believe ping runs over ICMP protocol (and perhaps can be faked using UDP?), but the SmartHub currently only supports HTTP officially (do a search on UDP on the Forum – I believe the latest post is that UDP send/receive can “sorta” work, by using the HTTP timeouts).

That’s probably the key. If you use HTTP to the desired ports, you won’t get an HTTP header, but you might be able to tell the difference between a bad response and no-response (i.e., timeout).