esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
291 stars 36 forks source link

Vbus component gets wrong data from Deltasol CS Plus device #4180

Closed rkeicher closed 1 year ago

rkeicher commented 1 year ago

The problem

First of all many thanks for the new Resol Vbus component - I've been waiting for 2 years for it :smile:. Testing it today I ran into this issue: Sensor values time and version showing wrong values on Deltasol CS Plus device.

Which version of ESPHome has the issue?

2023.2.1

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

2023.2.2

What platform are you using?

ESP8266

Board

Wemos D1 mini

Component causing the issue

vbus

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

Looks like a bug in file /vbus/sensor/vbus_sensor.cpp function DeltaSolCSPlusSensor::handle_message Line 169 this->timesensor->publish_state(get_u16(message, 12)); should be Line 169 this->timesensor->publish_state(get_u16(message, 22));

and

Line 171 this->versionsensor->publish_state(get_u16(message, 26) 0.01f); should be Line 171 this->versionsensor->publish_state(get_u16(message, 32) 0.01f);

canrfs commented 1 year ago

I fixt a good communication with my Dutch basic controller (DeltaSol® SLL type) Super Thanks! solar_pump1_speed = controler_output temp sensors use 2 data bytes, 1 under around 25 deg (X4) and 1 higher with gifs a 1 when higher than 25 deg (X5).

It's not easy to find de exact type for source: xxxxxx and command: xxxxxx, there are many different types it only sents data every 2 minutes (throttle) I use this esphome code and works fine in my case:

- platform: vbus
    model: custom
    dest: 0x0010
    source: 0x2261
    command: 0x0100

    sensors:
      - id: tsensor_x4
        name: solar_tcol_x4
        accuracy_decimals: 1
        filters:
          throttle_average: 120s
        unit_of_measurement: "°C"
        device_class: "temperature"
        state_class: "measurement"
        lambda: return {float((x[5] << 8) + x[4]) * 0.1f};

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

      - id: solar_dagen_x12
        name: solar_dagen_x12
        accuracy_decimals: 0
        filters:
          throttle: 300s
        state_class: total_increasing
        device_class: "DURATION"
        unit_of_measurement: "D"
        lambda: return x[12];

      - id: speed_pump_1
        name: solar_pump1_speed
        device_class: "power_factor"
        unit_of_measurement: "%"
        state_class: "measurement"
        accuracy_decimals: 0
        filters:
          throttle_average: 120s
        lambda: return x[26]; 

      - id: controler_output
        name: solar_controler_output
        device_class: "power_factor"
        unit_of_measurement: "%"
        state_class: "measurement"
        filters:
          throttle: 300s
        accuracy_decimals: 0
        lambda: return x[28]; 

      - id: solar_uren
        name: solar_uren
        icon: mdi:pipe-wrench
        device_class: "DURATION"
        unit_of_measurement: "H"
        accuracy_decimals: 0
        state_class: "total_increasing"
        filters:
          throttle: 300s
        lambda: return x[40];  // Configured arrangement scheme