npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

iobroker.ping

v3.0.1

Published

This adapter cyclic polls configured IPs.

Downloads

1,881

Readme

Logo

PING Adapter

Number of Installations Number of Installations NPM version

Test and Release Translation status Downloads

Pings configured IP addresses.

Pings specified IP addresses in a defined interval and monitors the results.

You can also monitor TCP ports by specifying the port number after the IP address with a colon (e.g., 192.168.1.1:80 or google.com:443). This will check if the port is reachable instead of using ICMP ping.

This adapter uses Sentry libraries to automatically report exceptions and code errors to the developers. For more details and for information on how to disable the error reporting, see Sentry-Plugin Documentation! Sentry reporting is used starting with js-controller 3.0.

Ping from javascript adapter

You can ping any IP address from the JavaScript adapter with the command:

sendTo('ping.0', 'ping', '192.168.1.1', res => {
    console.log('Result: ' + JSON.stringify(res)); // Result: {"result": {"host": "192.168.1.1", "alive": true, "ms": 250}}
});

You can also check TCP ports:

sendTo('ping.0', 'ping', '192.168.1.1:80', res => {
    console.log('Result: ' + JSON.stringify(res)); // Result: {"result": {"host": "192.168.1.1:80", "alive": true, "ms": 15}}
});

Known Issues

  • if it is not possible to ping your linux client, check if iputils-ping is correctly installed on a client.

  • ping command under linux requires root permissions.

You can give the adapter the rights to execute the ping command as root.

For this, you need to add the following line to the /etc/sudoers file with sudo visudo command: iobroker ALL=(ALL) NOPASSWD: /bin/ping.

Or you can allow the ping execution by sudo setcap cap_net_raw+ep /bin/ping command.

You must install setcap with sudo apt-get install libcap2-bin before if setcup not found.

hping3 support for sleeping devices (e.g. iPhones)

Some devices, particularly iPhones in deep sleep mode, do not respond to standard ICMP ping. To detect such devices reliably, the adapter can use hping3 to send a burst of UDP packets to port 5353 (mDNS) which wakes the device, followed by a regular ping to confirm reachability.

Enable "Use hping3" for individual devices in the Devices table. The adapter runs:

hping3 -2 -c 10 -p 5353 -i u1 -q <IP>

…then immediately performs a regular ICMP ping. If hping3 is not installed, the adapter falls back to regular ping automatically.

Installation (Linux only): Enable "Install hping3 if not available" in the main settings. The adapter will run sudo apt-get install -y hping3 on startup if hping3 is not yet present on the system. Alternatively, install it manually:

sudo apt-get install hping3

TCP Port Check

From version 1.8.0 you can also check TCP ports by specifying the port number after the IP address with a colon (e.g., 192.168.1.1:80).

The adapter will check if the TCP port is reachable instead of using ICMP ping.

Wake-on-LAN from javascript adapter

You can wake up any device by sending a Wake-on-LAN magic packet using its MAC address:

// Send to broadcast (255.255.255.255)
sendTo('ping.0', 'wakeOnLan', '01:23:45:67:89:AB', res => {
    console.log('Result: ' + JSON.stringify(res)); // Result: {"result": {"mac": "01:23:45:67:89:AB"}}
});

// Send to a specific IP (e.g. directed broadcast)
sendTo('ping.0', 'wakeOnLan', { mac: '01:23:45:67:89:AB', ip: '192.168.1.255' }, res => {
    console.log('Result: ' + JSON.stringify(res)); // Result: {"result": {"mac": "01:23:45:67:89:AB", "ip": "192.168.1.255"}}
});

Writing to alive states

Every device state is writable and reacts to unacknowledged writes:

  • Write false — triggers an immediate ping of that device, outside of the normal polling interval.
  • Write true — sends a Wake-on-LAN magic packet to wake the device up.

Wake-on-LAN

For Wake-on-LAN to work, the adapter needs to know the device's MAC address. It is resolved in this order:

  1. MAC discovered by network browse — if the device was found during a network browse, its MAC address is cached automatically.
  2. Live ARP lookup — if the above is not available, the adapter tries to resolve the MAC via ARP at the moment of the write.

If the MAC address cannot be determined, a warning is logged and the packet is not sent.

Example from the JavaScript adapter:

// Trigger immediate ping
setState('ping.0.myHost.192_168_1_1', false);

// Send Wake-on-LAN magic packet
setState('ping.0.myHost.192_168_1_1', true);

Changelog

3.0.1 (2026-08-03)

  • (copilot) Breaking: Adapter requires node.js >= 22 now
  • (@GermanBluefox) Migrated for Admin 8

2.2.4 (2026-05-16)

  • (@GermanBluefox) Fixing devices widgets

2.2.2 (2026-04-30)

  • (@GermanBluefox) Added support for device manager
  • (@GermanBluefox) Added devices widgets

2.1.0 (2026-03-04)

  • (@GermanBluefox) Implemented wake-on-lan functionality
  • (@GermanBluefox) Implemented pings with hping3 for sleeping devices (e.g. iPhones)

2.0.0 (2026-02-26)

  • (@GermanBluefox) Migrated to TypeScript
  • (@GermanBluefox) Updated dependencies
  • (@GermanBluefox) A Minimal Node.js version is now 20

Older changelogs can be found there

License

The MIT License (MIT)

Copyright (c) 2014-2026, @GermanBluefox [email protected]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.