1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00
node-red-nodes/io/ping
2017-11-10 15:25:49 +00:00
..
locales Modify ping, base64 and msgpack node to support multi-language (#364) 2017-11-10 15:17:05 +00:00
88-ping.html Modify ping, base64 and msgpack node to support multi-language (#364) 2017-11-10 15:17:05 +00:00
88-ping.js Add freebsd as a valid platform (#274) 2017-02-06 22:13:19 +00:00
LICENSE Update licenses and packages for all nodes 2016-11-06 20:26:19 +00:00
package.json bump package versions for ping, msg pack and base64 2017-11-10 15:25:49 +00:00
README.md Info/Doc style updates to core/pi nodes 2016-03-02 13:27:52 +00:00

node-red-node-ping

A Node-RED node to ping a remote server, for use as a keep-alive check.

Install

Run the following command in your Node-RED user directory - typically ~/.node-red

npm install node-red-node-ping

Gotcha

On some versions on Raspbian (Raspberry Pi) ping seems to be a root only command. The fix is to allow it as follows

sudo setcap cap_net_raw=ep /bin/ping
sudo setcap cap_net_raw=ep /bin/ping6

Usage

Pings a machine and returns the trip time in mS as msg.payload.

Returns boolean false if no response received, or if the host is unresolveable. msg.error will contain any error message if necessary.

msg.topic contains the ip address of the target host.

Default ping is every 20 seconds but can be configured.