Modbus with SDM630 v2 energy meter

I converted the configuration from here Energy metering with Eastron SDM630 v2 Modbus - Share your Projects! - Home Assistant Community (home-assistant.io) (thanks for posting :slight_smile: ) to the new style

So I’ve following working configuration in my configuration file:

# modbus communication
modbus:
  - name: "sdm630_laadpaal"
    close_comm_on_error: true
    delay: 5
    type: rtuovertcp
    host: xxx.xxx.xxx.xxx
    port: 502
# outsourced yaml not working?
#    sensors: !include_dir_merge_named  configuration/devices/sensors/modbus.yaml
    sensors:
      - 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
        scan_interval: 30
      - name: sdm630_phase_1_current
        slave: 1
        address: 6
        input_type: input
        count: 2
        precision: 2
        data_type: float
        unit_of_measurement: A
        device_class: current
        scan_interval: 30
      - name: sdm630_phase_1_power
        slave: 1
        address: 12
        input_type: input
        count: 2
        precision: 3
        data_type: float
        unit_of_measurement: kW
        device_class: power
      - name: sdm630_phase_1_va
        slave: 1
        address: 18
        input_type: input
        count: 2
        precision: 2
        data_type: float
        unit_of_measurement: VA
        device_class: power
      - name: sdm630_phase_1_va_reactive
        slave: 1
        address: 24
        input_type: input
        count: 2
        precision: 2
        data_type: float
        unit_of_measurement: VAr
        device_class: power
      - name: sdm630_sum_of_line_currents
        slave: 1
        address: 48
        input_type: input
        count: 2
        precision: 3
        data_type: float
        unit_of_measurement: A
        device_class: current
      - name: sdm630_total_system_power
        slave: 1
        address: 52
        input_type: input
        count: 2
        precision: 3
        scale: 0.001
        data_type: float
        unit_of_measurement: kW
        device_class: power
      - name: sdm630_total_system_va
        slave: 1
        address: 56
        input_type: input
        count: 2
        precision: 2
        data_type: float
        unit_of_measurement: VA
        device_class: power
      - name: sdm630_total_system_var
        slave: 1
        address: 60
        input_type: input
        count: 2
        precision: 2
        data_type: float
        unit_of_measurement: VAr
        device_class: power
      - name: sdm630_frequency_of_supply_voltages
        slave: 1
        address: 70
        input_type: input
        count: 2
        precision: 2
        data_type: float
        unit_of_measurement: Hz
      - name: sdm630_import_wh_since_last_reset
        slave: 1  
        address: 72
        input_type: input
        count: 2
        precision: 2
        data_type: float
        unit_of_measurement: kWh
        device_class: energy
      - name: sdm630_export_wh_since_last_reset
        slave: 1
        address: 74
        input_type: input
        count: 2
        precision: 2
        data_type: float
        unit_of_measurement: kWh
        device_class: energy
      - name: sdm630_maximum_total_system_power
        slave: 1
        address: 86
        input_type: input
        count: 2
        precision: 2
        data_type: float
        unit_of_measurement: W
        device_class: power
      - name: sdm630_total_system_va_demand
        slave: 1
        address: 100
        input_type: input
        count: 2
        precision: 2
        data_type: float
        unit_of_measurement: VA
        device_class: power
      - name: sdm630_maximum_total_system_va_demand
        slave: 1
        address: 102
        input_type: input
        count: 2
        precision: 2
        data_type: float
        unit_of_measurement: VA
        device_class: power
      - name: sdm630_line_1_to_line_2_volts
        slave: 1
        address: 200
        input_type: input
        count: 2
        precision: 2
        data_type: float
        unit_of_measurement: V
        device_class: voltage
      - name: sdm630_line_2_to_line_3_volts
        slave: 1
        address: 202
        input_type: input
        count: 2
        precision: 2
        data_type: float
        unit_of_measurement: V
        device_class: voltage
      - name: sdm630_line_3_to_line_1_volts
        slave: 1
        address: 204
        input_type: input
        count: 2
        precision: 2
        data_type: float
        unit_of_measurement: V
        device_class: voltage

But normally I’m working with outsourced configuration files

# modbus communication
modbus:
  - name: "sdm630_laadpaal"
    close_comm_on_error: true
    delay: 5
    type: rtuovertcp
    host: 192.168.50.16
    port: 502
    sensors: !include_dir_merge_named  configuration/devices/sensors/modbus.yaml

My modbus.yaml configuration file:

# definition of the SDM630 Modbus V2 energy meter laadpaal
- platform: modbus
  sensors:
    - 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
      scan_interval: 30
    - name: sdm630_phase_1_current
      slave: 1
      address: 6
      input_type: input
      count: 2
      precision: 2
      data_type: float
      unit_of_measurement: A
      device_class: current
      scan_interval: 30
    - name: sdm630_phase_1_power
      slave: 1
      address: 12
      input_type: input
      count: 2
      precision: 3
      data_type: float
      unit_of_measurement: kW
      device_class: power
    - name: sdm630_phase_1_va
      slave: 1
      address: 18
      input_type: input
      count: 2
      precision: 2
      data_type: float
      unit_of_measurement: VA
      device_class: power
    - name: sdm630_phase_1_va_reactive
      slave: 1
      address: 24
      input_type: input
      count: 2
      precision: 2
      data_type: float
      unit_of_measurement: VAr
      device_class: power
    - name: sdm630_sum_of_line_currents
      slave: 1
      address: 48
      input_type: input
      count: 2
      precision: 3
      data_type: float
      unit_of_measurement: A
      device_class: current
    - name: sdm630_total_system_power
      slave: 1
      address: 52
      input_type: input
      count: 2
      precision: 3
      scale: 0.001
      data_type: float
      unit_of_measurement: kW
      device_class: power
    - name: sdm630_total_system_va
      slave: 1
      address: 56
      input_type: input
      count: 2
      precision: 2
      data_type: float
      unit_of_measurement: VA
      device_class: power
    - name: sdm630_total_system_var
      slave: 1
      address: 60
      input_type: input
      count: 2
      precision: 2
      data_type: float
      unit_of_measurement: VAr
      device_class: power
    - name: sdm630_frequency_of_supply_voltages
      slave: 1
      address: 70
      input_type: input
      count: 2
      precision: 2
      data_type: float
      unit_of_measurement: Hz
    - name: sdm630_import_wh_since_last_reset
      slave: 1
      address: 72
      input_type: input
      count: 2
      precision: 2
      data_type: float
      unit_of_measurement: kWh
      device_class: energy
    - name: sdm630_export_wh_since_last_reset
      slave: 1
      address: 74
      input_type: input
      count: 2
      precision: 2
      data_type: float
      unit_of_measurement: kWh
      device_class: energy
    - name: sdm630_maximum_total_system_power
      slave: 1
      address: 86
      input_type: input
      count: 2
      precision: 2
      data_type: float
      unit_of_measurement: W
      device_class: power
    - name: sdm630_total_system_va_demand
      slave: 1
      address: 100
      input_type: input
      count: 2
      precision: 2
      data_type: float
      unit_of_measurement: VA
      device_class: power
    - name: sdm630_maximum_total_system_va_demand
      slave: 1
      address: 102
      input_type: input
      count: 2
      precision: 2
      data_type: float
      unit_of_measurement: VA
      device_class: power
    - name: sdm630_line_1_to_line_2_volts
      slave: 1
      address: 200
      input_type: input
      count: 2
      precision: 2
      data_type: float
      unit_of_measurement: V
      device_class: voltage
    - name: sdm630_line_2_to_line_3_volts
      slave: 1
      address: 202
      input_type: input
      count: 2
      precision: 2
      data_type: float
      unit_of_measurement: V
      device_class: voltage
    - name: sdm630_line_3_to_line_1_volts
      slave: 1
      address: 204
      input_type: input
      count: 2
      precision: 2
      data_type: float
      unit_of_measurement: V
      device_class: voltage

But this is not working… :frowning:
When I check the configuration I get following error.

Invalid config for [modbus]: required key not provided @ data['modbus'][0]['sensors'][0]['address']. Got None
required key not provided @ data['modbus'][0]['sensors'][0]['name']. Got None. (See /home/homeassistant/.homeassistant/configuration.yaml, line 322). 

I’ve checked the files several times, don’t see the error…
Or is outsourcing not working for Modbus?

The key is for modbus communication. I set key into my energy meter and then the some key in modbus converter.

@sedael do you have an example of your energy meter configuration?

@sedael: Hi there, a expample energy- meter config would be greati, got a UMG604 Analyser with modbus fully integrated…

@neonightmare Did your proceed with your modbus configuration? Did you succeed to use an external configuration file?

@evb Hi there, I got the config in the main file, but modbus is working, exect the energy meter… i can’t use the values, got a configuration error…

Just figured out how to split the configuration. This is my configuration.yaml file:

modbus:
  - name: "waveshare1"
    close_comm_on_error: true
    type: rtuovertcp
    host: 192.168.1.104
    port: 8888
    sensors: !include_dir_merge_list devices/sensors/modbus/

Create a few directories: “/config/devices/sensors/modbus/”. In that last directory you can place any yaml file with sensor entries. An example for my SDM630 energy meter:

# /config/devices/sensors/modbus/SDM630.yaml
- name: warmtepomp_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
  scan_interval: 30


- name: warmtepomp_phase_2_line_to_neutral_volts
  slave: 1
  address: 2
  input_type: input
  count: 2
  precision: 2
  data_type: float
  unit_of_measurement: V
  device_class: voltage
  scan_interval: 30


- name: warmtepomp_phase_3_line_to_neutral_volts
  slave: 1
  address: 4
  input_type: input
  count: 2
  precision: 2
  data_type: float
  unit_of_measurement: V
  device_class: voltage
  scan_interval: 30

- name: warmtepomp_phase_1_current
  address: 6
  input_type: input
  count: 2
  slave: 1
  precision: 3
  data_type: float
  unit_of_measurement: A
  device_class: current
  scan_interval: 30

- name: warmtepomp_phase_2_current
  address: 8
  input_type: input
  count: 2
  slave: 1
  precision: 3
  data_type: float
  unit_of_measurement: A
  device_class: current
  scan_interval: 30

- name: warmtepomp_phase_3_current
  address: 10
  input_type: input
  count: 2
  slave: 1
  precision: 3
  data_type: float
  unit_of_measurement: A
  device_class: current
  scan_interval: 30

- name: warmtepomp_phase_1_power
  address: 12
  input_type: input
  count: 2
  slave: 1
  precision: 3
  scale: 0.001
  data_type: float
  unit_of_measurement: kW
  device_class: power
  scan_interval: 30

- name: warmtepomp_phase_2_power
  address: 14
  input_type: input
  count: 2
  slave: 1
  precision: 3
  scale: 0.001
  data_type: float
  unit_of_measurement: kW
  device_class: power
  scan_interval: 30

- name: warmtepomp_phase_3_power
  address: 16
  input_type: input
  count: 2
  slave: 1
  precision: 3
  scale: 0.001
  data_type: float
  unit_of_measurement: kW
  device_class: power
  scan_interval: 30

- name: warmtepomp_phase_1_va
  address: 18
  input_type: input
  count: 2
  slave: 1
  precision: 2
  data_type: float
  unit_of_measurement: VA
  device_class: power
  scan_interval: 30

- name: warmtepomp_phase_2_va
  address: 20
  input_type: input
  count: 2
  slave: 1
  precision: 2
  data_type: float
  unit_of_measurement: VA
  device_class: power
  scan_interval: 30

- name: warmtepomp_phase_3_va
  address: 22
  input_type: input
  count: 2
  slave: 1
  precision: 2
  data_type: float
  unit_of_measurement: VA
  device_class: power
  scan_interval: 30

- name: warmtepomp_phase_1_va_reactive
  address: 24
  input_type: input
  count: 2
  slave: 1
  precision: 2
  data_type: float
  unit_of_measurement: VAr
  device_class: power
  scan_interval: 30

- name: warmtepomp_phase_2_va_reactive
  address: 26
  input_type: input
  count: 2
  slave: 1
  precision: 2
  data_type: float
  unit_of_measurement: VAr
  device_class: power
  scan_interval: 30

- name: warmtepomp_phase_3_va_reactive
  address: 28
  input_type: input
  count: 2
  slave: 1
  precision: 2
  data_type: float
  unit_of_measurement: VAr
  device_class: power
  scan_interval: 30

- name: warmtepomp_sum_of_line_currents
  address: 48
  input_type: input
  count: 2
  slave: 1
  precision: 3
  data_type: float
  unit_of_measurement: A
  device_class: current
  scan_interval: 30

- name: warmtepomp_total_system_power
  address: 52
  input_type: input
  count: 2
  slave: 1
  precision: 3
  scale: 0.001
  data_type: float
  unit_of_measurement: kW
  device_class: power
  scan_interval: 30

- name: warmtepomp_total_system_va
  address: 56
  input_type: input
  count: 2
  slave: 1
  precision: 2
  data_type: float
  unit_of_measurement: VA
  device_class: power
  scan_interval: 30

- name: warmtepomp_total_system_var
  address: 60
  input_type: input
  count: 2
  slave: 1
  precision: 2
  data_type: float
  unit_of_measurement: VAr
  device_class: power
  scan_interval: 30

- name: warmtepomp_frequency_of_supply_voltages
  address: 70
  input_type: input
  count: 2
  slave: 1
  precision: 2
  data_type: float
  unit_of_measurement: Hz
  scan_interval: 30

- name: warmtepomp_import_wh_since_last_reset
  address: 72
  input_type: input
  count: 2
  slave: 1
  precision: 2
  data_type: float
  unit_of_measurement: kWh
  device_class: energy
  state_class: total_increasing
  scan_interval: 30

- name: warmtepomp_export_wh_since_last_reset
  address: 74
  input_type: input
  count: 2
  slave: 1
  precision: 2
  data_type: float
  unit_of_measurement: kWh
  device_class: energy
  state_class: total_increasing
  scan_interval: 30

- name: warmtepomp_maximum_total_system_power
  address: 86
  input_type: input
  count: 2
  slave: 1
  precision: 2
  data_type: float
  unit_of_measurement: W
  device_class: power
  scan_interval: 30

- name: warmtepomp_total_system_va_demand
  address: 100
  input_type: input
  count: 2
  slave: 1
  precision: 2
  data_type: float
  unit_of_measurement: VA
  device_class: power
  scan_interval: 30

- name: warmtepomp_maximum_total_system_va_demand
  address: 102
  input_type: input
  count: 2
  slave: 1
  precision: 2
  data_type: float
  unit_of_measurement: VA
  device_class: power
  scan_interval: 30

- name: warmtepomp_line_1_to_line_2_volts
  address: 200
  input_type: input
  count: 2
  slave: 1
  precision: 2
  data_type: float
  unit_of_measurement: V
  device_class: voltage
  scan_interval: 30

- name: warmtepomp_line_2_to_line_3_volts
  address: 202
  input_type: input
  count: 2
  slave: 1
  precision: 2
  data_type: float
  unit_of_measurement: V
  device_class: voltage
  scan_interval: 30

- name: warmtepomp_line_3_to_line_1_volts
  address: 204
  input_type: input
  count: 2
  slave: 1
  precision: 2
  data_type: float
  unit_of_measurement: V
  device_class: voltage
  scan_interval: 30

And for an SDM220 meter:

# /config/devices/sensors/modbus/SDM220.yaml
- name: zonnepanelen_garage_phase_1_power
  address: 12
  input_type: input
  count: 2
  slave: 3
  precision: 3
  scale: 0.001
  data_type: float
  unit_of_measurement: kW
  device_class: power
  scan_interval: 30

- name: zonnepanelen_garage_import_wh_since_last_reset
  address: 72
  input_type: input
  count: 2
  slave: 3
  precision: 2
  data_type: float
  unit_of_measurement: kWh
  device_class: energy
  state_class: total_increasing
  scan_interval: 30

- name: zonnepanelen_garage_export_wh_since_last_reset
  address: 74
  input_type: input
  count: 2
  slave: 3
  precision: 2
  data_type: float
  unit_of_measurement: kWh
  device_class: energy
  state_class: total_increasing
  scan_interval: 30
1 Like

Hello!

I have a Protoss-PE11-H Modbus-TCP adapter for my EV charging station.
I want to read the information in HA.

This is my converter configuration

I’ve added your config, with my IP to configuration.yaml file and restarted the HA docker.

There is no error in the log, but what’s next?
How do I see the information in the HA?

Thank you!

I think I should use:
type: tcp

But I get this warning in 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

@Macrisu
Is it this device that you have putted between your modbus SDM630 in your EV Charging station and the HA installation?

This is mine modbus configuration

# modbus communication
modbus:
  - name: "sdm630_laadpaal"
    close_comm_on_error: false
    retry_on_empty: true
    retries: 10
    delay: 10
    message_wait_milliseconds: 1000
    timeout: 10
    type: rtuovertcp
    host: put here your IP address of the Protoss-PE11
    port: put here the used port, in my config it is 502

My convertor is a rtu over tcp device, so the choosen type is rtuovertcp.
But your configuration should be tcp like you mention.

I don’t have a Protoss, but was reading the manual.
What do you have configured as tcp communication and protocol settings? (= not the serial settings to the SDM630 energymeter, but the other direction to the HA installation)

I see that there is even a MQTT client mode possible. Don’t know if you have already a MQTT Server running?

Yes, this is the device and I have the information in the HA now, but I still get the warnings in the logs.
I use Modbus in Settings, as this is required by EVCC.io
No MQTT device yet, but I’m a beginner :wink:

Now I need to find how to use the information, to define a meter with

  • total kW
  • kW/day
  • etc
# modbus communication
modbus:
  - name: "sdm630"
    close_comm_on_error: false
    retry_on_empty: true
    retries: 10
    delay: 10
    message_wait_milliseconds: 1000
    timeout: 10
    
    type: tcp
   #type: rtuovertcp
    host: 192.168.1.190
    port: 502
# outsourced yaml not working?
#    sensors: !include_dir_merge_named  configuration/devices/sensors/modbus.yaml
    sensors:
      - 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
        scan_interval: 30
      - name: sdm630_phase_1_current
        slave: 1
        address: 6
        input_type: input
        count: 2
        precision: 2
        data_type: float
        unit_of_measurement: A
        device_class: current
        scan_interval: 30
      - name: sdm630_phase_1_power
        slave: 1
        address: 12
        input_type: input
        count: 2
        precision: 3
        data_type: float
        unit_of_measurement: kW
        device_class: power
      - name: sdm630_phase_1_va
        slave: 1
        address: 18
        input_type: input
        count: 2
        precision: 2
        data_type: float
        unit_of_measurement: VA
        device_class: power
      - name: sdm630_phase_1_va_reactive
        slave: 1
        address: 24
        input_type: input
        count: 2
        precision: 2
        data_type: float
        unit_of_measurement: VAr
        device_class: power
      - name: sdm630_sum_of_line_currents
        slave: 1
        address: 48
        input_type: input
        count: 2
        precision: 3
        data_type: float
        unit_of_measurement: A
        device_class: current
      - name: sdm630_total_system_power
        slave: 1
        address: 52
        input_type: input
        count: 2
        precision: 3
        scale: 0.001
        data_type: float
        unit_of_measurement: kW
        device_class: power
      - name: sdm630_total_system_va
        slave: 1
        address: 56
        input_type: input
        count: 2
        precision: 2
        data_type: float
        unit_of_measurement: VA
        device_class: power
      - name: sdm630_total_system_var
        slave: 1
        address: 60
        input_type: input
        count: 2
        precision: 2
        data_type: float
        unit_of_measurement: VAr
        device_class: power
      - name: sdm630_frequency_of_supply_voltages
        slave: 1
        address: 70
        input_type: input
        count: 2
        precision: 2
        data_type: float
        unit_of_measurement: Hz
      - name: sdm630_import_wh_since_last_reset
        slave: 1  
        address: 72
        input_type: input
        count: 2
        precision: 2
        data_type: float
        unit_of_measurement: kWh
        device_class: energy
      - name: sdm630_export_wh_since_last_reset
        slave: 1
        address: 74
        input_type: input
        count: 2
        precision: 2
        data_type: float
        unit_of_measurement: kWh
        device_class: energy
      - name: sdm630_maximum_total_system_power
        slave: 1
        address: 86
        input_type: input
        count: 2
        precision: 2
        data_type: float
        unit_of_measurement: W
        device_class: power
      - name: sdm630_total_system_va_demand
        slave: 1
        address: 100
        input_type: input
        count: 2
        precision: 2
        data_type: float
        unit_of_measurement: VA
        device_class: power
      - name: sdm630_maximum_total_system_va_demand
        slave: 1
        address: 102
        input_type: input
        count: 2
        precision: 2
        data_type: float
        unit_of_measurement: VA
        device_class: power
      - name: sdm630_line_1_to_line_2_volts
        slave: 1
        address: 200
        input_type: input
        count: 2
        precision: 2
        data_type: float
        unit_of_measurement: V
        device_class: voltage
      - name: sdm630_line_2_to_line_3_volts
        slave: 1
        address: 202
        input_type: input
        count: 2
        precision: 2
        data_type: float
        unit_of_measurement: V
        device_class: voltage
      - name: sdm630_line_3_to_line_1_volts
        slave: 1
        address: 204
        input_type: input
        count: 2
        precision: 2
        data_type: float
        unit_of_measurement: V
        device_class: voltage

@Macrisu Which version of HA are you using?
The latest one 2022.3.8?

You are sure that your energy meter is the SDM630 v2 type?

I see that my current configuration is different from the one I did post in the beginning. I’m using now as data_type: float32.
Try to limit the sensors and take only the first one to do a test.

    sensors:
      - name: sdm630_phase_1_line_to_neutral_volts
        slave: 1
        address: 0
        count: 2
        input_type: input
        precision: 2
        data_type: float32
        unit_of_measurement: V
        device_class: voltage
        scan_interval: 20

I’m sure aI have SDM630v2, see picture

float32 and no more errors!
Thank you

I use HA docker on Synology NAS (X64).

# modbus communication
modbus:
  - name: "sdm630"
    close_comm_on_error: false
    retry_on_empty: true
    retries: 10
    delay: 10
    message_wait_milliseconds: 1000
    timeout: 10
    
    type: tcp
   #type: rtuovertcp
    host: 192.168.1.190
    port: 502
# outsourced yaml not working?
#    sensors: !include_dir_merge_named  configuration/devices/sensors/modbus.yaml
# https://github.com/coolex/sdm630
    sensors:
      - name: sdm630_phase_1_line_to_neutral_volts
        slave: 1
        address: 0
        input_type: input
        count: 2
        precision: 2
        data_type: float32
        unit_of_measurement: V
        device_class: voltage
        scan_interval: 30
      - name: sdm630_phase_1_current
        slave: 1
        address: 6
        input_type: input
        count: 2
        precision: 2
        data_type: float32
        unit_of_measurement: A
        device_class: current
        scan_interval: 30
      - name: sdm630_phase_1_power
        slave: 1
        address: 12
        input_type: input
        count: 2
        precision: 3
        data_type: float32
        unit_of_measurement: kW
        device_class: power
      - name: sdm630_phase_1_va
        slave: 1
        address: 18
        input_type: input
        count: 2
        precision: 2
        data_type: float32
        unit_of_measurement: VA
        device_class: power
      - name: sdm630_phase_1_va_reactive
        slave: 1
        address: 24
        input_type: input
        count: 2
        precision: 2
        data_type: float32
        unit_of_measurement: VAr
        device_class: power
      - name: sdm630_sum_of_line_currents
        slave: 1
        address: 48
        input_type: input
        count: 2
        precision: 3
        data_type: float32
        unit_of_measurement: A
        device_class: current
      - name: sdm630_total_system_power
        slave: 1
        address: 52
        input_type: input
        count: 2
        precision: 3
        scale: 0.001
        data_type: float32
        unit_of_measurement: kW
        device_class: power
      - name: sdm630_total_system_va
        slave: 1
        address: 56
        input_type: input
        count: 2
        precision: 2
        data_type: float32
        unit_of_measurement: VA
        device_class: power
      - name: sdm630_total_system_var
        slave: 1
        address: 60
        input_type: input
        count: 2
        precision: 2
        data_type: float32
        unit_of_measurement: VAr
        device_class: power
      - name: sdm630_frequency_of_supply_voltages
        slave: 1
        address: 70
        input_type: input
        count: 2
        precision: 2
        data_type: float32
        unit_of_measurement: Hz
      - name: sdm630_import_wh_since_last_reset
        slave: 1  
        address: 72
        input_type: input
        count: 2
        precision: 2
        data_type: float32
        unit_of_measurement: kWh
        device_class: energy
      - name: sdm630_export_wh_since_last_reset
        slave: 1
        address: 74
        input_type: input
        count: 2
        precision: 2
        data_type: float32
        unit_of_measurement: kWh
        device_class: energy
      - name: sdm630_total_system_power_demand
        slave: 1
        address: 84
        input_type: input
        count: 2
        precision: 2
        data_type: float32
        unit_of_measurement: W
        device_class: power
      - name: sdm630_maximum_total_system_power
        slave: 1
        address: 86
        input_type: input
        count: 2
        precision: 2
        data_type: float32
        unit_of_measurement: W
        device_class: power
      - name: sdm630_total_system_va_demand
        slave: 1
        address: 100
        input_type: input
        count: 2
        precision: 2
        data_type: float32
        unit_of_measurement: VA
        device_class: power
      - name: sdm630_maximum_total_system_va_demand
        slave: 1
        address: 102
        input_type: input
        count: 2
        precision: 2
        data_type: float32
        unit_of_measurement: VA
        device_class: power
      - name: sdm630_line_1_to_line_2_volts
        slave: 1
        address: 200
        input_type: input
        count: 2
        precision: 2
        data_type: float32
        unit_of_measurement: V
        device_class: voltage
      - name: sdm630_line_2_to_line_3_volts
        slave: 1
        address: 202
        input_type: input
        count: 2
        precision: 2
        data_type: float32
        unit_of_measurement: V
        device_class: voltage
      - name: sdm630_line_3_to_line_1_volts
        slave: 1
        address: 204
        input_type: input
        count: 2
        precision: 2
        data_type: float32
        unit_of_measurement: V
        device_class: voltage
        
# Example configuration.yaml entry
utility_meter:
  daily_energy:
    source: sensor.sdm630_total_system_power
    name: Daily Energy
    cycle: daily

  monthly_energy:
    source: sensor.sdm630_total_system_power
    name: Monthly Energy
    cycle: monthly
3 Likes

Here my config, with all entries from the Eastron SDM630.

2 Likes


Hello,

I am currently trying to set up an SDM630 Mobus V2 with a Waveshare RS485 to ETH (B).
The way I see it, I have the connection from the Waveshare to the HA but no sensors are created.
Here is the Waveshare setting

What can be the reason that the sensors are not displayed?

Hi @Sven4597,

The sensors must be created in your yaml configuration. Did you do that?
See for example the configuration of @Macrisu above.
You have first the modbus configuration and then the configuration of the wanted sensors.

Thanks for sharing this!
Which converter are you using to connect the SDM630 to HA?

Just a simple RS485 to USB adapter https://www.amazon.de/gp/product/B08K37YRQD/

2 Likes

Today I’ve successfully integrated two SDM 630 with RS485 <> ETH converter from your screen.

modbus:
  - name: hubA
    type: rtuovertcp
    host: 10.1.1.6
    port: 502
    sensors:
      - name: Phase 1 voltage
        unique_id: l1_voltage
        unit_of_measurement: V
        address: 0
        state_class: measurement
        device_class: voltage
        slave: 1
        count: 2
        precision: 2
        scan_interval : 60
        input_type: input
        data_type: float32

As an example for other sensors, I looked at @lwde GitHub - one post above your question.