Hi all
I’ve got a Resol BS Plus and a Resol Lan Adapter.
I’ve got those working onto the network. Can access setting web page and can access Resol solar data via Resol ServiceCentre on Win10.
Has anyone managed to integrate this into HA yet?
I tried the danielwippermann, but couldn’t seem to get it to work. Note: I’m quite new to HA and not a coding geek yet, so ‘dumbed down’ responses would be appreciated.
Thanks
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.
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.
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
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.