node-red-node-ping 0.0.13

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

npm install 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.

Node Info

Version: 0.0.13
Updated 1 year, 1 month ago
License: Apache-2.0

Downloads

280 in the last day
1800 in the last week
7199 in the last month

Nodes

  • ping

Keywords

  • node-red
  • ping
  • keepalive

Maintainers

  • dceejay
  • knolleary