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

n8n-nodes-netpie

v0.1.2

Published

NETPIE nodes for n8n — read device shadow and publish messages to NETPIE.

Downloads

2

Readme

n8n-NETPIE

Community node for n8n to read from and publish to NETPIE.

  • 2 nodes included: NETPIE Read (Shadow → Get) and NETPIE Send (Message → Publish)
  • Uses header auth: Authorization: Device <clientId>:<token>
  • Follows n8n UX guidelines (Resource + Operation, clean copy, Title Case)
  • Includes Simplify output and Options → Timeout

📦 Installation

A) Install via Community Nodes (recommended)

  1. In n8n go to Settings → Community Nodes
  2. Click Install, search for your package name (e.g. n8n-nodes-netpie)
  3. Restart n8n if prompted

B) Install from npm into the custom folder

mkdir -p ~/.n8n/custom
cd ~/.n8n/custom
npm init -y
npm i n8n-nodes-netpie
n8n start

Requires n8n v1+ and Node.js 18+ (Node 20+ recommended).


🔐 Credentials (NETPIE API)

Create a new credential: NETPIE API

| Field | Description | | --------- | -------------------------------------------------- | | Client ID | Device client ID from NETPIE | | Token | Device token (stored securely as a password field) |

The node automatically sends:

Authorization: Device <clientId>:<token>
Accept: application/json

🧩 Nodes

1) NETPIE Read

Reads a device shadow value by alias.

  • Resource: Shadow
  • Operation: Get

Parameters

| Name | Type | Required | Example | Description | | ----------------- | ------- | -------- | ------- | --------------------------------- | | Alias | String | ✅ | led | Shadow alias to retrieve | | Simplify | Boolean | – | true | Return compact { alias, value } | | Options → Timeout | Number | – | 15000 | Request timeout in milliseconds |

Output (Simplify = On)

{
  "alias": "led",
  "value": {
    "deviceid": "10e2968a-...",
    "data": { "Temperature": 25.62, "Timestamp": "00:10:37" },
    "rev": 1466,
    "timestamp": 1760932094846,
    "modified": 1760932094849
  }
}

2) NETPIE Send

Publishes a message to a topic.

  • Resource: Message
  • Operation: Publish

Parameters

| Name | Type | Required | Example | Description | | ---------------------- | ------- | -------- | --------------------------------- | ------------------------------------- | | Topic | String | ✅ | led | Topic to publish to | | Payload | String | ✅ | ledon | Message payload (JSON string allowed) | | Simplify | Boolean | – | true | Return { published, topic, result } | | Options → Content Type | Options | – | text/plain | application/json | Payload content type | | Options → Timeout | Number | – | 15000 | Request timeout in milliseconds |

Output (Simplify = On)

{ "published": true, "topic": "led", "result": "ok" }

🚀 Example Workflow

  1. NETPIE Read — Shadow:Get (alias=led)
  2. NETPIE Send — Message:Publish (topic=led, payload=ledon)

Click Execute workflow and inspect the node outputs.


🛠 Local Development

# Build the package
npm run build

# Link locally
npm link
cd ~/.n8n/custom
npm init -y
npm link n8n-nodes-netpie
n8n start

Ensure your package.json includes:

{
  "files": ["dist", "README.md", "LICENSE"],
  "n8n": {
    "nodes": [
      "dist/nodes/NetpieRead/NetpieRead.node.js",
      "dist/nodes/NetpieSend/NetpieSend.node.js"
    ],
    "credentials": ["dist/credentials/NetpieApi.credentials.js"]
  }
}

📑 API Reference (quick)

  • Base: https://api.netpie.io/v2/device

  • Read shadow: GET /shadow/data?alias=<alias>

  • Publish message: PUT /message?topic=<topic>

    • Header: Content-Type: text/plain or application/json
    • Body: payload (valid JSON if application/json)

🔍 Troubleshooting

  • 401/403 Unauthorized Verify Client ID and Token belong to the correct device and are active.

  • 404 alias not found Make sure the device shadow actually contains the alias you are querying.

  • Invalid JSON payload When Content Type = application/json, the Payload must be valid JSON (e.g. {"cmd":"ledon"}).

  • Timeouts Increase Options → Timeout and confirm the NETPIE service is reachable from your n8n host.


🧑‍💻 Maintainer

Developed by Phoovadet Noobdev


📝 License

MIT License