SDM630 Meter reading MODBUS via Binding

Hi there,
beginner question… can you please help?

I did wire a SDM630 to my Raspberry Pi.
Openhab runs in a container.

And I did map /dev/ttyUSB0 to the container

I did configure the modbus slave

UID: modbus:serial:0c6271f1cf
label: Modbus Serial Slave
thingTypeUID: modbus:serial
configuration:
  baud: 9600
  connectMaxTries: 1
  timeBetweenTransactionsMillis: 35
  stopBits: "1.0"
  parity: none
  receiveTimeoutMillis: 1500
  dataBits: 8
  echo: false
  encoding: rtu
  flowControlIn: none
  flowControlOut: none
  port: /dev/ttyUSB0
  connectTimeoutMillis: 10000
  afterConnectionDelayMillis: 0
  id: 1
  enableDiscovery: false

and the Modbus poller

UID: modbus:poller:0c6271f1cf:da0203f5ff
label: Modbus Regular Poll
thingTypeUID: modbus:poller
configuration:
  maxTries: 3
  cacheMillis: 50
  length: 36
  start: 0
  refresh: 5000
  type: holding
  multipleEvenWithSingleRegisterOrCoil: true
bridgeUID: modbus:serial:0c6271f1cf

But I receive the following error from the poller:

COMMUNICATION_ERROR
Error with read: org.openhab.core.io.transport.modbus.internal.ModbusSlaveIOExceptionImpl: Modbus IO Error with cause=ModbusIOException, EOF=false, message='I/O exception: IOException Error reading response (EOF)', cause2=null

Any idea? Or how can I easily verify that modbus communication works at all between the raspberry and SDM630?

I found several problems with my config. serial slave id was wrong. And also Type “holding” was wrong.
I used minimalmodbus python code to check something on my Docker host system (Pi).

Many thanks for @Sebastian_A post about item / thing configuration.

I’m still not finished with my configuration and need to debug further. But at least received some values. :slight_smile:

One question. Still having some trouble…
Smart Meter COM is 2, inverter COM is 1.

Reading the Modbus is perfectly fine as long the inverter is off.
As soon the Growatt inverter is on the Bus I mostly receive errors like this:

Error with read: org.openhab.core.io.transport.modbus.internal.ModbusSlaveIOExceptionImpl: Modbus IO Error with cause=ModbusIOException, EOF=false, message='I/O exception: IOException CRC Error in received frame. 35 bytes of payload (04 04 20 00 00 14 fb 90 04 04 20 00 00 14 fb 90 04 04 20 00 00 14 fb 90 04 04 20 00 00 14 fb 90 04 04 20 ) with invalid CRC of ', cause2=null

Any idea?

Can you expand on this, what is your configuration? Earlier you mentioned dev/tty style port names, not Windows COM ports.
What have you got connected to where?

I don’t mean Windows COM ports, but ids which I set for the modbus devices.
But I think what I intend to do can’t work actually since the inverter is the Modbus master.
The Openhab binding act as Modbus Master too, right? And the bus can only have one master.
That’s probably the reason why it doesn’t work.

Yes.

Most of these inverters can run a “private” serial Modbus, where the inverter is master and one or more external meters are the slave(s). You cannot hack into that bus from openHAB.

The inverters usually provide a completely separate “public” Modbus interface, often TCP/IP, which you can use with openHAB etc. The inverter plays the slave role on this interface. The inverter might well provide a copy or a version of some of the info it gets from the external meter.

Sorry for digging up this thread but I have the same issue.

I use a hybrid inverter from Aiswei/Solplanet with a direct Modbus connection between inverter and SDM630 smart meter and a CAN Bus connection between inverter and battery.

I would like to get some data points that I can not get via the meager developer debug interface with the http binding.
The inverter has a wifi stick with an ESP32 that is connected via RS485 to the inverter (It uses an usb port for connection). I guess this wifi stick is a modbus master and the inverter and smart meter are slaves.
Now it is problematic to poll between the polls of the wifi stick master because it polls very frequently (<5s).

Fortunately sometimes I get lucky and get data without an interruption and resulting CRC error.
I could live with this luck based polling but it is annoying to see all these CRC errors on the logviewer.

Can I maybe just hide the Modbus errors in the logviewer? Also the Modbus Things flicker between online and offline (from CRC errors), which is not looking nice…

This thread is 1 year old. Maybe there are new ways now?

Hello, I have buy a Aiswei/Soplanet Hybrid inverter monophase.
I am trying to get/put info from/into the inverter. Have you see this approach from this web
Step-by-Step Guide to Linking Your (SolPlanet) Solar Inverter to Home Assistant Using ModBus Serial from William van der Vegt?
Have you achieve to poll the Inverter? @ingenieur89

Hi,

problem with your guide is that he interfaces Modbus which is reserved by the Eastron Smartmeter. You cannot have 2 Masters on the Modbus network. The inverter and Smarteter are very busy communicating (every few ms) and it is impossible to get between the pollings without interference.
I opened another thread with an approach that uses the cloud API:

Unfortunately I have not got it running yet. Maybe you are more experienced in that. Let me know if you have a solution.