
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
signalk-to-venus
Advanced tools
Injects batteries, tanks, environment sensors, and switches as virtual devices and battery monitor into the Victron Cerbo GX Venus OS.
This plugin for Signal K Server injects batteries, tanks, environment sensors, and switches as virtual devices and battery monitor into the Venus OS (D-Bus), enabling full integration with the Cerbo GX, GX Touch, and VRM.
1. Enable SSH on the Cerbo GX
→ For detailed instructions see https://www.victronenergy.com/live/ccgx:root_access#root_access
On the touchscreen or Remote Console:
ssh root@venus.local
Test with:
ssh root@venus.local
2. Enable D-Bus over TCP on the Cerbo GX
This step allows external devices (like your Raspberry Pi) to access the Victron D-Bus remotely via TCP on port 78. It is required so the plugin can inject virtual devices over the network.
ssh root@venus.local
dbus -y com.victronenergy.settings /Settings/Services/InsecureDbusOverTcp SetValue 1
Reboot the Cerbo GX Settings → General → Reboot and test with:
ssh root@venus.local
netstat -tuln | grep :78
The expected result is a line showing that the Cerbo GX is listening on TCP port 78:
tcp 0 0 0.0.0.0:78 0.0.0.0:* LISTEN
X. Manually Update Victron Venus Plugin to Avoid Feedback Loops
The upcoming version of Victron Venus Plugin (signalk-venus-plugin
) will ignore virtual devices injected by this plugin, avoiding reading virtual devices back to Signal K. If the latest published version of signalk-venus-plugin is still v1.43.1 (2025-02-04), the fix hasn't been released yet. In this case, apply the patch manually:
cd ~/.signalk/node_modules/signalk-venus-plugin
curl -O https://raw.githubusercontent.com/sbender9/signalk-venus-plugin/master/dbus-listener.js
curl -O https://raw.githubusercontent.com/sbender9/signalk-venus-plugin/31f52684afcf4d60a67850c8402806ba5573137b/index.js
3. Install the plugin
Look for signalk-to-venus
in the Signal K App Store and install it directly.
To install manually:
cd ~/.signalk/node_modules/
git clone https://github.com/Krillle/signalk-to-venus.git
cd signalk-to-venus
npm install
4. Restart Signal K server
The plugin is enabled by default and should work right away with default settings.
If you see in the Signal K dashboard signalk-to-venus getting connection errors like "Venus OS not reachable at venus.local", this means:
The plugin features a dynamic configuration interface that automatically discovers all compatible devices on your boat and allows you to selectively enable them.
Setting | Description | Default |
---|---|---|
venusHost | Hostname or IP address of your Cerbo GX | venus.local |
interval | Data update interval in milliseconds | 1000 |
batteryCapacity | Total battery capacity in Amp-hours | 800 |
Battery Capacity Setting: Used for calculating time-to-charge when the battery is charging. If your Signal K system provides electrical.batteries.X.capacity.nominal
, that value will be used instead. The configured capacity serves as a fallback for charge time calculations.
After starting the plugin, it will automatically discover all compatible Signal K devices and group them by type:
> Batteries
☐ Battery (electrical.batteries.0)
☐ House bank (electrical.batteries.house)
> Tanks
☐ Freshwater (tanks.freshWater.0)
☐ Blackwater (tanks.blackWater.0)
☐ Fuel 0 (tanks.fuel.0)
☐ Fuel 1 (tanks.fuel.1)
> Environment
☐ Water temperature (environment.water.temperature)
☐ Engine temperature (propulsion.main.temperature)
☐ Cabin humidity (environment.cabin.humidity)
> Switches & Dimmers
☐ Nav (electrical.switches.nav)
☐ Anchor (electrical.switches.anchor)
☐ Cabin lights (electrical.switches.cabinLights)
All devices are disabled by default - you must explicitly enable in the plugin settings the ones you want to send to Venus OS. This gives you complete control over what data appears in your VRM dashboard. (Display is limited by the maximum numbers of devices, the VRM/Cerbo UI is able to display.)
The plugin automatically detects and supports:
electrical.batteries.*
(voltage, current, SoC, consumed Ah, time remaining, temperature)tanks.*
(current level, capacity, name)environment.*.temperature
, propulsion.*.temperature
environment.*.humidity
or environment.*.relativeHumidity
electrical.switches.*
(state, dimming level)Note: The plugin automatically excludes devices directly connected to the Cerbo GX and its internal relay switches to prevent feedback loops.
🎉 COMPLETE BMV BATTERY MONITOR IMPLEMENTATION
This plugin provides a comprehensive BMV (Battery Monitor) interface that is 100% compatible with Victron's BMV-700 series and fully integrates with VRM Portal and Cerbo GX displays. All standard battery monitor paths are implemented, making this a complete virtual battery monitoring solution.
Batteries (Battery Monitor):
# Core Battery Data (✅ IMPLEMENTED)
/Dc/0/Voltage # Battery voltage (Volts)
/Dc/0/Current # Battery current (Amps, + charging, - discharging)
/Dc/0/Power # Battery power (Watts)
/Soc # State of charge (0-100%)
/ConsumedAmphours # Consumed amp-hours
/TimeToGo # Time remaining (seconds)
/Dc/0/Temperature # Battery temperature (°C)
/Capacity # Battery capacity (Ah)
/State # Battery state (0=Offline, 1=Online, 2=Error, 3=Unavailable)
# Computed/Calculated Values (✅ IMPLEMENTED) - Smart Battery Monitor Features!
/ConsumedAmphours # Consumed Ah calculated from SOC: capacity × (100 - SOC) / 100
/Dc/0/Power # Battery power calculated as: voltage × current (Watts)
# Advanced Consumption Tracking with S+L-A Formula (✅ IMPLEMENTED)
# When solar/alternator devices are configured, consumption is calculated using:
# Consumption = Solar Current + Alternator Current - Battery Current
# This provides accurate house load calculation by accounting for all energy sources
/History/TotalAhDrawn # Accumulated consumption using S+L-A formula or battery current integration
# Time Calculations (✅ IMPLEMENTED)
/TimeToGo # Intelligent time remaining calculation:
# - During discharge: Based on current consumption rate and remaining capacity
# - During charge: Time to reach 100% SOC based on charging current
# - Uses Signal K timeRemaining if available, otherwise calculated
# Historical Energy Tracking (✅ IMPLEMENTED) - Major Feature for VRM Charts!
/History/DischargedEnergy # Total discharged energy (kWh)
/History/ChargedEnergy # Total charged energy (kWh)
/History/TotalAhDrawn # Total Ah drawn (consumption tracking)
/History/MinimumVoltage # Historical minimum voltage
/History/MaximumVoltage # Historical maximum voltage
# Device Identification (✅ IMPLEMENTED)
/ProductId # Product ID
/ProductName # Product name
/Serial # Device serial number
/DeviceInstance # Device instance ID
/CustomName # Device custom name
# Battery Monitor Features (✅ IMPLEMENTED)
/Relay/0/State # Battery relay state (0=Open, 1=Closed)
/ErrorCode # Error code (0=No error)
/Connected # Connection status (1=Connected)
/DeviceType # Device type (512=BMV Battery Monitor)
# Battery Monitor System Properties (✅ IMPLEMENTED)
/System/HasBatteryMonitor # Has battery monitor flag (1=Yes)
/System/BatteryService # Battery service active (1=Active)
/System/NrOfBatteries # Number of batteries (1)
/System/MinCellVoltage # Minimum cell voltage (array, empty for virtual devices)
/System/MaxCellVoltage # Maximum cell voltage (array, empty for virtual devices)
# Battery Monitor Alarms (✅ IMPLEMENTED)
/Alarms/LowVoltage # Low voltage alarm (0=No alarm, 1=Warning, 2=Alarm)
/Alarms/HighVoltage # High voltage alarm (0=No alarm, 1=Warning, 2=Alarm)
/Alarms/LowSoc # Low SOC alarm (0=No alarm, 1=Warning, 2=Alarm)
/Alarms/HighCurrent # High current alarm (0=No alarm, 1=Warning, 2=Alarm)
/Alarms/HighTemperature # High temperature alarm (0=No alarm, 1=Warning, 2=Alarm)
/Alarms/LowTemperature # Low temperature alarm (0=No alarm, 1=Warning, 2=Alarm)
# Battery Monitor Info (✅ IMPLEMENTED)
/Info/BatteryLowVoltage # Battery low voltage info (0=Default)
/Info/MaxChargeCurrent # Max charge current (array, empty for virtual devices)
/Info/MaxDischargeCurrent # Max discharge current (array, empty for virtual devices)
/Info/MaxChargeVoltage # Max charge voltage (array, empty for virtual devices)
# Battery Monitor Control (✅ IMPLEMENTED)
/Balancer # Balancer active (0=Inactive, 1=Active)
/Io/AllowToCharge # Allow to charge (1=Allowed, 0=Blocked)
/Io/AllowToDischarge # Allow to discharge (1=Allowed, 0=Blocked)
/Io/ExternalRelay # External relay (0=Open, 1=Closed)
Tanks:
# Tank Data (✅ IMPLEMENTED)
/Level # Tank level (0-100%)
/Capacity # Tank capacity (liters/gallons)
/Remaining # Remaining volume (liters/gallons)
/FluidType # Fluid type (0=Fuel, 1=Fresh Water, 2=Waste Water, etc.)
/Status # Tank status
/CustomName # Tank name for VRM display
# Tank Features (❌ NOT YET IMPLEMENTED)
/Volume # Tank volume (liters/gallons)
/RawUnit # Raw sensor unit (e.g., 'V' for voltage)
/RawValue # Raw sensor value
Environment:
# Environment Data (✅ IMPLEMENTED)
/Temperature # Temperature (°C)
/Humidity # Humidity (0-100%)
# Environment Features (❌ NOT YET IMPLEMENTED)
/Status # Sensor status
Switches & Dimmers:
# Switch/Dimmer Data (✅ IMPLEMENTED)
/State # Switch state (0=Off, 1=On)
/Position # Switch position
/DimmingLevel # Dimming level (0-100%)
The plugin implements advanced energy calculation logic that provides accurate consumption data for VRM monitoring:
When solar panels and alternators are configured, the plugin uses the sophisticated S+L-A formula:
House Consumption (A) = Solar Current + Alternator Current - Battery Current
Example Scenario:
This formula accurately calculates the actual house load by accounting for all energy sources flowing to the batteries.
Configure your solar and alternator devices in plugin settings:
// Example configuration paths
directDcDevices: [
{
type: 'solar',
basePath: 'electrical.solar.278',
currentPath: 'electrical.solar.278.current'
},
{
type: 'alternator',
basePath: 'electrical.alternator.277',
currentPath: 'electrical.alternator.277.current'
}
]
S+L-A Mode (preferred when solar/alternator configured):
Battery Current Integration (fallback mode):
Consumed Amp-Hours (from SOC):
ConsumedAmphours = Battery Capacity × (100 - Current SOC) / 100
Historical Energy Tracking:
Total Ah Drawn += Consumption Current × Time Delta (hours)
Discharged Energy += Discharge Current × Voltage × Time Delta (hours) / 1000
Charged Energy += Charge Current × Voltage × Time Delta (hours) / 1000
Time-to-Go Calculations:
During Discharge: TimeToGo = Remaining Capacity ÷ Current Consumption Rate
During Charge: TimeToGo = Capacity to Full ÷ Current Charging Rate
Power Calculation:
Power (W) = Voltage (V) × Current (A)
All energy calculations are persisted across reboots and plugin restarts, ensuring:
Signal K → Venus OS: All enabled devices send their data to Venus OS for display in VRM and on the Cerbo GX touch screen.
Venus OS → Signal K: Switch and dimmer changes made on the Cerbo GX or in VRM are automatically sent back to Signal K, keeping both systems synchronized.
Supported bidirectional paths:
electrical.switches.<id>.state
⇄ Cerbo switch stateelectrical.switches.<id>.dimmingLevel
⇄ Cerbo dimmer levelvenus.com.victronenergy.*
sources) at both data processing and device discovery levelsProcessName: 'signalk-virtual-device'
for identification"Venus OS not reachable":
telnet venus.local 78
"No Signal K data received":
Devices not appearing in VRM:
Service registered but devices don't appear (Advanced Debugging):
If you see com.victronenergy.virtual.tanks
in the D-Bus service list but no devices appear:
Check if devices are enabled in plugin settings (most common issue):
Verify D-Bus interface export:
# On the Cerbo GX - check if the service has proper interfaces
dbus -y com.victronenergy.virtual.tanks / GetValue
# Should return device data, not an error
Check device registration with Venus OS:
# On the Cerbo GX - see if Venus OS recognizes the device
dbus -y com.victronenergy.system /Devices GetValue
# Look for virtual device entries
Monitor Signal K data flow:
tanks.freshWater.0.currentLevel
Check D-Bus property export:
# On the Cerbo GX - inspect the virtual service properties
dbus -y com.victronenergy.virtual.tanks /Tank/0/Level GetValue
# Should return tank level data
Nothing shows up in Cerbo/VRM (Advanced Debugging):
Check if devices are enabled in plugin settings (most common issue):
Verify D-Bus service registration:
# On the Cerbo GX
ssh root@venus.local
dbus -y com.victronenergy.system /ServiceMapping GetValue
# Look for com.victronenergy.virtual.* services
Check if plugin is connecting:
Monitor D-Bus traffic:
# On the Cerbo GX
dbus-monitor --system | grep victronenergy.virtual
# Should show service registration attempts
Check for Signal K data:
electrical.batteries.*
Verify network connectivity:
# On Signal K server
telnet venus.local 78
# Should connect to D-Bus port
Changes in VRM not reflected in Signal K:
MIT © Christian Wegerhoff
electrical.batteries.X.capacity.timeRemaining
prioritysubscriptionmanager.subscribe()
API according to Signal K documentation, replacing previous incorrect subscription methodsvenus.com.victronenergy.*
sources) at both data processing and device discovery levelsSending real values on startup. (Before it has been default values for initialisation.)
First working version
Loop prevention from signalk-venus not working yet
If you're using the signalk-venus plugin, virtual devices from Venus OS will loop back into Signal K. This can cause duplicate data. An update to signalk-venus is in progress to resolve this. (See Installation, Step X)
Virtual devices missing after startup
There is a remaining race condition that has not yet been fully identified. Although the plugin waits 20 seconds to allow the Signal K data tree to populate and Venus OS to initialize, not all virtual devices are always recognized by Venus OS on startup. A manual toggle (disabling and re-enabling the plugin) resolves the issue and all devices appear as expected.
Switches in Venus OS beta
Switches are not tested yet (and probably not working), as Venus OS does not yet support switches
FAQs
Injects batteries, tanks, environment sensors, and switches as virtual devices and battery monitor into the Victron Cerbo GX Venus OS.
The npm package signalk-to-venus receives a total of 33 weekly downloads. As such, signalk-to-venus popularity was classified as not popular.
We found that signalk-to-venus demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.