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 🙏

© 2025 – Pkg Stats / Ryan Hefner

dbus-victron-virtual

v0.1.5

Published

Add interoperability with victron dbus to a given dbus interface

Downloads

578

Readme

About

[!WARNING]
This package is under active development. I believe it is ready for "bleeding edge" use, but its API may have to change, based on findings and bugs. Please use with caution.

dbus-victron-virtual is a wrapper around dbus-native, which allows you to connect to dbus, and simplify integrating with the Victron infrastructure: To do this, dbus-victron-virtual provides functions to

  • expose your dbus interface as a Victron service, by implementing the dbus interface com.victronenergy.BusItem,
  • emit the Victron-specific event ItemsChanged, and
  • define and modify settings which are then available through Victron's settings interface.

See dbus-victron-virtual in action here.

This package may be for you if

  • you want to define virtual devices for testing on a Victron device, like a Victron Cerbo GX, e.g. to use it in Node-RED, or
  • you need to integrate a device via dbus that is not (yet) supported by Victron natively.

Usage

Prerequisites

You have a NodeJS project you want to run on Venus OS, and you want to communicate with the local dbus.

Setup Up

  • Add this package as a dependency: npm add dbus-victron-virtual.
  • Use this package, by importing or requiring it: const { addVictronInterfaces } = require('dbus-victron-virtual');
  • Make sure you understand how to use this package by studying the example.
  • Have fun.

Development

Prerequisites

You can develop on a device that runs Venus OS. This way, the dbus environment as required by this package will be available. Alternatively, you can develop in any environment that support node 18 or higher, but you won't be able to run integration tests.

Steps

  • clone the repository
  • npm install
  • npm run test
  • run tests and include running integration tests with DBUS_SESSION_BUS_ADDRESS=unix:socket=/var/run/dbus/system_bus_socket TEST_INTEGRATION=1 npm run test

The implementation is in ./src/index.js, tests are in ./src/__tests__.

Test coverage stats for unit and integration tests (append -- --coverage to the test command):

----------|---------|----------|---------|---------|----------------------------- File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s ----------|---------|----------|---------|---------|----------------------------- All files | 87.32 | 73.91 | 100 | 86.76 | index.js | 87.32 | 73.91 | 100 | 86.76 | 26,35,39-43,107-108,145,169 ----------|---------|----------|---------|---------|-----------------------------