node-red-nodes/io/ping
Dave Conway-Jones eff8327971 Info/Doc style updates to core/pi nodes 2016-03-02 13:27:52 +00:00
..
88-ping.html core to Pi node-red-nodes info updates 2016-02-12 13:14:12 +00:00
88-ping.js revert ping node experimental changes 2016-02-13 11:15:02 +00:00
LICENSE Add stomp, ping, wol, wemo nodes to npm 2014-07-27 18:05:23 +01:00
README.md Info/Doc style updates to core/pi nodes 2016-03-02 13:27:52 +00:00
package.json Info/Doc style updates to core/pi nodes 2016-03-02 13:27:52 +00:00

README.md

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.