Open jeroen85 opened 5 months ago
@ssieb / @SecSelS As you both are related to the feature and pull request to allow multiple instances of DSMR running, maybe you can give me a clue how to solve this :-)
As code-owners: @glmnet / @zuidwijk Any idea how to solve this issue?
No one? It's a valid case as I have a district heating meter and an electricity meter. Both use a different set of sensors. I have no idea how to solve this (ok... one idea would be getting an extra ESP...)
@glmnet / @zuidwijk Is the DSMR component not supported anymore?
I'm only involved because I enabled multiple instances. I didn't know it was this fragile. Unfortunately, it looks like the component is really not designed to have more than one instance. I'm surprised the second (or first) one works at all.
I also tried to read out two smart meters via P1. I am from Austria and my smart meters are encrypted. Since the TX from the smart meter device is an "open collector", one can use the same UART pin, you only have to be careful not setting both request pins to high. So I have one UART device definition in my yaml.
I tried this solution with two dsmr definitions and the only issue was that always the first key from the dsmr was used to decrypt the data. The second one got an error: "Data should start with /". I think it's because of the wrong encryption key.
The feature was mentioned in esphome/feature-requests (DSMR - Ability to use multiple keys and uart assigned sensors # 2062) but I could not comment, since it was already closed. There I think the person testing the code was using the same key (decryption_key: !secret dsmr_key_p1_1
). This also works for me but I would like to use two different keys.
No one? It's a valid case as I have a district heating meter and an electricity meter. Both use a different set of sensors. I have no idea how to solve this (ok... one idea would be getting an extra ESP...)
Yes, I agree. I have two electricity meters and I tried to build a compact solution with two P1 ports on my own, since there is not really a product available. But I guess the common solution is to put as many "ESP reader" as smart meter in your home.
The problem
I have two P1 meters connected to a ESP32-C3. It appears this only works correctly if the sensor list for both instances are equal.
As soon as the defined sensors for each instance deviate from each other, the system will not compile.
It will generate a lot of warnings about a redefined sensor list
to stop with an error
In this example the sensor list for instance 1 is
For instance 2 it is:
If both sensor lists are equal, it compiles without any issue.
Which version of ESPHome has the issue?
2023.12.5
What type of installation are you using?
Docker
Which version of Home Assistant has the issue?
N/A
What platform are you using?
ESP32
Board
No response
Component causing the issue
dsmr
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
Related to https://github.com/esphome/feature-requests/issues/2062 https://github.com/esphome/esphome/pull/4299