Socket
Socket
Sign inDemoInstall

node-red-node-ping

Package Overview
Dependencies
0
Maintainers
2
Versions
22
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    node-red-node-ping

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


Version published
Weekly downloads
2.6K
decreased by-8.15%
Maintainers
2
Install size
27.2 kB
Created
Weekly downloads
 

Readme

Source

node-red-node-ping

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

Install

Either use the Editor - Menu - Manage Palette - Import option or run the following command in your Node-RED user directory - typically ~/.node-red

npm install node-red-node-ping

Gotchas

1 Ubuntu Snap containers are strict and do not like giving external commands (like ping) external access. To allow ping to work you must manually add the network-observe interface

 sudo snap connect node-red:network-observe

2 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 1 or more devices 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.

There are 2 modes - Timed and Triggered.

  • Timed mode - this is the default mode that pings your devices on a timed basis. Default ping is every 20 seconds but can be configured.
  • Triggered mode - this mode permits you to trigger the ping by an input message. If the Target is left blank and msg.payload is a string or array, you can ping 1 or more devices on demand.

Refer to the built in help on the side-bar info panel for more details.

Keywords

FAQs

Last updated on 02 Oct 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc