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

node-red-contrib-truma-inetx

v1.0.2

Published

Node.js BLE Lib, Cli and nodered device for Truma iNet X.

Readme

node-red-contrib-truma-inetx

TypeScript BLE library, CLI, and Node-RED nodes for reading and writing Truma iNet X settings.

The implementation speaks the Truma iNet X application protocol, decodes CBOR payloads with cbor-x, and prints parsed settings as JSON. Bluetooth access is backend based: auto tries BlueZ on Linux and falls back to noble elsewhere, while bluez and noble can be selected explicitly.

Usage

Install dependencies:

npm install

Use Node 20 or 22 LTS for live BLE access. Newer Node releases can work for tests and builds, but the native noble macOS backend has been less reliable for Bluetooth connections outside LTS.

Get settings:

npm run get

Use --debug for BLE/protocol diagnostics on stderr:

npm run get -- --debug

Select a Bluetooth backend when needed:

npm run discover -- --bluetooth bluez
npm run get -- --bluetooth noble

Pair with the iNet X display while the display is in Bluetooth pairing mode:

npm run pair

On Venus OS / Linux, BlueZ pairing is preferred so bluetoothd owns the Device1 object and persists bond keys:

npm run pair -- --bluetooth bluez --debug

Pairing-specific BlueZ controller settings are only applied by pair, not by normal discover, get, or set.

Headless Venus OS / Victron

The pairing on an victron ekrano or GX device need to be currently done by the command line.

Initial Build of Settings Tree

Build a reusable settings tree:

npm run discover > truma-tree.json

The tree includes topic group ids, so later reads and writes can target only the needed device groups:

npm run get -- Switches

Tree topics are grouped by topic name, then parameter name:

{
  "topics": {
    "Switches": {
      "group": "0x0405",
      "parameters": {
        "ExternalLights": {
          "type": 104,
          "available": 1,
          "value": 1
        }
      }
    }
  }
}

Set a parameter:

npm run set -- Switches ExternalLights 1 --tree truma-tree.json

The write path initializes the Truma protocol to learn the assigned client address, then sends a single parameter write. Switch captures use numeric 1 and 0 values. You can also pass --group 0405 explicitly instead of --tree.

Known working controls and topic mappings are documented in docs/control-examples.md. In particular, room heating is split across RoomClimate and AirHeating: use RoomClimate for off/heating/ventilation mode, but use AirHeating.TgtTemp for the room heating target temperature and AirHeating.Mode for the heater fan/profile.

The CLI writes a single JSON document to stdout. It does not write files. Generated build output lives in dist/ and is ignored by git.

Library

Build the TypeScript library:

npm run build

Run tests:

npm test

Primary exports:

  • pair() connects and triggers the operating-system pairing flow.
  • get() connects, reads, decodes, disconnects, and returns JSON.
  • discover() builds a reusable settings tree with topic group ids.
  • set() initializes the protocol, writes one parameter, decodes confirmation responses, disconnects, and returns JSON.
  • TrumaProtocol handles the app-level control/data frame exchange.
  • buildTrumaFrame(), buildParameterWriteFrame(), decodeTrumaFrame(), and decodeFirstCbor() handle Truma frame/CBOR helpers.
  • collectSettings() and parseSettingsJson() normalize topic/parameter responses.

Node-RED

Installing this package into Node-RED registers three nodes:

  • truma-inetx-device: config node that discovers and caches the iNet X topic tree on deploy/start.
  • truma-inetx-get: gets all settings or multiple selected topics. Incoming msg.payload may override topics with a string, array, or { "topics": [...] }.
  • truma-inetx-set: sets one topic/parameter/value. Incoming msg.payload may override with { "topic", "parameter", "value", "group" }.

The operational nodes serialize BLE access through the shared device node.