Slimmelezer and Eastron energymeter on one ESP32

Hello community,

The DSMR component has an UART ID option, but as far as I can see the Eastron SDM does not. Is there a way to use one ESP32 (with uart_1 and uart_2 defined) with both devices connected, so I ony have to have 1 device in my utilty closet?

Is the ESP32 fast enough to handle both devices?

Cheers, Kees

I would point out that you might need a optocoupler between both, because both ports (can) deliver a voltage, also signals to close together might cause noise (cable to close) so you might want to twist cables (pairs) from both sources

the DSMR sends a message very x seconds (1 min tot 5 min) I guess the eastron sends more messages / pulses … but both should be well within the limits

aka “gaat wel” with the correct esp (that has 2 tx/rx available)

Tnx, the problem is that I can not tell th Eastron component to use a specific uart ( eg. uart_2)

Edit:
Since the Eastron component relies on the modbus component, can I add

Modbus:
  uart_id: uart_2

?

from Modbus Controller — ESPHome (example)
actually you do somehting like (sorry no for yaml format) AA ,BB,CC,DD are the GPIO pins that go with either UART 1 or 2

UART Bus — ESPHome → configuration variables shows what is required …

uart:
id: mod_bus
tx_pin: GPIOAA
rx_pin: GPIOBB
baud_rate: 115200
stop_bits: 1

id: DSMR
tx_pin: GPIOCC
rx_pin: GPIODD
baud_rate: 115200
stop_bits: 1

coding is not always obvious … you can use visual studio and esphome marketplace addin to assist in this

I know how to setup the uart component. The question is not how to setup the uarts, but how to bind the right uart_id to the SDM-meter component, which does not have the uart_id variable.

the reaction from my previous post combines with your reply above it

that should work, and yes its a guess indeed the documentation is not very clear although this sounds logical the only way is to try it in real life unfortunatly

My Eastron meter will be installed next week (together with a Zappi carcharger). So Although I am prepairing the ESP this weekend we have to wait till then to see if it works. :wink:

1 Like

page GitHub - heinekmadsen/esphome_components: ESPHome custom_components might intrest you

aka its seems to work