2014-07-27 19:05:23 +02:00
|
|
|
node-red-node-ping
|
|
|
|
==================
|
|
|
|
|
|
|
|
A <a href="http://nodered.org" target="_new">Node-RED</a> node to ping a remote server, for use as a keep-alive check.
|
|
|
|
|
|
|
|
Install
|
|
|
|
-------
|
|
|
|
|
|
|
|
Run the following command in the root directory of your Node-RED install
|
|
|
|
|
|
|
|
npm install node-red-node-ping
|
|
|
|
|
2016-01-09 17:56:46 +01:00
|
|
|
**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
|
|
|
|
|
2014-07-27 19:05:23 +02:00
|
|
|
|
|
|
|
Usage
|
|
|
|
-----
|
|
|
|
|
|
|
|
Pings a machine and returns the trip time in mS.
|
|
|
|
|
|
|
|
Returns boolean **false** if no response received within 5 seconds, or if the host is unresolveable.
|
|
|
|
|
|
|
|
Default ping is every 20 seconds but can be configured.
|