Energy metering with Eastron SDM630 v2 Modbus

Hi

Yesterday after few hours of configuration I successfully have setup energy metering using popular Eastron SDM630 Power Meter (I think other models will also work with this configuration).

Contents of my installation:

  1. Hassio (build on VirtualBox on my computer - temporary)
  2. Eastron SDM630 v2 Modbus (from AliExpress)
  3. Waveshare RS485 TO ETH module (in documentation for this device there is no ModBus support, whathever SDM630 use RTU communication which go thru this device.

Waveshare RS485 TO ETH Configuration
Serial Port configuration
Baud Rate: 9600 bps
Data Size: 8bit
Parity: Even
Stop Bits: 1
Local Port Number: 8888
Work Mode: TCP Server (important)
other options unchecked
rest parameters - default

Eastron SDM630 Configuration
Serial communication the some like on Waveshare
Need to setup ModBus Primary Address. I choose 1

Hassio Configuration
In hassio you must specify modbus registry to read
important params are:

My configuration:

  • configuration.yaml
modbus:
  name: waveshare1
  type: rtuovertcp
  host: _my_waveshare_ip_number_
  port: 8888
sensor modbus: !include configs/modbus_sensor.yaml
  • configs/modbus_sensor.yaml
- platform: modbus
  registers:
    - name: sdm630_phase_1_line_to_neutral_volts
      hub: waveshare1
      slave: 1
      register: 0
      register_type: input
      count: 2
      precision: 2
      data_type: float
      unit_of_measurement: V
      device_class: voltage

    - name: sdm630_phase_2_line_to_neutral_volts
      hub: waveshare1
      slave: 1
      register: 2
      register_type: input
      count: 2
      precision: 2
      data_type: float
      unit_of_measurement: V
      device_class: voltage

    - name: sdm630_phase_3_line_to_neutral_volts
      hub: waveshare1
      slave: 1
      register: 4
      register_type: input
      count: 2
      precision: 2
      data_type: float
      unit_of_measurement: V
      device_class: voltage

    - name: sdm630_phase_1_current
      hub: waveshare1
      register: 6
      register_type: input
      count: 2
      slave: 1
      precision: 3
      data_type: float
      unit_of_measurement: A
      device_class: current

    - name: sdm630_phase_2_current
      hub: waveshare1
      register: 8
      register_type: input
      count: 2
      slave: 1
      precision: 3
      data_type: float
      unit_of_measurement: A
      device_class: current

    - name: sdm630_phase_3_current
      hub: waveshare1
      register: 10
      register_type: input
      count: 2
      slave: 1
      precision: 3
      data_type: float
      unit_of_measurement: A
      device_class: current

    - name: sdm630_phase_1_power
      hub: waveshare1
      register: 12
      register_type: input
      count: 2
      slave: 1
      precision: 3
      scale: 0.001
      data_type: float
      unit_of_measurement: kW
      device_class: power

    - name: sdm630_phase_2_power
      hub: waveshare1
      register: 14
      register_type: input
      count: 2
      slave: 1
      precision: 3
      scale: 0.001
      data_type: float
      unit_of_measurement: kW
      device_class: power

    - name: sdm630_phase_3_power
      hub: waveshare1
      register: 16
      register_type: input
      count: 2
      slave: 1
      precision: 3
      scale: 0.001
      data_type: float
      unit_of_measurement: kW
      device_class: power

    - name: sdm630_phase_1_va
      hub: waveshare1
      register: 18
      register_type: input
      count: 2
      slave: 1
      precision: 2
      data_type: float
      unit_of_measurement: VA
      device_class: power

    - name: sdm630_phase_2_va
      hub: waveshare1
      register: 20
      register_type: input
      count: 2
      slave: 1
      precision: 2
      data_type: float
      unit_of_measurement: VA
      device_class: power

    - name: sdm630_phase_3_va
      hub: waveshare1
      register: 22
      register_type: input
      count: 2
      slave: 1
      precision: 2
      data_type: float
      unit_of_measurement: VA
      device_class: power

    - name: sdm630_phase_1_va_reactive
      hub: waveshare1
      register: 24
      register_type: input
      count: 2
      slave: 1
      precision: 2
      data_type: float
      unit_of_measurement: VAr
      device_class: power

    - name: sdm630_phase_2_va_reactive
      hub: waveshare1
      register: 26
      register_type: input
      count: 2
      slave: 1
      precision: 2
      data_type: float
      unit_of_measurement: VAr
      device_class: power

    - name: sdm630_phase_3_va_reactive
      hub: waveshare1
      register: 28
      register_type: input
      count: 2
      slave: 1
      precision: 2
      data_type: float
      unit_of_measurement: VAr
      device_class: power

    - name: sdm630_sum_of_line_currents
      hub: waveshare1
      register: 48
      register_type: input
      count: 2
      slave: 1
      precision: 3
      data_type: float
      unit_of_measurement: A
      device_class: current

    - name: sdm630_total_system_power
      hub: waveshare1
      register: 52
      register_type: input
      count: 2
      slave: 1
      precision: 3
      scale: 0.001
      data_type: float
      unit_of_measurement: kW
      device_class: power

    - name: sdm630_total_system_va
      hub: waveshare1
      register: 56
      register_type: input
      count: 2
      slave: 1
      precision: 2
      data_type: float
      unit_of_measurement: VA
      device_class: power

    - name: sdm630_total_system_var
      hub: waveshare1
      register: 60
      register_type: input
      count: 2
      slave: 1
      precision: 2
      data_type: float
      unit_of_measurement: VAr
      device_class: power

    - name: sdm630_frequency_of_supply_voltages
      hub: waveshare1
      register: 70
      register_type: input
      count: 2
      slave: 1
      precision: 2
      data_type: float
      unit_of_measurement: Hz

    - name: sdm630_import_wh_since_last_reset
      hub: waveshare1
      register: 72
      register_type: input
      count: 2
      slave: 1
      precision: 2
      data_type: float
      unit_of_measurement: kWh
      device_class: energy

    - name: sdm630_export_wh_since_last_reset
      hub: waveshare1
      register: 74
      register_type: input
      count: 2
      slave: 1
      precision: 2
      data_type: float
      unit_of_measurement: kWh
      device_class: energy

    - name: sdm630_maximum_total_system_power
      hub: waveshare1
      register: 86
      register_type: input
      count: 2
      slave: 1
      precision: 2
      data_type: float
      unit_of_measurement: W
      device_class: power

    - name: sdm630_total_system_va_demand
      hub: waveshare1
      register: 100
      register_type: input
      count: 2
      slave: 1
      precision: 2
      data_type: float
      unit_of_measurement: VA
      device_class: power

    - name: sdm630_maximum_total_system_va_demand
      hub: waveshare1
      register: 102
      register_type: input
      count: 2
      slave: 1
      precision: 2
      data_type: float
      unit_of_measurement: VA
      device_class: power

    - name: sdm630_line_1_to_line_2_volts
      hub: waveshare1
      register: 200
      register_type: input
      count: 2
      slave: 1
      precision: 2
      data_type: float
      unit_of_measurement: V
      device_class: voltage

    - name: sdm630_line_2_to_line_3_volts
      hub: waveshare1
      register: 202
      register_type: input
      count: 2
      slave: 1
      precision: 2
      data_type: float
      unit_of_measurement: V
      device_class: voltage

    - name: sdm630_line_3_to_line_1_volts
      hub: waveshare1
      register: 204
      register_type: input
      count: 2
      slave: 1
      precision: 2
      data_type: float
      unit_of_measurement: V
      device_class: voltage
1 Like

Great to see!

Just a small heads-up. HomeWizard (a dutch company) has made a Wi-Fi variant of this energymeter. Currently they are developing an open API so you can hook it into HASS.

1 Like

Shelly 3EM is a little bit cheaper.

Nice job! It also works with a cheap USB to RS485 Converter Adapter. Pass through the COM port from ESXi to the docker VM and attached to the HA container :slight_smile:

I also got a Protoss PE11 RS485 to ETH which also can run als a TCP server but need to test that one well.

any simple way to connect this to new OS?

is it possible to connect two modbus channels on HASS os?

Hi. Any update from HomeWizard (or any other) on the open API? I just installed the Eastron SDM630 wifi version into my electricity room. Would like to connect to the Home Assistant. Best regards, Ton.

@pascalsaul Where I can see a guide to make the SDM’s work with the USB ro RS485 Converters? Using Modbus RTU protocol It’s has a great advantage for long distances and reliability. Before order everything, I would like to know If it will work well.

Since last Friday, the API is released and can be enabled from the HomeWizard Energy app.

don’t know… I will prefer to use the some modbus with more devices with separate key.
In my opinion you have to add more modbus devices into hassio…

could you share a link? thanks in advance

I have properly working SDM 630 v2 like this SDM630 Modbus V2 MID, wielofunkcyjny analizator mocy, 1p2w 3p3w 3p4w, modbus/wyjście impulsowe port RS485, dostępny system fotowoltaiczny solarny|power analyser|port rs485system solar - AliExpress
with this converter (RTU → TCP) USR-W610 SSL like this USR W610 SSL HTTPS szeregowy RS232 RS485 na RJ45 Ethernet WiFi konwerter bezprzewodowy serwer konwerter wbudowany serwer www|Building Automation| - AliExpress

(PS. But i dont why for me sdm630 dont work via Waveshare RS485 to eth. I try 2 days with diffrent configuration without luck)

Example my yaml

modbus:
- type: tcp
  name: sdm630
  #type: rtuovertcp
  host: 192.168.1.5
  port: 8899
  sensors:
    - name: sdm630_total_active_energy
      address: 342
      input_type: input
      count: 2
      slave: 1
      precision: 2
      data_type: float
      unit_of_measurement: kWh
      device_class: energy

    - name: sdm630_phase_1_line_to_neutral_volts
      slave: 1
      address: 0
      input_type: input
      count: 2
      precision: 2
      data_type: float
      unit_of_measurement: V
      device_class: voltage

Is it still working for you? Which firmware version of waveshare do you have?

I’ve got a SDM630 v2 Modbus, a Waveshare RS485/ETH connector and can use my Modbus manual via Perl scripts.

But using Home Assistant I get shitty values all the time. Using “rtuovertcp” I don’t get any values … using “tcp” I get random values

2021-10-27 17:05:08 ERROR (SyncWorker_3) [homeassistant.components.modbus.modbus] Pymodbus: modbus-gateway: Modbus Error: [Input/Output] No Response received from the remote unit/Unable to decode response

Thanks for any help!

I get this in the logs

2022-04-03 15:10:14 WARNING (MainThread) [homeassistant.components.modbus.validators] sdm630_phase_1_line_to_neutral_volts  with float is not valid, trying to convert
2022-04-03 15:10:14 WARNING (MainThread) [homeassistant.components.modbus.validators] sdm630_phase_1_current  with float is not valid, trying to convert
2022-04-03 15:10:14 WARNING (MainThread) [homeassistant.components.modbus.validators] sdm630_phase_1_power  with float is not valid, trying to convert
2022-04-03 15:10:14 WARNING (MainThread) [homeassistant.components.modbus.validators] sdm630_phase_1_va  with float is not valid, trying to convert
2022-04-03 15:10:14 WARNING (MainThread) [homeassistant.components.modbus.validators] sdm630_phase_1_va_reactive  with float is not valid, trying to convert
2022-04-03 15:10:14 WARNING (MainThread) [homeassistant.components.modbus.validators] sdm630_sum_of_line_currents  with float is not valid, trying to convert
2022-04-03 15:10:14 WARNING (MainThread) [homeassistant.components.modbus.validators] sdm630_total_system_power  with float is not valid, trying to convert
2022-04-03 15:10:14 WARNING (MainThread) [homeassistant.components.modbus.validators] sdm630_total_system_va  with float is not valid, trying to convert
2022-04-03 15:10:14 WARNING (MainThread) [homeassistant.components.modbus.validators] sdm630_total_system_var  with float is not valid, trying to convert
2022-04-03 15:10:14 WARNING (MainThread) [homeassistant.components.modbus.validators] sdm630_frequency_of_supply_voltages  with float is not valid, trying to convert
2022-04-03 15:10:14 WARNING (MainThread) [homeassistant.components.modbus.validators] sdm630_import_wh_since_last_reset  with float is not valid, trying to convert
2022-04-03 15:10:14 WARNING (MainThread) [homeassistant.components.modbus.validators] sdm630_export_wh_since_last_reset  with float is not valid, trying to convert
2022-04-03 15:10:14 WARNING (MainThread) [homeassistant.components.modbus.validators] sdm630_maximum_total_system_power  with float is not valid, trying to convert
2022-04-03 15:10:14 WARNING (MainThread) [homeassistant.components.modbus.validators] sdm630_total_system_va_demand  with float is not valid, trying to convert
2022-04-03 15:10:14 WARNING (MainThread) [homeassistant.components.modbus.validators] sdm630_maximum_total_system_va_demand  with float is not valid, trying to convert
2022-04-03 15:10:14 WARNING (MainThread) [homeassistant.components.modbus.validators] sdm630_line_1_to_line_2_volts  with float is not valid, trying to convert
2022-04-03 15:10:14 WARNING (MainThread) [homeassistant.components.modbus.validators] sdm630_line_2_to_line_3_volts  with float is not valid, trying to convert
2022-04-03 15:10:14 WARNING (MainThread) [homeassistant.components.modbus.validators] sdm630_line_3_to_line_1_volts  with float is not valid, trying to convert
2022-04-03 15:10:14 WARNING (MainThread) [homeassistant.components.modbus.validators] sdm630_phase_1_line_to_neutral_volts  with float is not valid, trying to convert

Fixed, use float32

data_type: float32

Hi all. Did you have any new FW to this SDM630 Modbus V2 to update ?

This solution is not working for me… I Always get the error:

[homeassistant.components.modbus.modbus] modbus waveshare1 communication closed

is there any solution for this issue?

Hi All,

I’ve also used the SDM630 for energy metering. Due to changes in HA, the configuration is now a bit different, and I made some hardware choices that work out quite well for me. This thread has been very helpful, and I wanted to return the favor by posting my working config here. I hope this is useful.

Hardware

I’ve studied electrical engineering, and I did the full electrical installation of my house. To me, the breaker box is no playground for hobby projects. Any mishaps here will cause serious issues and even fire. If something were to happen, even caused by something completely different, I do not want to have this discussion with my insurance. In effect that means that I run signal wires as short as possible and properly insulated inside the breaker box. All electronics goes outside the box, in another box.

I’m using 2 SDM630 V2s (and I will add a third later on). The RS485 is connected to both in parallel. I did not use any terminator resistors. Short wire runs and low bit rates will not require this. For this I used 0,5mm2 flexible wire that I twisted myself. You can go smaller, but that’s easy to damage and the insulation is not rated for voltages used inside the breaker box. This felt pretty sturdy and the insulation is also rated for high voltage.

One of the first things that needed to be done is to configure the SDM630 Modbus addresses. This can be anything between 1 and 247. Each device needs a unique address. I choose 100 and 101. By default this is 1. The chosen address is referred to as ‘slave’ in the modbus configuration. (or at least until some woke movement tries to cancel modbus). You’d also need to make sure that serial settings are good. I used the default setting: 9600,N,1. This needs to be matched by the RS485 to Ethernet bridge. I chose this, because the amount of data is small and slower is more reliable, especially since I’m not using terminator resistors on the RS485 bus.

As RS485 to Ethernet bridge I used this:

I have a POE enabled switch, so to power it I used a POE Splitter (I’ve used the 5V DC version, but 12V DC would also be OK):

The splitter was mutulated a bit in the proces, the alternative being a whole bunch of connectors, wires and screw terminals.

Both combined look like this:

Both are mounted in an ABS box (130h x 80w x 70d) outside the breaker box.

RS485 to Ethernet Config
For the RS485 to Ethernet bridge I was strugling with getting the software properly installed and working. Then, I noticed that the unit had a pretty good Web interface. So, there is no need to install any software to configure this. Out of the box, this device used DHCP and it got an IP address. Perfect for me. I have a separate DHCP enabled (with 10 year leases) IoT VLAN for these devices and HA.

Here are my serial port settings:

Here are my communication settings:

Home Assistant Config

I’ve moved modbus stuff to a separate file. To do that I added this to my configuration.yaml:

modbus: !include modbus.yaml

Here’s my modbus.yaml:
Please note that is contains everything twice (a and b) since I have 2 SDM630 V2’s connected.

  - name: ee11_01
    type: rtuovertcp
    host: 192.168.1.231
    port: 8888
    sensors:
      - name: sdm630a_phase_1_line_to_neutral_volts
        slave: 100
        address: 0
        input_type: input
        count: 2
        precision: 2
        data_type: float32
        unit_of_measurement: V
        device_class: voltage
        unique_id: e4fd23fe-18be-4c60-b8e8-bf44640f12ff
  
      - name: sdm630a_phase_2_line_to_neutral_volts
        slave: 100
        address: 2
        input_type: input
        count: 2
        precision: 2
        data_type: float32
        unit_of_measurement: V
        device_class: voltage
        unique_id: be929394-9daf-4f27-8c36-1ad79de68897
  
      - name: sdm630a_phase_3_line_to_neutral_volts
        slave: 100
        address: 4
        input_type: input
        count: 2
        precision: 2
        data_type: float32
        unit_of_measurement: V
        device_class: voltage
        unique_id: 73218700-b043-4ac2-b96f-ab133c328e21
  
      - name: sdm630a_phase_1_current
        address: 6
        input_type: input
        count: 2
        slave: 100
        precision: 3
        data_type: float32
        unit_of_measurement: A
        device_class: current
        unique_id: dc439a69-1f82-4b83-9e4c-a2cb63375af6
  
      - name: sdm630a_phase_2_current
        address: 8
        input_type: input
        count: 2
        slave: 100
        precision: 3
        data_type: float32
        unit_of_measurement: A
        device_class: current
        unique_id: 298c2d37-19d9-4962-9149-9672dfb123c5
  
      - name: sdm630a_phase_3_current
        address: 10
        input_type: input
        count: 2
        slave: 100
        precision: 3
        data_type: float32
        unit_of_measurement: A
        device_class: current
        unique_id: 77b8bcf4-1357-4295-8ac9-5818ec37dfbe
  
      - name: sdm630a_phase_1_power
        address: 12
        input_type: input
        count: 2
        slave: 100
        precision: 3
        scale: 0.001
        data_type: float32
        unit_of_measurement: kW
        device_class: power
        unique_id: 7d80e94e-38bd-45a4-be50-8649e1838d7b
  
      - name: sdm630a_phase_2_power
        address: 14
        input_type: input
        count: 2
        slave: 100
        precision: 3
        scale: 0.001
        data_type: float32
        unit_of_measurement: kW
        device_class: power
        unique_id: fe80f571-bd1d-4693-a40d-e360ef73456b
  
      - name: sdm630a_phase_3_power
        address: 16
        input_type: input
        count: 2
        slave: 100
        precision: 3
        scale: 0.001
        data_type: float32
        unit_of_measurement: kW
        device_class: power
        unique_id: 7795d348-0d1a-44f6-bc5e-b0fa5e7a7822
  
      - name: sdm630a_phase_1_va
        address: 18
        input_type: input
        count: 2
        slave: 100
        precision: 2
        data_type: float32
        unit_of_measurement: VA
        device_class: power
        unique_id: f310d44e-5a7e-48c2-9e82-82b7828e85fa
  
      - name: sdm630a_phase_2_va
        address: 20
        input_type: input
        count: 2
        slave: 100
        precision: 2
        data_type: float32
        unit_of_measurement: VA
        device_class: power
        unique_id: 333c7e75-0262-4e78-a5f5-3cc821969293
  
      - name: sdm630a_phase_3_va
        address: 22
        input_type: input
        count: 2
        slave: 100
        precision: 2
        data_type: float32
        unit_of_measurement: VA
        device_class: power
        unique_id: 39bb632d-d53f-4f39-a564-b59ade16b2e2
  
      - name: sdm630a_phase_1_va_reactive
        address: 24
        input_type: input
        count: 2
        slave: 100
        precision: 2
        data_type: float32
        unit_of_measurement: VAr
        device_class: power
        unique_id: f49cfa48-ca0a-4820-81ee-de82c04e5538
  
      - name: sdm630a_phase_2_va_reactive
        address: 26
        input_type: input
        count: 2
        slave: 100
        precision: 2
        data_type: float32
        unit_of_measurement: VAr
        device_class: power
        unique_id: 0f591919-8ff0-4912-8985-7040e7e6e396
  
      - name: sdm630a_phase_3_va_reactive
        address: 28
        input_type: input
        count: 2
        slave: 100
        precision: 2
        data_type: float32
        unit_of_measurement: VAr
        device_class: power
        unique_id: b777921f-e0bf-42f0-b7c5-0063d1d1f998
  
      - name: sdm630a_sum_of_line_currents
        address: 48
        input_type: input
        count: 2
        slave: 100
        precision: 3
        data_type: float32
        unit_of_measurement: A
        device_class: current
        unique_id: 674429d5-41b1-4665-9359-823c9e96c4db
  
      - name: sdm630a_total_system_power
        address: 52
        input_type: input
        count: 2
        slave: 100
        precision: 3
        scale: 0.001
        data_type: float32
        unit_of_measurement: kW
        device_class: power
        unique_id: a2da5638-1830-413e-a3ae-0c2c0d8774f0
  
      - name: sdm630a_total_system_va
        address: 56
        input_type: input
        count: 2
        slave: 100
        precision: 2
        data_type: float32
        unit_of_measurement: VA
        device_class: power
        unique_id: 0335b258-7159-4bd1-ab88-0a05b3834070
  
      - name: sdm630a_total_system_var
        address: 60
        input_type: input
        count: 2
        slave: 100
        precision: 2
        data_type: float32
        unit_of_measurement: VAr
        device_class: power
        unique_id: b9debc67-9de3-4466-91f0-d3e152b7187c
  
      - name: sdm630a_frequency_of_supply_voltages
        address: 70
        input_type: input
        count: 2
        slave: 100
        precision: 2
        data_type: float32
        unit_of_measurement: Hz
        unique_id: 53bac3c5-26b0-4288-9640-96724371eb52
  
      - name: sdm630a_import_wh_since_last_reset
        address: 72
        input_type: input
        count: 2
        slave: 100
        precision: 2
        data_type: float32
        unit_of_measurement: kWh
        device_class: energy
        unique_id: 0984ddfc-e9c2-4830-b283-ecedc9e43c8a
  
      - name: sdm630a_export_wh_since_last_reset
        address: 74
        input_type: input
        count: 2
        slave: 100
        precision: 2
        data_type: float32
        unit_of_measurement: kWh
        device_class: energy
        unique_id: 34114a81-c69b-4300-a5b5-589c741fc9d6
  
      - name: sdm630a_maximum_total_system_power
        address: 86
        input_type: input
        count: 2
        slave: 100
        precision: 2
        data_type: float32
        unit_of_measurement: W
        device_class: power
        unique_id: 5303d79d-cb54-46cd-b443-fd977eac3c0e
  
      - name: sdm630a_total_system_va_demand
        address: 100
        input_type: input
        count: 2
        slave: 100
        precision: 2
        data_type: float32
        unit_of_measurement: VA
        device_class: power
        unique_id: 2947dec8-b49a-4837-ac7c-bab1e5c27f97
  
      - name: sdm630a_maximum_total_system_va_demand
        address: 102
        input_type: input
        count: 2
        slave: 100
        precision: 2
        data_type: float32
        unit_of_measurement: VA
        device_class: power
        unique_id: ad06d5b4-fed8-4785-9b02-b0b80d7a0fd7
  
      - name: sdm630a_line_1_to_line_2_volts
        address: 200
        input_type: input
        count: 2
        slave: 100
        precision: 2
        data_type: float32
        unit_of_measurement: V
        device_class: voltage
        unique_id: 3037dfee-5840-4249-89f2-17387cdacbec
  
      - name: sdm630a_line_2_to_line_3_volts
        address: 202
        input_type: input
        count: 2
        slave: 100
        precision: 2
        data_type: float32
        unit_of_measurement: V
        device_class: voltage
        unique_id: 108f656a-f3da-4f93-956a-5cfbe58d6c04
  
      - name: sdm630a_line_3_to_line_1_volts
        address: 204
        input_type: input
        count: 2
        slave: 100
        precision: 2
        data_type: float32
        unit_of_measurement: V
        device_class: voltage
        unique_id: e3ab3d23-010f-4266-ad53-5340e173fb0e
  
      - name: sdm630b_phase_1_line_to_neutral_volts
        slave: 101
        address: 0
        input_type: input
        count: 2
        precision: 2
        data_type: float32
        unit_of_measurement: V
        device_class: voltage
        unique_id: 41338dee-5a63-4b13-b990-1f8ec421587e
  
      - name: sdm630b_phase_2_line_to_neutral_volts
        slave: 101
        address: 2
        input_type: input
        count: 2
        precision: 2
        data_type: float32
        unit_of_measurement: V
        device_class: voltage
        unique_id: 190f6827-5dcc-4541-b04f-02c588180550
  
      - name: sdm630b_phase_3_line_to_neutral_volts
        slave: 101
        address: 4
        input_type: input
        count: 2
        precision: 2
        data_type: float32
        unit_of_measurement: V
        device_class: voltage
        unique_id: 41a61c53-70fb-427a-8825-5ef2e7a9f870
  
      - name: sdm630b_phase_1_current
        address: 6
        input_type: input
        count: 2
        slave: 101
        precision: 3
        data_type: float32
        unit_of_measurement: A
        device_class: current
        unique_id: 099e1898-d17e-4197-8a03-f10167a5ce32
  
      - name: sdm630b_phase_2_current
        address: 8
        input_type: input
        count: 2
        slave: 101
        precision: 3
        data_type: float32
        unit_of_measurement: A
        device_class: current
        unique_id: 29fe4b01-9b3e-4b32-8f5f-6ff83043aeee
  
      - name: sdm630b_phase_3_current
        address: 10
        input_type: input
        count: 2
        slave: 101
        precision: 3
        data_type: float32
        unit_of_measurement: A
        device_class: current
        unique_id: 95bc8f36-fa83-42a0-bdfd-8f75b6527f21
  
      - name: sdm630b_phase_1_power
        address: 12
        input_type: input
        count: 2
        slave: 101
        precision: 3
        scale: 0.001
        data_type: float32
        unit_of_measurement: kW
        device_class: power
        unique_id: d303eb15-7b5d-4e97-a823-a90d7808de13
  
      - name: sdm630b_phase_2_power
        address: 14
        input_type: input
        count: 2
        slave: 101
        precision: 3
        scale: 0.001
        data_type: float32
        unit_of_measurement: kW
        device_class: power
        unique_id: a20029bd-6d08-4c23-bcbb-a61b8ca651dc
  
      - name: sdm630b_phase_3_power
        address: 16
        input_type: input
        count: 2
        slave: 101
        precision: 3
        scale: 0.001
        data_type: float32
        unit_of_measurement: kW
        device_class: power
        unique_id: 16813684-9811-4e2a-90d1-d740296e2f2d
  
      - name: sdm630b_phase_1_va
        address: 18
        input_type: input
        count: 2
        slave: 101
        precision: 2
        data_type: float32
        unit_of_measurement: VA
        device_class: power
        unique_id: cdf51917-5898-4ba1-ba28-bfcc027f9449
  
      - name: sdm630b_phase_2_va
        address: 20
        input_type: input
        count: 2
        slave: 101
        precision: 2
        data_type: float32
        unit_of_measurement: VA
        device_class: power
        unique_id: 06f1fe8b-8a6f-4f19-9bff-369d3f2fefc4
  
      - name: sdm630b_phase_3_va
        address: 22
        input_type: input
        count: 2
        slave: 101
        precision: 2
        data_type: float32
        unit_of_measurement: VA
        device_class: power
        unique_id: ae569e48-0a29-461d-af69-5ec1ed91c9a6
  
      - name: sdm630b_phase_1_va_reactive
        address: 24
        input_type: input
        count: 2
        slave: 101
        precision: 2
        data_type: float32
        unit_of_measurement: VAr
        device_class: power
        unique_id: fd2e9e2b-8793-4370-a0be-783b3a3be1b0
  
      - name: sdm630b_phase_2_va_reactive
        address: 26
        input_type: input
        count: 2
        slave: 101
        precision: 2
        data_type: float32
        unit_of_measurement: VAr
        device_class: power
        unique_id: 3e1630b4-82e0-40fc-b6f5-bc3d4838d207
  
      - name: sdm630b_phase_3_va_reactive
        address: 28
        input_type: input
        count: 2
        slave: 101
        precision: 2
        data_type: float32
        unit_of_measurement: VAr
        device_class: power
        unique_id: 8e74583b-7e1d-4def-976f-c75ca0a3c0cc
  
      - name: sdm630b_sum_of_line_currents
        address: 48
        input_type: input
        count: 2
        slave: 101
        precision: 3
        data_type: float32
        unit_of_measurement: A
        device_class: current
        unique_id: 245b641b-74e7-4c33-924e-d061a52e1264
  
      - name: sdm630b_total_system_power
        address: 52
        input_type: input
        count: 2
        slave: 101
        precision: 3
        scale: 0.001
        data_type: float32
        unit_of_measurement: kW
        device_class: power
        unique_id: 07509e1e-6bfe-483b-b246-d337e81e1672
  
      - name: sdm630b_total_system_va
        address: 56
        input_type: input
        count: 2
        slave: 101
        precision: 2
        data_type: float32
        unit_of_measurement: VA
        device_class: power
        unique_id: eb38bf21-fd05-46a0-b828-9ecc13e0b6e0
  
      - name: sdm630b_total_system_var
        address: 60
        input_type: input
        count: 2
        slave: 101
        precision: 2
        data_type: float32
        unit_of_measurement: VAr
        device_class: power
        unique_id: 780c1d8f-e93f-4938-b546-43973d1eb0aa
  
      - name: sdm630b_frequency_of_supply_voltages
        address: 70
        input_type: input
        count: 2
        slave: 101
        precision: 2
        data_type: float32
        unit_of_measurement: Hz
        unique_id: 273bc377-c3ae-4ae9-afeb-0a5dbad68304
  
      - name: sdm630b_import_wh_since_last_reset
        address: 72
        input_type: input
        count: 2
        slave: 101
        precision: 2
        data_type: float32
        unit_of_measurement: kWh
        device_class: energy
        unique_id: 18989ead-0d41-4708-819f-785ebadb93fd
  
      - name: sdm630b_export_wh_since_last_reset
        address: 74
        input_type: input
        count: 2
        slave: 101
        precision: 2
        data_type: float32
        unit_of_measurement: kWh
        device_class: energy
        unique_id: 16aa8fc9-6005-4929-8375-a00de2f2fa68
  
      - name: sdm630b_maximum_total_system_power
        address: 86
        input_type: input
        count: 2
        slave: 101
        precision: 2
        data_type: float32
        unit_of_measurement: W
        device_class: power
        unique_id: 556799c2-1502-4b7d-a7c9-9a7eb531757a
  
      - name: sdm630b_total_system_va_demand
        address: 100
        input_type: input
        count: 2
        slave: 101
        precision: 2
        data_type: float32
        unit_of_measurement: VA
        device_class: power
        unique_id: 49806eef-c948-41f2-b92c-17473d74a027
  
      - name: sdm630b_maximum_total_system_va_demand
        address: 102
        input_type: input
        count: 2
        slave: 101
        precision: 2
        data_type: float32
        unit_of_measurement: VA
        device_class: power
        unique_id: bc97dcee-02e1-4240-8309-9ccc06b63b32
  
      - name: sdm630b_line_1_to_line_2_volts
        address: 200
        input_type: input
        count: 2
        slave: 101
        precision: 2
        data_type: float32
        unit_of_measurement: V
        device_class: voltage
        unique_id: fda56590-59b4-44c6-81fc-e1f4724b8dcd
  
      - name: sdm630b_line_2_to_line_3_volts
        address: 202
        input_type: input
        count: 2
        slave: 101
        precision: 2
        data_type: float32
        unit_of_measurement: V
        device_class: voltage
        unique_id: c7aa801b-3821-4bb5-9783-ed24ad3fdd7e
  
      - name: sdm630b_line_3_to_line_1_volts
        address: 204
        input_type: input
        count: 2
        slave: 101
        precision: 2
        data_type: float32
        unit_of_measurement: V
        device_class: voltage
        unique_id: 2730820b-7207-4cbf-8474-8b484390750b

The use of unique ID’s allowed me to set area’s and change names in the UI. I’ve used an online GUID generator to make these.

I also needed to have a couple of customizations to make stuff work in the energy panel, here’s my customize.yaml:

sensor.sdm630a_import_wh_since_last_reset:
  state_class: total_increasing
  
sensor.sdm630a_export_wh_since_last_reset:
  state_class: total_increasing

sensor.sdm630b_import_wh_since_last_reset:
  state_class: total_increasing
  
sensor.sdm630b_export_wh_since_last_reset:
  state_class: total_increasing

To be complete, customizations.yaml is a separate file. In the configuration.yaml this needs to be there:

homeassistant:
  customize: !include customize.yaml
3 Likes

@jghek this will work with SDM630 V2?

Yes. I have 2 V2’s connected. Here is a picture of one:

I’ve also changed my initial post. Thanks!