Skip to content
Get started

VBus Receive Guide

Start with the receive-only configuration for a supported model. This guide covers custom packets and optional diagnostics. Everything on this page receives traffic without sending requests.

Use VERBOSE logging temporarily and look for the source address before -> in VBus packet messages. Compare it with the protocol address in the model guides. An address match helps identify the RX decoder; controller-specific settings still require a qualified profile. Return to your normal log level after identification.

The on_datagram trigger receives raw datagrams with protocol version 0x20, after checksum and septet validation. It is independent of the P1 sensor and binary sensor decoders. It only reports traffic already present on the bus; it does not send requests, poll parameters, or change controller settings. A bus carrying only P1 telemetry does not trigger this automation.

vbus:
on_datagram:
then:
- lambda: |-
ESP_LOGI("vbus", "C%04x %04x->%04x: %04x %08" PRIx32,
command, source, destination, value_id, value);

The lambda receives five arguments:

  • command (uint16_t): The datagram command.
  • source (uint16_t): The sender address.
  • destination (uint16_t): The recipient address.
  • value_id (uint16_t): The datagram’s 16-bit field; for value read and write commands, the value ID.
  • value (uint32_t): The datagram’s 32-bit payload, with all bits preserved.

Interpretation, scaling, and valid identifiers depend on the command and controller model. When a documented value is signed, use static_cast<int32_t>(value) before applying its scale. Arguments are passed by value and remain available after a delay action. Multiple on_datagram automations can be configured.

Devices on a VBus are identified with a source address. There can be multiple devices on the same bus, each device type has a different address.

sensor:
- platform: vbus
model: custom
dest: 0x10
source: 0x1234
command: 0x100
sensors:
- id: temp1
name: Temp 1
lambda: |-
if (x.size() < 2) return NAN;
return static_cast<int16_t>((x[1] << 8) | x[0]) * 0.1f;
  • dest (Optional): The DFA value corresponding to your device (see below).

  • source (Optional): The address corresponding to your device model (see below).

  • command (Optional): The command corresponding to your device (see below).

  • sensors (Optional): A list of Sensor definitions that include a lambda to do the decoding and return a float value.

  • lambda (Required, lambda): Code to parse a value from the incoming data packets and return it. The data packet is in a std::vector<uint8_t> called x.

  • dest (Optional): The DFA value corresponding to your device (see below).

  • source (Optional): The address corresponding to your device model (see below).

  • command (Optional): The command corresponding to your device (see below).

  • binary_sensors (Optional): A list of Binary Sensor definitions that include a lambda to do the decoding and return a bool value.

  • lambda (Required, lambda): Code to parse a value from the incoming data packets and return it. The data packet is in a std::vector<uint8_t> called x.

To determine the correct values for the parameters above, visit packet definitions list. In the search field of the Packets table, enter the name of your device.

To extract the values with a lambda, look in the packet structure by clicking the Bytes link in the table. Each value is placed at an offset within the packet. For float values, let’s look at the temperature example: the value is stored as a 16 -bit value in 2 bytes little-endian format. Since it’s always the second byte containing the upper byte, it needs to be shifted by 8 bits (multiplied by 256 ) (e.g. 0x34, 0x12 -> 0x1234 ). The result needs to be multiplied by the factor, which is 0.1, to obtain the correct values: static_cast<int16_t>((x[1] << 8) | x[0]) * 0.1f. The number within the square brackets is the [offset]. For binary values, multiple binary values are stored within a single numeric value encoded with a bitmask. To extract the binary value all you have to do is to apply bitwise AND operator & between the value at the corresponding offset and the mask shown in the table.

Check payload length before indexing it, and use the signedness and scale from the packet definition. Numeric examples below return NAN for a short payload; the binary example returns false.

For example to decode some sensors of DeltaSol BS Plus via lambdas:

# Example configuration entry
sensor:
- platform: vbus
model: custom
dest: 0x10
source: 0x4221
command: 0x100
sensors:
- id: scheme
name: Arrangement scheme
icon: mdi:pipe-wrench
accuracy_decimals: 0
entity_category: diagnostic
lambda: |-
if (x.size() < 15) return NAN;
return x[14]; // Configured arrangement scheme
- id: temp2
name: Temperature DHW
state_class: measurement
unit_of_measurement: "°C"
lambda: |-
if (x.size() < 4) return NAN;
return static_cast<int16_t>((x[3] << 8) | x[2]) * 0.1f; // Temperature 2
binary_sensor:
- platform: vbus
model: custom
dest: 0x10
source: 0x4221
command: 0x100
binary_sensors:
- name: Heat Quantity Measurement On
id: bin_hqm
icon: mdi:counter
lambda: return x.size() > 15 && (x[15] & 0x20);