I got that up and running using a Rasperry Pi 3 and the json-live-data-server of Daniel Wippermann.
The trick is to skip that vBus stuff at all and plug your PI directly to Tx/Rx of the Resol board.
Once you open your device you will see a seperate shild. This seems to be a UART → vBus converter.
So just remove this shield and connect your Pi (Rx Tx GND) instead. On my board the plug looks like this
VBus+ VBus- NC NC 16+
Rx Tx NC 3.3+ GND
But of course you have to verify this by your self.
Please let me know if you need some more information.
Thanks for the info!
Do you have any pictures etc?? Or some guide?
Unfortunately there is no guide. I can tell you what I did.
Basically you have to do these steps:
- Connect your PI to your Resol device.
- Setup your PI to serve the json-live-data-server.
- Modify your configuration.yaml in home-assistant.
However, this comes with ABSOLUTELY NO WARRANTY. It’s your own risk to do this.
Connect your PI to your Resol device
My Resol device. I opend it and removed …
… this shield. If your device has the same shield you can …
… connect these pins of your resol device …
… with these pins of your PI. I used a Raspberry Pi 3 Model B Rev 1.2.
Setup your PI to serve the json-live-data-server
1 cat /proc/cpuinfo
2 wget https://nodejs.org/dist/v16.13.2/node-v16.13.2-linux-armv7l.tar.xz
3 tar xvfJ node-v16.13.2-linux-armv7l.tar.xz
4 sudo cp -R node-v16.13.2-linux-armv7l/* /usr/local
5 sudo reboot now
6 node -v && npm -v
8 sudo npm i -g npm@latest
9 sudo npm install -g [email protected]
10 sudo npm audit
11 sudo npm install --save resol-vbus
12 ls -l
13 cd node_modules/resol-vbus/
14 ls -l
15 cd ~
16 sudo apt install git
17 git clone https://github.com/danielwippermann/resol-vbus.git
20 cd resol-vbus/examples/json-live-data-server
21 sudo npm install
22 cp config.js.example config.js
23 nano config.js
(Change to SerialConnection and
add " path: '/dev/serial0' " to connectionOptions)
24 sudo raspi-config
( Interface Options -> Serial Port:
login shell: no
serial port hardware: yes
reboot: yes
)
25 ls -l /dev/serial0
(this should show somethimng like this:
lrwxrwxrwx 1 root root 5 Feb 8 14:17 /dev/serial0 -> ttyS0
)
26 sudo node /home/pi/resol-vbus/examples/json-live-data-server/index.js
27 curl -s 'http://localhost:3333/api/v1/live-data
( this should show your json data)
28 sudo nano /etc/rc.local
(in case of autostart, add this line at the end of the file
node /home/pi/resol-vbus/examples/json-live-data-server/index.js &
)
29 sudo reboot now
30 curl -s 'http://localhost:3333/api/v1/live-data
(final check)
Modify your configuration.yaml in home-assistant
Add this to your configuration.yaml in home-assistant.
You may have to fit it to your json data and of course change the ip address.
rest:
- resource: http://192.168.178.75:3333/api/v1/live-data
scan_interval: 10
sensor:
- name: "Warmwasser"
value_template: '{{value_json[0].rawValue}}'
unit_of_measurement: '°C'
json_attributes_path: "$[0]"
json_attributes:
- "name"
- "rawValue"
- name: "Kaltwasser"
value_template: '{{value_json[1].rawValue}}'
unit_of_measurement: '°C'
json_attributes_path: "$[1]"
json_attributes:
- "name"
- "rawValue"
- name: "Puffer"
value_template: '{{value_json[2].rawValue}}'
unit_of_measurement: '°C'
json_attributes_path: "$[2]"
json_attributes:
- "name"
- "rawValue"
- name: "Zirkulation"
value_template: '{{value_json[14].rawValue}}'
json_attributes_path: "$[14]"
json_attributes:
- "name"
- "rawValue"
Have a lot fun
WOW!! what a great guide! Thanks!
if it supplies 3.3v does this mean you can replace it with a nodemcu and just run esphome or tasmota?
No, I’m afraid not. These modules don’t know how to talk to your resol device by default.
It would require you to implement the entire data communication from scratch.
A portion of work which has already been done by Daniel Wippermann in his great GitHub project: GitHub - danielwippermann/resol-vbus: A JavaScript library for processing RESOL VBus data
However, if you get this Node.js stuff up and running (in real time!) on a NodeMCU there might be a chance.
After an afternoon it works like a charm
Had some problems but I sorted it out.
Thanks for your guide and code to get it work!
Need some sun now
Congratulation, that’s pretty much faster than I did
However, during the while I changed my data transfer.
Rather than getting all data every ten seconds I’d liked to post changed values only.
This leads in less data traffic and less data transfer delay.
So I use a script to post my data to homeassistant, now.
This requires to enable homeassistants RESTful API by adding “api:” to your configuration.yaml.
#!/bin/bash
# Add units for values to transmit. Use space if there is no unit!
declare -A UnitMap
UnitMap[00_0010_4241_10_0100_000_2_0]="°C"
UnitMap[00_0010_4241_10_0100_002_2_0]="°C"
UnitMap[00_0010_4241_10_0100_004_2_0]="°C"
UnitMap[00_0010_4241_10_0100_006_2_0]="l/h"
UnitMap[00_0010_4241_10_0100_008_1_0]="%"
UnitMap[00_0010_4241_10_0100_009_1_0]="%"
UnitMap[00_0010_4241_10_0100_013_1_32]=" "
UnitMap[00_0010_4241_10_0100_013_1_64]=" "
UnitMap[00_0010_4241_10_0100_014_1_1]=" "
UnitMap[00_0010_4241_10_0100_014_1_2]=" "
UnitMap[00_0010_4241_10_0100_019_1_0]="min"
UnitMap[00_0010_4241_10_0100_024_2_0]="Wh"
# url to homeassistant RESTful api
cRestApi=https://your_homeassistant:8123/api/states/sensor
# token generated with homeassistant
cBearer=eyJ0eXAiOiJKV...
# json format required by homeassistant
json_fmt='{
"state": "p1",
"attributes": {
"entity_id": "p2",
"unit_of_measurement": "p3",
"friendly_name": "p4"
}
}'
# Get new data from resol device
read_reglo() {
local -n ValueMap=$1
while IFS=$'\t' read -r id name rawValue; do
if [ "${UnitMap[$id]}" != "" ]
then
if [ "${ValueMap[$id]}" != "$rawValue" ]
then
# replace placeholder p1 to p4 with real data
json_msg=${json_fmt/p1/$rawValue}
json_msg=${json_msg/p2/sensor.$id}
json_msg=${json_msg/p3/${UnitMap[$id]}}
json_msg=${json_msg/p4/$name}
# pipe json message to curl and add with parameter @- to data
echo $json_msg | \
curl -X POST "$cRestApi.$id" \
-H "Authorization: Bearer $cBearer" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
--data @-
# store value for next iteration
ValueMap[$id]=$rawValue
fi
fi
done < <(jq -r '.[]|[.id, .name, .rawValue] | @tsv' < <(curl -s http://localhost:3333/api/v1/live-data))
}
# Loop for ever to permanently check and transmit values
declare -A LastValueMap
while true; do
read_reglo LastValueMap
done
It was because of you. Just followed your road
Cant you just extend the polling time in daniel’s code?
This could possibly be a solution for you too.
Hi Jim, just wondered if you knew anyone that might have one of these boards. I’m hoping to link up with a Raspberry Pi.
Hi Justin, just wondered if you had any of these boards left. I’m hoping to link up with a Raspberry Pi.
I have a few spare blank boards (that convert to RS-485)… You’ll need to source the components and solder them on. Mine has been happily working for years. It does look easier to just use the direct 3.3V solution above though, rather than covert to RS-485 signally and back again - depends how isolated you want to be and how far your wires need to go. I also wrote my own protocol decoder in python that pushes the data into MQTT. Yell if you want a few blanks.
I take it you’ve see the recent integration for RESOL. I have a DL/2 and have set this up. It works very well indeed.
- Justin.
@G8YTZ That looks good - from where did you integrate?
RESOL doesn’t appear under integrations when I search
thanks.
It’s on the Home Assistant Community Store!
These are the panels I posted in the above picture for my DL/2 with BS/4 pump controller
type: entities
entities:
- entity: sensor.hot_water
- entity: sensor.temperature_sensor_3
name: Cylinder Upper
- entity: sensor.temperature_sensor_2
name: Cylinder Lower
- entity: sensor.temperature_sensor_1
name: Solar Collector
icon: mdi:solar-power-variant
- entity: sensor.temperature_sensor_4
name: Solar Return
icon: mdi:solar-power-variant
- entity: sensor.ecodan_flow
- entity: sensor.pump_speed_relay_1
name: Pump Speed
icon: mdi:pump
- entity: sensor.operating_hours_relay_1
name: Pump Hours
icon: mdi:clock-check-outline
- entity: sensor.heat_quantity
name: Heat Quantity
icon: mdi:weather-sunny
title: Solar Hot Water
square: true
type: grid
cards:
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: switch.hot_water
icon: mdi:light-switch
name: Hot Water
show_state: true
hold_action:
action: toggle
- type: gauge
entity: sensor.hot_water
needle: true
severity:
green: 10
yellow: 40
red: 60
- type: gauge
entity: sensor.ecodan_flow
needle: true
severity:
green: 10
yellow: 35
red: 55
- type: gauge
entity: sensor.pump_speed_relay_1
needle: true
severity:
green: 0
yellow: 50
red: 90
name: Solar Pump Speed
columns: 2
square: true
type: grid
cards:
- type: gauge
entity: sensor.hot_water_upper
needle: true
severity:
green: 10
yellow: 50
red: 90
name: Hot Water Upper
- type: gauge
entity: sensor.pump_speed_relay_1
needle: true
severity:
green: 0
yellow: 50
red: 90
name: Pump Speed
- type: gauge
entity: sensor.hot_water_middle
needle: true
severity:
green: 10
yellow: 50
red: 90
- type: gauge
entity: sensor.temperature_sensor_1
name: Solar Collector
needle: true
severity:
green: 10
yellow: 50
red: 70
- type: gauge
entity: sensor.hot_water_lower
needle: true
severity:
green: 10
yellow: 50
red: 90
- type: gauge
entity: sensor.temperature_sensor_4
needle: true
severity:
green: 10
yellow: 50
red: 80
name: Solar Return
columns: 2
Do you have any of these boards left? I would like to Buy one please.
I can send you one, please one that they are just raw PCBs, you have to source and mount the SMD components yourself. You need to be skilled at electronics, this is not a beginner project! £2 to cover P&P.
Best regards,
Justin.
Hello. I am a new guy in this community.
My Cosmo multi 2 puts nan °C in my esp home. I got the informations from
The output Power from the Vbus is about 9V. Shall I put a 1K resistor to a the + of the Vbus?
Shall I get the right Hex Adress (7831)
Please let me know.
THX