Resol Vbus Data In Home Assistant with MQTT

At this time there is an easier alternative to use with HACS so please visit:

https://github.com/dm82m/hass-Deltasol-KM2

How to get those values from the Resol solar controller with a Vbus/lan adapter to Home Assistant.

Used equipement:

  • Resol Deltasol CS2
  • Resol Vbus/Lan adapter
  • Tested on my Proxmox server but it also works on a Raspberry Pi

All the information I used comes from this site:

http://danielwippermann.github.io/resol-vbus/#/

Open Terminal or SSH to your install with PUTTY.

Before we start it always good to check:

  • $ sudo apt update
  • $ sudo apt upgrade

First I need to install NPM on a fresh install, see the next steps:

How install npm on Linux? (on a VM I used it with Debian Bullseye but also on Raspian).

  • $ sudo apt install nodejs
  • $ node -v or node –version (to check te version)
  • $ sudo apt install npm
  • $ npm -v or npm –version (to check the version)

Then I followed the next steps from this example:

http://danielwippermann.github.io/resol-vbus/#/md/examples/vbustouch-proxy/README

  • $ git clone https://github.com/danielwippermann/resol-vbus
  • $ cd resol-vbus
  • $ npm install
  • $ cd examples/vbustouch-proxy
  • $ npm install
  • $ cp config.js.example config.js

The next step is to edit the config.js file.

  • ~ cd /resol-vbus/examples/vbustouch-proxy
  • $ sudo nano config.js

Edit the next parts in the file:


    connectionOptions: {
        host: 'IP-ADRESS FROM VBUS/LAN ADAPTER',
        password: 'vbus',
 
    mqttConnect: {
        host: 'IP-ADRESS FROM HOME ASSISTANT',
	port: 1883,
        username: 'HOME ASSISTANT NAME',
        password: 'HOME ASSISTANT PW',
    
	
    mqttPacketFieldMap: {
        temp1: '00_0010_1121_10_0100_000_2_0',
        temp2: '00_0010_1121_10_0100_002_2_0',
        temp3: '00_0010_1121_10_0100_004_2_0',
        temp4: '00_0010_1121_10_0100_006_2_0',
	temp5: '00_0010_1121_10_0010_008_2_0',
	flow: '00_0010_1121_10_0010_010_2_0',
        relay: '00_0010_1121_10_0100_012_1_0',
        relayhrs: '00_0010_1121_10_0100_014_2_0',
        unittype: '00_0010_1121_10_0100_016_1_0',
	errormask: '00_0010_1121_10_0100_018_2_0',
	sens1stat: '00_0010_1121_10_0100_018_1_1',
	sens2stat: '00_0010_1121_10_0100_018_1_2',
	sens3stat: '00_0010_1121_10_0100_018_1_4',
        sens4stat: '00_0010_1121_10_0100_018_1_8',
	statmask: '00_0010_1121_10_0100_020_4_0',
	heat: '00_0010_1121_10_0100_024_4_0',
	swvers: '00_0010_1121_10_0100_028_2_0,

The ID’s in this file list are according to the ID’s from the list of the DeltaSol CS2, for other types there are different ID lists to find on: http://danielwippermann.github.io/resol-vbus/#/vsf


DeltaSol CS2 (0x1121), command 0x0100 (00_0010_1121_10_0100)


IDNameFactorUnit
00_0010_1121_10_0100_000_2_0Temperature sensor 10.1°C
00_0010_1121_10_0100_002_2_0Temperature sensor 20.1°C
00_0010_1121_10_0100_004_2_0Temperature sensor 30.1°C
00_0010_1121_10_0100_006_2_0Temperature sensor 40.1°C
00_0010_1121_10_0100_008_2_0Temperature sensor 50.1°C
00_0010_1121_10_0100_010_2_0Flow rate0.1l/min
00_0010_1121_10_0100_012_1_0Pump speed relay1%
00_0010_1121_10_0100_014_2_0Operating hours relay1h
00_0010_1121_10_0100_016_1_0UnitType1
00_0010_1121_10_0100_018_2_0ErrorMask1
00_0010_1121_10_0100_018_1_1Sensor 1 defective1
00_0010_1121_10_0100_018_1_2Sensor 2 defective1
00_0010_1121_10_0100_018_1_4Sensor 3 defective1
00_0010_1121_10_0100_018_1_8Sensor 4 defective1
00_0010_1121_10_0100_020_4_0Status mask1
00_0010_1121_10_0100_024_4_0Heat quantity1Wh
00_0010_1121_10_0100_028_2_0SW Version0.01

Then we have to:

  • $ node index.js

And the script will run.

To automate the script when rebooting add a line to the crontab:

  • $ crontab -e
  • choose for nano to edit the file and add the line:
  • @reboot node /home/……./resol-vbus/examples/vbustouch-proxy/index.js
  • fill your userid at ……..

Moving to Home Assistant

Mosquitto broker should be up and running in the Add-on’s.

Edit the configuration.yaml or better if you have a sensor.yaml.

These sensors are added:

sensor:

- platform: mqtt
  name: "Zonnecollector Temp"
  state_topic: "home/resol"
  unit_of_measurement: "°C"
  value_template: "{{ value_json.temp1 }}"

- platform: mqtt
  name: "Zonnecollector boiler Temp"
  state_topic: "home/resol"
  unit_of_measurement: "°C"
  value_template: "{{ value_json.temp2 }}"

- platform: mqtt
  name: "Zonnecollector Pomp status"
  state_topic: "home/resol"
  unit_of_measurement: "%"
  value_template: "{{ value_json.relay }}"

- platform: mqtt
  name: "Zonnecollector Pomp actief"
  state_topic: "home/resol"
  unit_of_measurement: "U"
  value_template: "{{ value_json.relayhrs }}"

- platform: mqtt
  name: "Resol Unit type"
  state_topic: "home/resol"
  value_template: "{{ value_json.unittype }}"

- platform: mqtt
  name: "Resol Error Mask"
  state_topic: "home/resol"
  value_template: "{{ value_json.errormask }}"

- platform: mqtt
  name: "Zonnecollector sensor error"
  state_topic: "home/resol"
  value_template: "{{ value_json.sens1stat }}"

- platform: mqtt
  name: "Zonnecollector boiler sensor error"
  state_topic: "home/resol"
  value_template: "{{ value_json.sens2stat }}"

- platform: mqtt
  name: "Resol Satus Mask"
  state_topic: "home/resol"
  value_template: "{{ value_json.statmask }}"

- platform: mqtt
  name: "Resol Warmteopbrengst"
  state_topic: "home/resol"
  unit_of_measurement: "kWh"
  value_template: "{{ value_json.heat }}"

- platform: mqtt
  name: "Resol SW vers."
  state_topic: "home/resol"
  value_template: "{{ value_json.swvers }}"


Save, check the configuration and restart Home Assistant.

And after some tweaking in Home Assistant this is my result:

3 Responses to “Resol Vbus Data In Home Assistant with MQTT

  • Thank you for reply, now it should be readable.

  • Bastiaan
    3 years ago

    Hallo Haarie,

    Heb je website gevonden door op vbus te googelen

    Heb een vraag. Ik zou de data uit de Resol data in Node red willen gebruiken.
    Kun je aangeven of je hier ervaring mee hebt.
    Zowel met vbus als met node red en mqtt heb ik tot nu toe weinig ervaring maar zou dit graag willen leren.

    Bastiaan Brouwer

    • Bastiaan, dat is natuurlijk ook mogelijk om de data via node red binnen te halen maar ik zou het eerst via deze manier proberen. Dan kan je later de mqtt data via node red binnen halen maar heb dit zelf ook nog niet gedaan.

      Groetjes, Harald

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Haarie.nl
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.