Great. Just one more question before I buy the equipments. To connect two SDM630 units I only need one RS485 to Ethernet unit, right?
Yes. You can actually have 247 modbus devices on a single RS485 bus. Just make sure you are setting each device to a unique address. Please note that what we call address on the SDM630 is called ‘slave’ in your HA modbus set up. The address in HA refers to the address of a value (acutally a register) within a modbus device.
Here’s a picture I made while adding a third SDM630.
All devices are connected in parallel, and I twisted the wire to make improve the signal transmission.
Hi,
How can we check if the connection is made between home-assistant and the unit.
Got the exact same one but cant get it to work so it seems?
Hi there.
I’m looking to buy a 3-phase meter to use with Home Assistant, I see that Eastron has released a “TCP” version of the SDM630 with an integrated ethernet port and Modbus/TCP. Has anyone tried it already?
Hi,
I have the EASTRON SDM630 MODBUS-MID V2
and I use Waveshare RS232/485/422 zu RJ45 Ethernet Konverter as a Gateway.
I am desperate. I cannot manage to get this two devices to work together or in Home Assistant.
First I tried to configure the gateway without the meter but I got no data even no random
noise data. Then I connected the power meter to it. The configuration looks fine. Both gateway
and power meter have the same serial properties:
- Baud rate: 9600
- Databits: 8
- Parity: even
- Stopbits: 1
I tried several tools like
- mbpoll (linux) → mbpoll.jpg
- ModScan → modscan.jjpg
Either no data is sent or the connection times out. I can ping the gateway so it should be
reachable.
I also tried to configure the gateway in Home Assistant. Same result. No data and even no
log entries although I got this in my configuration:
logger:
logs:
homeassistant.components.modbus: debug
pymodbus.client: debug
I noticed that the small phone handset in the SDM630 display is missing. So I guess there is no
communication between both of them.
At the moment I am using a simple bulb and the 1p2w setting in the SDM630. Maybe that’s the
cause that the modbus is not working? Is modbus only active with a 3p4w setting?
I know this is a Home Assistant forum but maybe someone else had the same problems.
I would appreciate any kind of help and ideas.
Best regards
Goran
Hi Goran,
Have you got this to work in the end? I Was troubled with another type of Waveshare interface and got a little bit further by swapping the A and B signals around (seems like it was incorrectly labeled on the interface itself…). You may give that a try, though you may have tried that already of course.
Cheers,
Kim
Hi Kim,
I purchased an Modbus-To-USB dongle to test it directly at the computer.
It worked out of the box. So I guess the gateway does not work or cannot be configured properly.
I returned it.
At the end I found another solution:
- ESPHome as a SDM module
- A Wemos D1 mini
- A TTL RS485 485 to serial UART
I tried it and it works like a charme
Best regards
Goran
Thanks a lot, now i got it working. Herzlichen Dank nach dieser Anleitung funktioniert nun das Auslesen mit dem SDM630 Modbus v2 and a Waveshare RS485 to RJ45/Ethernet
@TomTomTom
I can confirm Modbus on the SDM630 works in the 1p2w settings as well.
Waveshare settings that I used:
Work mode: TCP Server.
Protocol: Modbus TCP to RTU
With that I tested if I could pull data using other tools first. With QModMaster I was able to pull data (0x04), Unit ID to what you set the SDM630 to, Start address 200, nr of registers 2, data format float, precision 3. This gave an output of 237 which is the L1 Voltage.
After this I got it to work on the Raspberry that has HASS installed. First I tried to replicate above using a Modbus integration in Node-Red as this makes it easier to play around with.
modbus:
- name: "sdm630"
retries: 10
delay: 10
message_wait_milliseconds: 1000
timeout: 10
type: tcp
host: 192.168.2.40
port: 502
sensors:
- name: sdm630_line_1_to_line_2_volts
slave: 2
address: 200
input_type: input
data_type: float32
precision: 2
unit_of_measurement: V
device_class: voltage
- name: sdm630_frequency_of_supply_voltages
address: 70
precision: 2
input_type: input
slave: 2
data_type: float32
unit_of_measurement: Hz
I had the feeling HASS only picks up Modbus configurations after a reload btw.
hello,
it’s my first time here so forgive any dumb mistakes.
but i had the same problems as descript above, i have the feeling it’s due to the fact the baudrate is to low for the modbus to function correctly, i have the same Waveshare modbus and the SDM630, and had the same problem.
I’ve set the baudrate on the SDM630 to 38400 and in the setting of the modbus.
mine is now working perfectly without losing any data or disconnection all the time. and its responding really quick.
here is my YAML and some pics of the settings that i have used.
modbus:
- name: "sdm630"
retries: 10
delay: 10
message_wait_milliseconds: 1000
timeout: 10
type: tcp
host: 192.168.2.200
port: 502
sensors:
- name: L1_volts
unique_id: l1_neutral_volts
slave: 2
address: 0
input_type: input
data_type: float32
precision: 2
unit_of_measurement: V
device_class: voltage
- name: L2_volts
unique_id: l2_neutral_volts
slave: 2
address: 2
input_type: input
data_type: float32
precision: 2
unit_of_measurement: V
device_class: voltage
- name: L3_volts
unique_id: l3_neutral_volts
slave: 2
address: 4
input_type: input
data_type: float32
precision: 2
unit_of_measurement: V
device_class: voltage
- name: frequency
unique_id: frequency
address: 70
precision: 2
input_type: input
slave: 2
data_type: float32
unit_of_measurement: Hz
- name: L1_KW
unique_id: L1_KW
address: 12
precision: 2
input_type: input
slave: 2
scale: 0.001
data_type: float32
unit_of_measurement: KW
- name: L2_KW
unique_id: L2_KW
address: 14
precision: 2
input_type: input
slave: 2
scale: 0.001
data_type: float32
unit_of_measurement: KW
- name: L3_KW
unique_id: L3_KW
address: 16
precision: 2
input_type: input
slave: 2
scale: 0.001
data_type: float32
unit_of_measurement: KW
- name: total_power_KW
unique_id: totaal_KW
address: 52
precision: 2
input_type: input
slave: 2
scale: 0.001
data_type: float32
unit_of_measurement: KW
Hello, how do you differentiate the individual electricity meters, any photos of the screens.
Thank you.
What do you mean? In HA configuration, or the configuration of the power meters?
Your power meters need to be configured to different addresses. Then, in HA, you basically use these addresses to talk to the devices. I am happy to share some pictures, but it would be great if you could tell a bit more on what you want to know.
For the power meter, here’s a manual: https://www.photovoltaikforum.com/core/attachment/153858-sdm630-modbus-v2-manual-incl-protocoll-pdf/
Page 14 shows how to set the address on the SDM630. In HA the device address is mentioned in the YAML as ‘slave’. That is what you use to differentiate between different devices. Note that ‘address’ means a different address within a device to read different values (power, amps, volts, etc…). It is typically called coil, register, location or address.
Hello, I am concerned with how to easily add data from only one specific electricity meter to the HA control panel, when there will be more electricity meters (approx. 30 units). I would have multiple control panels in HA, each with one meter.
Thank you.
I can’t speak English, translate by Google.
Hello, I understand the address settings in the SDM630 electricity meter and the slave in YAML. I found your YAML where sdm630a and sdm630b are. How to easily create one control panel in HA for sdm630a only and another control panel for sdm630b only.
Thank you.
Hello, I think I already know how to do it. I’ll set up my first control panel and then copy the code. I’ll just replace the sdm630a with the sdm630c.
Excellent. If you have 30 units, that is lot. I’d love to see some pictures of that. Also, you may want to use something else then A, B, C, etc… maybe the address of the device. When doing that, you also can easily use search and replace on on the YAML.
Hello, that’s just my goal (30 pcs). I just got the SDM630 and HA connection now. My next problem is creating a network between buildings. Only some of the buildings have an Ethernet cable.
Hello,
I would like to buy a SDM630 Modbus and it seems that only the V3 version is available.
What changes between versions V2 and V3?
Do they have the same register numbers?
Thanks
Hi, i am also using V3. I is working, too!
I’m strugging getting data returned from my Eastron SDM630 Modbus in combination with a Waveshare RS485 to ETH (B) device. I have read all the posts above and tried many of the examples but still no result.
The error message I consistently get for all entities is:
Eastron Modbus: Error: device: 103 address: 72 -> Modbus Error: [Input/Output] ERROR: No response received after 3 retries
My yaml:
- name: "Eastron Modbus"
type: rtuovertcp
host: 192.168.200.78
port: 502
delay: 10 # default = 0
timeout: 10 # default = 5
message_wait_milliseconds: 1000 # default = 30 for serial
sensors:
- name: WP-Eastron import kWh
unique_id: wp_eastron_import_kwh
data_type: float32
precision: 2
scale: 0.01
address: 72
input_type: input
slave: 103
unit_of_measurement: kWh
state_class: total_increasing
device_class: energy
- name: "Nibe S1255"
type: tcp
host: 192.168.200.74
port: 502
sensors:
<<etcetera>>
It seems my Waveshare device is operating as it should since I see the correct lights (Link light = blue, Active light = blue so it should be returning data). I’m using baudrate 9.6k, parity none, stop bits 1 on both the Waveshare and SDM630. I have triple checked my modbus addresses (101 and 103; in addition I have also connected a Nibe heat pump which uses address 1 and no problem in receiving data from this device).
What else have I tried in various combinations (without result):
- Baudrate 38400
- Protocol Modbus TCP to RTU
- type ‘rtuovertcp’ as well as ‘tcp’
I notice in previous posts the use of ‘count: 2’ and ‘float32’ to specify sensors. However, I’m getting an error message when I use this (float32 already specifies 2 registers to read)
What am I overlooking?