De Dietrich/Diematic (Modbus) to MQTT Interface

Ok,
I’m not an expert on those topics at all but that is how I got it running:

Dockerfile

ARG BUILD_FROM
FROM $BUILD_FROM

ENV LANG C.UTF-8

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

# Install requirements for add-on
RUN \
    apk add --no-cache \
         python3 \
             py3-pip

RUN python3 -m venv .venv
RUN source .venv/bin/activate \
		 && pip install pytz \
		 && pip install paho-mqtt

# Copy data for add-on
COPY run.sh /
RUN chmod a+x /run.sh

COPY src/ /

CMD [ "/run.sh" ]

run.sh

.venv/bin/python3 Diematic32MQTT.py

Hope it works for you!

Sebastian

It’s up and running!!!

Thank you very much, I’ve been messing around with the addon topic for a long time but since I’m not a programmer I didn’t move it, I started Diematic through the console.

Great to hear.

Which RS485 converter do you use?

https://community.home-assistant.io/t/de-dietrich-diematic-modbus-to-mqtt-interface/363086/90

I have successfully tested a EW11a adapter.
All adapters from Elfin should be ok (common firmware)

Elfin-EW11 TCP/IP Telnet Protocole Modbus TCP
https://a.aliexpress.com/_EJLDUdw

Just switch to transparent mode instead of Modbus mode. Default packetization delay 50 ms is OK.

I found the reason for my synchronization problems…

The mini din plugs I ordered at aliexpress were the problem. The housing of the plug did not allow the connector to connect properly.

Without the housing, it works like a dream.