Open zuidwijk opened 2 years ago
Using dsmr
and improv_serial
on the same UART is impossible, as both components process the bytes received over serial. They'll interfere with each other.
I'm not sure why improv_serial is coupled to the logger, but even if it wasn't, this wouldn't work.
The conflict is not with the logger. The relation with the logger is that with baud_rate: 0
, the DSMR reader can use hardware UART for RX. The conflict is, like @oxan says, the fact that both improv_serial
and dsmr
make use of RX, and RX is only available on a single hardware UART on ESP8266. If both must be used, I'd say that using ESP32 would be the way to go.
The only ESP32 suitable for < 250mA would be the C3... and the support for that isn't 100% ready (at least, not a few weeks ago).
But I'm using D7 (gpio13) as RX, so the main RX/TX isn't used. Than can still be used for Improv, right?
GPIO13 is the alternate RX pin and still uses the one and only hardware UART that the esp8266 has so it wont work.
To get multiple UART receivers to work, ESPHome will need to have some sort of actual UART bus that forwards all received packets to all listening components for decoding.
Note that connecting multiple devices on the RX side is not a good idea even if it were supported.
First, if the dsmr sends data at the same time as your PC using improv_serial (which can happen because neither is aware of the other's existence), both integrations will just end up with garbled data. Considering the amount of data dsmr sends that's not unlikely to happen.
Secondly, you'd also need to be careful with the wiring. If the DSMR is pulling the line high and your PC low you might end up damaging the components if they don't have special circuitry to prevent this.
The problem
I want to use
improv_serial:
in the code of DSMR. Yet DSMR requires the logger baud_rate to be 0. Usingimprov_serial
requires the logger baud_rate to be not 0.Using Improv:
Using DSMR:
Which version of ESPHome has the issue?
2021.12.1
What type of installation are you using?
Home Assistant Add-on
Which version of Home Assistant has the issue?
2021.12.5
What platform are you using?
ESP8266
Board
ESP8266-12F
Component causing the issue
DSMR
Example YAML snippet
Anything in the logs that might be useful for us?
No response
Additional information
No response