resol deltasol bs plus vbus

118 views
Skip to first unread message

Gert Teunis

unread,
Oct 3, 2024, 2:18:29 PM10/3/24
to RESOL VBus
I have a resol detasol bs plus and I am working on integrating it into homeassistant esphome with an esp8266. I followed the schematic with an optocoupler from this site: https://esphome.io/components/vbus.html# copilot gave me the following yaml code (see code at the bottom) for esphome. The esp8266 is integrated correctly but I don't get raw data? Anyone have an idea? Should I still work with the original vbus/usb or lan? I think these are very expensive. Anyone who can help me please? Gert
substitutions:
  name: esphome-web-7254c9
  friendly_name: ResolZonBoil

esphome:
  name: ${name}
  friendly_name: ${friendly_name}
  min_version: 2024.6.0
  name_add_mac_suffix: false
  project:
    name: esphome.web
    version: dev

esp8266:
  board: esp01_1m

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  manual_ip:
    static_ip: 192.168.2.177
    gateway: 192.168.2.1
    subnet: 255.255.255.0
  ap:
    ssid: "Fallback Hotspot"
    password: "fallback_wachtwoord"

captive_portal:

logger:
  level: VERY_VERBOSE
  baud_rate: 0
  logs:
    uart: VERY_VERBOSE
    vbus: VERY_VERBOSE
    sensor: VERY_VERBOSE

api:

ota:
  platform: esphome

uart:
  id: uart_bus
  tx_pin: GPIO1
  rx_pin: GPIO3
  baud_rate: 9600
  debug:
    direction: BOTH
    after:
      bytes: 150

vbus:
  - id: vbus_hub
    uart_id: uart_bus

sensor:
  - platform: vbus
    model: custom
    dest: 0x10
    source: 0x4221     # Hexadecimal source for DeltaSol BS Plus
    command: 0x100     # Command for requesting data
    sensors:
      - id: scheme
        name: Arrangement scheme
        icon: mdi:pipe-wrench
        accuracy_decimals: 0
        entity_category: diagnostic
        lambda: return x[14];  // Configured arrangement scheme
      - id: temp2
        name: Temperature DHW
        state_class: measurement
        unit_of_measurement: "°C"
        lambda: return ((x[3] << 8) + x[2]) * 0.1f;  // Temperature 2
      - id: raw_data
        name: Raw Data
        unit_of_measurement: ""
        accuracy_decimals: 0
        lambda: |-
          std::string hex_string;
          for (auto byte : x) {
            char buffer[3];
            sprintf(buffer, "%02X", byte);
            hex_string += buffer;
          }
          ESP_LOGD("raw_data", "Raw data: %s", hex_string.c_str());
          return (float)x[0];  // Example of processing raw data

binary_sensor:
  - platform: vbus
    model: custom
    dest: 0x10
    source: 0x4221     # Hexadecimal source
    command: 0x100
    binary_sensors:
      - name: Heat Quantity Measurement On
        id: bin_hqm
        icon: mdi:counter
        lambda: return x[15] & 0x20; // Option Heat Quantity Measurement enabled

web_server:
  port: 80

Craigue Hyland

unread,
Oct 3, 2024, 4:51:09 PM10/3/24
to resol...@googlegroups.com
Hi

I have the same resol usit with just a sinple voltage divider and it works perfectly with the following code:

uart:
id: resol
rx_pin: GPIO16
baud_rate: 9600

vbus:
uart_id: resol

sensor:
- platform: template
id: pressure_psi
name: Solar Heating Pressure Psi
unit_of_measurement: Psi
lambda: return id(pressure).state ;
- platform: template
id: pressure_bar
name: Solar Heating Pressure Bar
unit_of_measurement: Bar
update_interval: 10s
filters:
- multiply: 0.0689
lambda: return id(pressure).state ;

### Analog Inputs
- platform: adc
pin: GPIO34
id: pressure
name: Solar Heating Pressure
update_interval: 60s
# unit_of_measurement: "PSI"
# unit_of_measurement: "bar"
accuracy_decimals: 2
attenuation: 6db
filters:
- calibrate_linear:
- 0.45 -> 0.0
# - 1.8 -> 29.0
- 2.5 -> 65
# - 2.35 -> 43.5

# - offset: -0.25 # Calibration
# - lambda: return ((x * 5.00) / 1024.00) * 40.00 ;

- platform: vbus
model: custom
dest: 0x10
source: 0x4720
command: 0x100
sensors:
- id: collector_temp
name: Collector Temp
accuracy_decimals: 1
filters:
throttle_average: 30s
unit_of_measurement: "°C"
device_class: "temperature"
state_class: "measurement"
lambda: return {float((x[5] << 8) + x[4]) * 0.1f};

- id: water_store_bottom_temp
name: Water Store Bottom Temp
accuracy_decimals: 1
filters:
throttle_average: 30s
unit_of_measurement: "°C"
device_class: "temperature"
state_class: "measurement"
lambda: return {float((x[7] << 8) + x[6]) * 0.1f};

- id: water_store_top_temp
name: Water Store Top Temp
accuracy_decimals: 1
filters:
throttle_average: 30s
unit_of_measurement: "°C"
device_class: "temperature"
state_class: "measurement"
lambda: return {float ((x[9] << 8) + x[8]) * 0.1f};
- id: heat_qty
name: Heat Quantity
accuracy_decimals: 0
filters:
throttle: 60s
state_class: total_increasing
# device_class: "DURATION"
unit_of_measurement: "BTU"
lambda: return x[20];
- id: pump_speed
name: Solar Pump Speed
device_class: "power_factor"
unit_of_measurement: "%"
state_class: "measurement"
accuracy_decimals: 0
filters:
throttle_average: 30s
lambda: return x[16];

- id: pump_runtime
name: Solar Pump Runtime
icon: mdi:pipe-wrench
device_class: "DURATION"
unit_of_measurement: "h"
accuracy_decimals: 0
state_class: "total_increasing"
filters:
throttle: 60s
lambda: return ((x[29] << 8) + x[28]);




--
You received this message because you are subscribed to the Google Groups "RESOL VBus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to resol-vbus+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/resol-vbus/e308bb7f-60f5-453e-ba46-d31dd58478cen%40googlegroups.com.


--
Regards
Craigue
Reply all
Reply to author
Forward
0 new messages