Virtual devices - victronenergy/node-red-contrib-victron GitHub Wiki
These nodes create virtual Victron devices on D-Bus or inject data into Venus OS.
For reading values from physical devices, see Input nodes.
The Virtual Device node creates a virtual Victron device on D-Bus, making it appear as a real device to Venus OS and the VRM portal. This is useful for feeding external data (e.g. from a sensor or third-party system) into the Victron ecosystem.
The service name on D-Bus will be com.victronenergy.<type>.virtual_<nodeId>.
Send msg.payload as a JavaScript object where keys are D-Bus path names (without the leading /) and values are the corresponding readings:
msg.payload = {
"Dc/0/Voltage": 48.2,
"Dc/0/Current": 12.5,
"Soc": 85
};Set msg.connected = false to take the device offline (releases the D-Bus service name), or msg.connected = true to bring it back online.
| Type | D-Bus service | Key paths | Read node |
|---|---|---|---|
| AC Load | com.victronenergy.acload |
/Ac/Energy/Forward, /Ac/Energy/Reverse, /Ac/L1/Current, /Ac/L1/Energy/Forward, /Ac/L1/Energy/Reverse
|
Acload input |
| Battery | com.victronenergy.battery |
/Dc/0/Current, /Dc/0/Power, /Dc/0/Voltage, /Dc/0/Temperature, /Info/ChargeRequest
|
Battery input |
| DC Load | com.victronenergy.dcload |
/Dc/0/Current, /Dc/0/Power, /Dc/0/Voltage
|
Dcload input |
| E-drive | com.victronenergy.motordrive |
/Dc/0/Current, /Dc/0/Power, /Dc/0/Voltage, /Controller/Temperature, /Coolant/Temperature
|
E-drive input |
| Generator |
com.victronenergy.genset / com.victronenergy.dcgenset
|
/Start, /EnableRemoteStartMode, /Engine/CoolantTemperature, /Engine/ExhaustTemperature, /Engine/OilTemperature
|
Generator input |
| GPS | com.victronenergy.gps |
/Altitude, /Fix, /NrOfSatellites, /Position/Latitude, /Position/Longitude
|
Gps input |
| Grid meter | com.victronenergy.grid |
/Ac/Energy/Forward, /Ac/Energy/Reverse, /Ac/Frequency, /Ac/N/Current, /Ac/Power
|
Gridmeter input |
| Meteo | com.victronenergy.meteo |
/CellTemperature, /ExternalTemperature, /Irradiance, /WindSpeed, /WindDirection
|
Meteo input |
| PV inverter | com.victronenergy.pvinverter |
/Ac/Energy/Forward, /Ac/Power, /Ac/MaxPower, /Ac/PowerLimit, /ErrorCode
|
Pvinverter input |
| Tank sensor | com.victronenergy.tank |
/Capacity, /FluidType, /Level, /RawUnit, /RawValue
|
Tank input |
| Temperature sensor | com.victronenergy.temperature |
/Temperature |
Temperature input |
-
Port 1 (Passthrough): Passes through the original
msgwithmsg.connectedset to the current D-Bus connection state.
The Virtual Switch node creates a virtual I/O extender switch on D-Bus, appearing to Venus OS as a connected Cerbo GX I/O extender device. The GX device GUI will show the virtual switch and allow interaction with it.
Send msg.payload as a JavaScript object with the property to set:
msg.payload = { "SwitchableOutput/output_1/State": 1 }; // Turn on
msg.payload = { "SwitchableOutput/output_1/Dimming": 75 }; // Set dimming to 75%Set msg.connected = false to take the switch offline.
| Type | Description | D-Bus path |
|---|---|---|
| On/Off | Simple toggle |
/SwitchableOutput/{type}/State (0=Off, 1=On) |
| Dimmable | On/off with dimming level |
/SwitchableOutput/{type}/State, /SwitchableOutput/{type}/Dimming (0-100%) |
| Temperature setpoint | Thermostat slider |
/SwitchableOutput/{type}/Dimming (°C), /SwitchableOutput/{type}/Measurement
|
| Stepped | Slider with steps |
/SwitchableOutput/{type}/Dimming, /SwitchableOutput/{type}/State
|
| Basic slider | Numeric slider | /SwitchableOutput/{type}/Dimming |
| Dropdown | Selection list | /SwitchableOutput/{type}/State |
| Numeric input | Free numeric entry |
/SwitchableOutput/{type}/Dimming, /SwitchableOutput/{type}/State
|
| Three state | Off/On/Auto |
/SwitchableOutput/{type}/State (0=Off, 1=On, 2=Auto) |
| RGB color wheel | RGB color picker |
/SwitchableOutput/{type}/State, /SwitchableOutput/{type}/LightControls
|
| CCT wheel | Color temperature |
/SwitchableOutput/{type}/State, /SwitchableOutput/{type}/LightControls
|
| RGB+White dimmer | RGBW dimmer |
/SwitchableOutput/{type}/State, /SwitchableOutput/{type}/LightControls
|
-
Port 1 (Passthrough): Passes through the original
msgwithmsg.connectedset to the current D-Bus connection state. -
Port 2 (State): Emits a message when the switch state changes, with
msg.payloadcontaining the new state value. - Port 3 (Value, if applicable): Emits a message when the dimming/value changes (for dimmable, stepped, numeric, and RGB types).
The Inject Notification node sends a notification to the Venus OS notification center, where it appears in the GX device GUI.
Notifications are sent to D-Bus at com.victronenergy.platform /Notifications/Inject.
- Type: The notification severity: Warning (0), Alarm (1), or Information (2).
- Title: The notification title displayed in the GUI.
Send the notification message in msg.payload:
msg.payload = "Battery voltage is low";Override the configured type and title at runtime:
msg.payload = "Critical temperature alert";
msg.type = "alarm"; // string: "warning", "alarm", "info" - or number: 0, 1, 2
msg.title = "Temperature Alert";Title is truncated to 100 characters and message to 500 characters.
Passes through the original msg with msg.notification added:
msg.notification = {
type: 1, // type number used
title: "Battery Alert",
message: "Battery voltage is low"
}