Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resol Deltasol support #1949

Closed
proasnet opened this issue Nov 7, 2022 · 66 comments · Fixed by esphome/esphome#3976
Closed

Resol Deltasol support #1949

proasnet opened this issue Nov 7, 2022 · 66 comments · Fixed by esphome/esphome#3976

Comments

@proasnet
Copy link

proasnet commented Nov 7, 2022

Describe the problem you have/What new integration you would like

Support for receive data over Rx from Resol Deltasol solar controller.

Please describe your use case for this integration and alternatives you've tried:

I need data to home assistant
Alterane of Tasmota smart meter and his script for Resol

Additional context

@nagyrobi
Copy link
Member

nagyrobi commented Nov 7, 2022

Support has been added, just not yet released: esphome/esphome#3976

Doc for the PR: https://deploy-preview-2397--esphome.netlify.app/components/vbus.html

Also visit this thread on our Discord for specific questions: https://discord.com/channels/429907082951524364/1030612607738052628

@ssieb
Copy link
Member

ssieb commented Nov 7, 2022

Which specific device do you want?

@proasnet
Copy link
Author

proasnet commented Nov 7, 2022

Resol Deltasol CS Plus. Over VBus to Rx pin of esp

@nagyrobi
Copy link
Member

nagyrobi commented Nov 7, 2022

The component currently supports natively Resol Deltasol C, DeltaSol CS2 and DeltaSol BS Plus but any device can be added.

Try looking its packet structure maybe CS Plus matches one of the supported ones.

@ssieb
Copy link
Member

ssieb commented Nov 8, 2022

Resol Deltasol CS Plus. Over VBus to Rx pin of esp

Original or V2?

@proasnet
Copy link
Author

proasnet commented Nov 8, 2022

Oh. I dont know now. Where I find this info?
Its 3,5 year old device.

@ssieb
Copy link
Member

ssieb commented Nov 8, 2022

No idea. I assume it's written on the device somewhere. I guess if you don't see a V2 anywhere, it's most likely the original. You could tell by seeing what code it sends, if you have some way to see that.

@proasnet
Copy link
Author

proasnet commented Nov 8, 2022

I think, that is original.
https://www.resol.de/en/produktdetail/98

@proasnet
Copy link
Author

proasnet commented Nov 8, 2022

Unfortunately I can't see. Connecting with tasmota doesn't work for me, maybe I can't compile tasmota correctly. The data is coming to my Rx, but I keep seeing zeros in the web interface. That's why I also want to switch to esphome for this device.
I'll just remind you that I'm a beginner with esp, and the only node I'm using now is from @syssi JKBMS.
There are also problems with the simultaneous connection of two JKBMS via BLE, but this is solving by @syssi, and may be solved by new update esphome

@Gloomyeye
Copy link

Hello, I have also the Solar controller DeltaSol® CS Plus for solar thermal and I would love to see that this device can be added to home assistant by using esphome.

Do I need only an ESP32 or ESP8266 to connect to the DeltaSol® CS Plus device? Or do I need a middleware like KM2 to connect?

@nagyrobi
Copy link
Member

nagyrobi commented Nov 8, 2022

@Gloomyeye yes, read the doc linked above.

@ssieb
Copy link
Member

ssieb commented Nov 8, 2022

What is the alternative that was offered?

@proasnet
Copy link
Author

proasnet commented Nov 8, 2022

Alernative of? I am not inderstand your ask

@nagyrobi
Copy link
Member

nagyrobi commented Nov 8, 2022

Yeah, a more appropriate label would probably be sollution-offered - as there exists a viable solution to the request.

alternative still stands though, as it's not (yet) available by default, but it can alternatively be used as an external component config pointing to either @ssieb's repo or to the PR itself. How to do that is in both the docs and the discord thread I linked above, eg.:

external_components:
  - source:
      type: git
      url: https://github.com/ssieb/custom_components
      ref: vbus
    components: [ vbus ]
    refresh: 1min

@proasnet
Copy link
Author

proasnet commented Nov 9, 2022

Is it possible to use the given example?
I tried the linked VBUS example yesterday and got an error message when installing

@ssieb
Copy link
Member

ssieb commented Nov 9, 2022

What's the error?

@nagyrobi
Copy link
Member

nagyrobi commented Nov 9, 2022

Is it possible to use the given example?

I actively use it even in this moment

@proasnet
Copy link
Author

proasnet commented Nov 9, 2022

If I used the example here
https://deploy-preview-2397--esphome.netlify.app/components/vbus.html
but if I add this to config

external_components:
  - source:
      type: git
      url: https://github.com/ssieb/custom_components
      ref: vbus
    components: [ vbus ]
    refresh: 1min

bin was compiled, but not tested now, I try as tasmota update now

@ssieb
Copy link
Member

ssieb commented Nov 9, 2022

The PR isn't merged yet, so you still need to use it as an external component, either from the PR or my repo. The CS Plus support is only in the PR though.

@proasnet
Copy link
Author

proasnet commented Nov 9, 2022

So, because I do it remotely from my work,
I use RDP to my virtual pc in my home. ESP is not connected by some usb cable to HA.
I load Tasmota minimal, then I upload a resol.bin ( compiled in ESPHome in my HA server ), done.
Then I get a new integration, but state of entities is unavailable.
Here is my resol.yaml config file for ESP, is some bad?

esphome:
  name: resol

esp8266:
  board: esp01_1m

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "va6X6ktqWihT53U31bB2Zz9fA3VG53sHDl4Dn8VPE+k="

ota:
  password: "e1a0f1d04cce64f1c4053f7d1f70183d"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password



captive_portal:

external_components:
  - source:
      type: git
      url: https://github.com/ssieb/custom_components
      ref: vbus
    components: [ vbus ]
    refresh: 1min

uart:
  id: resol
  rx_pin: GPIO3
  baud_rate: 9600

vbus:
  uart_id: resol

sensor:
  - platform: vbus
    model: deltasol_bs_plus
    temperature_1:
      name: Temperature 1
    temperature_2:
      name: Temperature 2
    temperature_3:
      name: Temperature 3
    temperature_4:
      name: Temperature 4
    pump_speed_1:
      name: Pump Speed 1
    pump_speed_2:
      name: Pump Speed 2
    operating_hours_1:
      name: Operating Hours 1
    operating_hours_2:
      name: Operating Hours 2
    heat_quantity:
      name: Heat Quantity
    time:
      name: Device Time
    version:
      name: Device firmware version

@nagyrobi
Copy link
Member

nagyrobi commented Nov 9, 2022

You configured a BS Plus, is that what you have?

@proasnet
Copy link
Author

proasnet commented Nov 9, 2022

No, CS Plus I have.
resol

@nagyrobi
Copy link
Member

nagyrobi commented Nov 9, 2022

A BS Plus config will likely not be suitable for CS Plus...

@proasnet
Copy link
Author

proasnet commented Nov 9, 2022

I changed to cs_plus
no compile, error.

INFO Reading configuration /config/esphome/resol.yaml...
Failed config

sensor.vbus: [source /config/esphome/resol.yaml:36]
  
  Unknown value 'deltasol_cs_plus', did you mean 'deltasol_bs_plus', 'deltasol_cs2', 'deltasol_c'?.
  platform: vbus
  model: deltasol_cs_plus
  temperature_1: 
    name: Temperature 1
  temperature_2: 
    name: Temperature 2
  temperature_3: 
    name: Temperature 3
  temperature_4: 
    name: Temperature 4
  pump_speed_1: 
    name: Pump Speed 1
  pump_speed_2: 
    name: Pump Speed 2
  operating_hours_1: 
    name: Operating Hours 1
  operating_hours_2: 
    name: Operating Hours 2
  heat_quantity: 
    name: Heat Quantity
  time: 
    name: Device Time
  version: 
    name: Device firmware version

@nagyrobi
Copy link
Member

nagyrobi commented Nov 9, 2022

As @ssieb wrote earlier, your CS Plus is only in the PR so you need instead:

external_components:
  - source: github://pr#3976
    components: [ vbus ]
    refresh: 1min

@proasnet
Copy link
Author

proasnet commented Nov 9, 2022

INFO Reading configuration /config/esphome/resol.yaml...
Failed config

external_components: [source /config/esphome/resol.yaml:20]
  - source: github://pr#3976
    components: 
      
      Could not find __init__.py file for component vbus. Please check the component is defined by this source (search path: /config/esphome/.esphome/external_components/a6abb671/esphome/components/vbus/__init__.py).
      - vbus
    refresh: 1min

@proasnet
Copy link
Author

proasnet commented Nov 9, 2022

try again, another and more errors

INFO Reading configuration /config/esphome/resol.yaml...
INFO Updating https://github.com/esphome/esphome.git@pull/3976/head
ERROR Unable to import component vbus.sensor:
Traceback (most recent call last):
  File "/esphome/esphome/loader.py", line 162, in _lookup_module
    module = importlib.import_module(f"esphome.components.{domain}")
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 790, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/config/esphome/.esphome/external_components/a6abb671/esphome/components/vbus/sensor/__init__.py", line 4, in <module>
    from esphome.const import (
ImportError: cannot import name 'UNIT_HOUR' from 'esphome.const' (/esphome/esphome/const.py)
Failed config

sensor.vbus: [source /config/esphome/resol.yaml:37]
  
  Platform not found: 'sensor.vbus'.
  platform: vbus
  model: deltasol_cs_plus
  temperature_1: 
    name: Temperature 1
  temperature_2: 
    name: Temperature 2
  temperature_3: 
    name: Temperature 3
  temperature_4: 
    name: Temperature 4
  heat_quantity: 
    name: Heat Quantity

@proasnet
Copy link
Author

I dont know what is bad...
I tried another circuit and still unavailable entities...
20221110_145913
20221110_145920

@proasnet
Copy link
Author

20221110_150146

@nagyrobi
Copy link
Member

Try verifying the polarity of the signal coming out of the Resol. Use a multimeter and try measuring voltage, should be something varying between 0 and about 8V.

Positive should be towards the resistor, negative to the ground.

sch

@proasnet
Copy link
Author

proasnet commented Nov 10, 2022

Yes, this is the same circuit. I am doing with electronic in my word, I am understand this easy circuit with non inverted switch.
I tried both output polarities, and is 8V voltage.
But, I have not logic analyser.

@proasnet
Copy link
Author

So, great. Now working :)
Thank you very much. I am happy.
Now I check my pcb cicruit in the box.

@proasnet
Copy link
Author

This is my working config for Resol Deltasol CS Plus

substitutions:
  name: resol
  device_description: "Monitor and control Resol Deltasol by VBUS"

esphome:
  name: resol
  comment: ${device_description}

esp8266:
  board: esp01_1m

logger:
  baud_rate: 0
  
api:

ota:

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

captive_portal:

external_components:
  - source:
      type: git
      url: https://github.com/ssieb/custom_components
      ref: vbus
    components: [ vbus ]
    refresh: 1min

uart:
  id: resol
  rx_pin: GPIO3
  baud_rate: 9600

vbus:
  uart_id: resol

sensor:
  - platform: vbus
    model: deltasol_cs_plus
    temperature_1:
      name: Temperature 1
    temperature_2:
      name: Temperature 2
    temperature_3:
      name: Temperature 3
    heat_quantity:
      name: Heat Quantity

binary_sensor:
  - platform: vbus
    model: deltasol_bs_plus
    relay1:
      name: Relay 1 On

@proasnet
Copy link
Author

Hi @nagyrobi , today I see working my defined temperatures. Today has sunny afternoon, solar working,
Temperatures and heat quantity works, but relay not.
I have pump on relay 1 in the resol.

if I use

model: deltasol_cs_plus
relay1:

This is as error.

Please, can you write here possible sensors for deltasol_cs_plus?
Thank you very much.

@proasnet
Copy link
Author

INFO Reading configuration /config/esphome/resol.yaml...
Failed config

binary_sensor.vbus: [source /config/esphome/resol.yaml:54]
  platform: vbus
  model: deltasol_cs_plus
  
  [relay1] is an invalid option for [binary_sensor.vbus]. Please check the indentation.
  relay1: 
    name: Relay 1 On

@proasnet
Copy link
Author

use deltasol_bs_plus for this sensor is possible install, but binary sensor not working.

@nagyrobi
Copy link
Member

nagyrobi commented Nov 11, 2022

Look at the packet definition for CS Plus: http://danielwippermann.github.io/resol-vbus/#/vsf/bytes/00_0010_2211_10_0100
It doesn't have binary data for relays. Thus this component can't implement it either.

You have to use pump_speed_1, pump_speed_2 as normal sensor.
See https://deploy-preview-2397--esphome.netlify.app/components/vbus.html#sensor

@proasnet
Copy link
Author

Thank you. I see status on next sunny day.
I have not a pwm controlled pump, only by relay. I dont know, how value will be on pump on.
The unit has two relays and two pwm outputs for speed control

@nagyrobi
Copy link
Member

nagyrobi commented Nov 11, 2022

Without PWM, you'll see it jumping between 0% and 100%.

@ssieb
Copy link
Member

ssieb commented Nov 12, 2022

The technical documentation for the CS Plus doesn't show a relay indicator, only the pump speed. If you can find something that says otherwise, I can add it.

@proasnet
Copy link
Author

Thank you. I'll leave it like that for now, I'll follow the value you recommended and see. If it works, I'll leave it at that.

@proasnet
Copy link
Author

I found in history graph this abnormal value in some time
obrazek

@proasnet
Copy link
Author

This is in night hours, my solar can not heat to this temperature in a night :)

@ssieb
Copy link
Member

ssieb commented Nov 13, 2022

Are you recording the sensor error binary sensor data? What is the exact value there? I wonder if it's some sort of error code.

@proasnet
Copy link
Author

unfortunately I don't record. I'll set it up in yaml and see if it happens again. It was the same last night.
What I do know is that at night the outside temperature is already negative, this can have an effect if only positive values ​​are allowed

@proasnet
Copy link
Author

According to the outdoor temperature history record, this would be coincidental

@proasnet
Copy link
Author

obrazek

@ssieb
Copy link
Member

ssieb commented Nov 13, 2022

That's a good point. I was assuming positive values. I hadn't seen any indication that negative values would be possible. (I don't actually know what these are measuring. 😄 ). What are the values at the top of that?

@proasnet
Copy link
Author

obrazek
I don't know what the actual temperature range of the regulator is, but the reading range could be set in esp from -30 to 100 even with a margin

@ssieb
Copy link
Member

ssieb commented Nov 13, 2022

Ok, that number makes sense as a negative value.

@proasnet
Copy link
Author

In the manual from the regulator, the measuring range on the solar sensor is not mentioned

@proasnet
Copy link
Author

Please let me know when the problem is solved, I will update esp

@ssieb
Copy link
Member

ssieb commented Nov 13, 2022

I've pushed a fix for this.

@proasnet
Copy link
Author

Problem with negative value of solar is fixed. Working perfectly.
Thank you very much.

jesserockz pushed a commit to esphome/esphome that referenced this issue Feb 6, 2023
Co-authored-by: Samuel Sieb <samuel@sieb.net>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
fixes esphome/feature-requests#1949
@github-actions github-actions bot locked and limited conversation to collaborators Mar 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants