ticapix / home-assistant_sdm630

EASTON SDM630
Apache License 2.0
9 stars 5 forks source link

EASTRON SDM630 configuration file for Home-Assistant

SDM630

The module can be found on Aliexpress for about 80€ (shipping included)

Make sure that you get the Modbus version. At that time (25th nov 2018), the last product version is the v2.

USB to RS485

RS485 is the hardware layer. Modbus is the communication protocol.

You'll need a USB-RS485 module. You can find one on Aliexpress for 2.5€.

For the connection, I used:

connection

Home-Assistant

You need to configure the modbus module with your own parameters and add the sensors. For convenience, the SDM630 registers are loaded from a separate file sdm630_addresses.yaml that needs to be placed in the same directory than your configuration.yaml file.

modbus:
  - name: SDM630
    type: serial
    method: rtu
    port: /dev/ttyUSB0
    baudrate: 9600
    stopbits: 1
    bytesize: 8
    parity: N
    sensors: !include sdm630_addresses.yaml

Once you have restarted Home-Assistant, you should see the sensors on the dashboard.

dashboard

history

Usage

In case you would like to generate the YAML file:

python3 -m venv venv3
. ./venv3/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
./convert_raw2yml.py

The data.txt file comes from a simple copy/paste of the datasheet, plus minor manual corrections