Another approach, with PCB design ready to be manufactured `can be found here <https://github.com/FatBeard/vbus-arduino-library/tree/master/pcb>`__.
..warning::
Do not connect the GND pin of your module with the ground of Resol unit as that may damage the output port of it.
The output of the device is symmetric, meaning that the signal is not referenced to the ground, but rather it's a
differential signal between the two wires. However, the MCU references the signal against the ground, so the two
grounds are not supposed to be connected to each other as can be seen in the circuit depicted above.
Component
---------
..code-block:: yaml
# Example configuration entry
uart:
id: resol
rx_pin: GPIO3
baud_rate: 9600
vbus:
uart_id: resol
logger:
baud_rate: 0 # disable uart logger on ESP8266
..warning::
If you are using the :doc:`logger` make sure you are not using the same pins for it or otherwise disable the UART
logging with the ``baud_rate: 0`` option.
Configuration variables:
-**uart_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the UART hub used to connect to the device.
..note::
Functionality of the sensors depends on the type of the device and the the scheme arrangement of the hydraulic
system it controls. The actual arrangement number set up can be determined from the settings of the device. Please
check the user manual and assess your arrangement to determine the functionality of each sensor and name them
accordingly.
Sensor
------
..code-block:: yaml
# Example configuration entry
sensor:
- platform: vbus
model: deltasol_bs_plus
temperature_1:
name: Temperature 1
temperature_2:
name: Temperature 2
temperature_3:
name: Temperature 3
temperature_4:
name: Temperature 4
pump_speed_1:
name: Pump Speed 1
pump_speed_2:
name: Pump Speed 2
operating_hours_1:
name: Operating Hours 1
operating_hours_2:
name: Operating Hours 2
heat_quantity:
name: Heat Quantity
time:
name: Device Time
version:
name: Device firmware version
Configuration variables:
-**model** (**Required**): Specify the model of the connected controller. Currently supported models are: ``deltasol_bs_plus``, ``deltasol_c``, ``deltasol_cs2``, ``deltasol_cs_plus``.
All sensors are *Optional* and support all other options from :ref:`Sensor <config-sensor>`.
..note::
Sensors are updated every time a data packet is sent by the device. Some models send data very often, possibly every second. If you are
concerned about the load on the receiving database, you can add a ``throttle`` filter to the sensors.
Binary Sensor
-------------
..code-block:: yaml
# Example configuration entry
binary_sensor:
- platform: vbus
model: deltasol_bs_plus
relay1:
name: Relay 1 On
relay2:
name: Relay 2 On
sensor1_error:
name: Sensor 1 Fault
sensor2_error:
name: Sensor 2 Fault
sensor3_error:
name: Sensor 3 Fault
sensor4_error:
name: Sensor 4 Fault
collector_max:
name: Option Collector Max
collector_min:
name: Option Collector Min
collector_frost:
name: Option Collector Frost
tube_collector:
name: Option Tube Collector
recooling:
name: Option Recooling
hqm:
name: Option Heat Quantity Measurement
Configuration variables:
-**model** (**Required**): Specify the model of the connected controller. Currently supported models are: ``deltasol_bs_plus``, ``deltasol_c``, ``deltasol_cs2``, ``deltasol_cs_plus``.
-**dest** (**Required**): The ``DFA`` value corresponding to your device (see below).
-**source** (**Required**): The address corresponding to ``your device model`` (see below).
-**command** (**Required**): The ``command`` corresponding to your device (see below).
-**sensors** (**Required**): A list of :ref:`Sensor <config-sensor>` definitions that include a ``lambda`` to do the decoding and return a ``float`` value.
-**lambda** (**Required**, :ref:`lambda <config-lambda>`): Code to parse a value from the incoming data packets and return it.
-**dest** (**Required**): The ``DFA`` value corresponding to your device (see below).
-**source** (**Required**): The address corresponding to ``your device model`` (see below).
-**command** (**Required**): The ``command`` corresponding to your device (see below).
-**binary_sensors** (**Required**): A list of :ref:`Binary Sensor <config-binary_sensor>` definitions that include a ``lambda`` to do the decoding and return a ``bool`` value.
-**lambda** (**Required**, :ref:`lambda <config-lambda>`): Code to parse a value from the incoming data packets and return it.
To determine the correct values for the parameters above, visit `packet definitions list <http://danielwippermann.github.io/resol-vbus/#/vsf>`__. In the search field of the **Packets** table, enter the name of your device.
To extract the values with a :ref:`lambda <config-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: ``((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.
For example to decode some sensors of `DeltaSol BS Plus` via lambdas: