Modbus issues - values can be read but log full of errors

That’s behaving the same as openHAB, then. Are you running Radzio on the same host system?

No, Radzio had been executed from my Laptop and OH is on a Server

This is the status bar after a little while staying connected’
grafik

Did all 15 errors appear while the “Modbus message timeout” was there ?

Did you see the “Modbus message timeout” again while staying connected ?

As I checked it again, the error messages only counting while error message is present. After disappearing I did not see it again and error counter is unchanged

To make sure I do understand it right can you confirm following:

  • After you connect, the “Modbus message timeout” message appears for about 1 second.

  • if you then leave it running, no more “Modbus message timeout” messages appear and the error count does not change.

  • If you then disconnect and without making any change to the settings connect again,
    the “Modbus message timeout” message appears again for about 1 second.

In short, every time you disconnect and connect again the “Modbus message timeout” message appears.

Yes, you are right.
In even shorter, every time I connect the message appears

I am now on OPENHAB 3.3.0.M1.

Tomorrow I will build an OPENHAB 2.5.12 instance and check if I can reproduce your problem with my SMA inverters.
If so, I will use WIRESHARK for further investigation.

1 Like

After a long struggle I finally succeeded to install OPENHAB2 2.5.12
Next I made a setup to read the CURRENT POWER and the CURRENT YIELD of my SMA inverter.

After some editing of the setup both items are received without errors.

12:30:22.557 [INFO ] [smarthome.event.ItemStateChangedEvent] - CURRENT_POWER_ValueAsNumber changed from 804 to 806
12:30:23.353 [INFO ] [smarthome.event.ItemStateChangedEvent] - CURRENT_YIELD_ValueAsNumber changed from 2252 to 2253
12:30:28.595 [INFO ] [smarthome.event.ItemStateChangedEvent] - CURRENT_POWER_ValueAsNumber changed from 806 to 801
12:30:29.401 [INFO ] [smarthome.event.ItemStateChangedEvent] - CURRENT_YIELD_ValueAsNumber changed from 2253 to 2254

During inspection of the log file however I found that several errors appeared at the time I was editing my setup.

12:34:48.429 [INFO ] [smarthome.event.ItemStateChangedEvent] - CURRENT_POWER_ValueAsNumber changed from 795 to 800
12:34:51.371 [WARN ] [ort.modbus.internal.ModbusManagerImpl] - Try 1 out of 3 failed when executing request (ModbusReadRequestBlueprint@1dd6641[slaveId=3,functionCode=READ_INPUT_REGISTERS,start=30517,length=2,maxTries=3]). Will try again soon. Error was: net.wimpi.modbus.ModbusSlaveException Error Code = 2 [operation ID a5cd521c-9a10-41ce-8aa9-4f194035d380]
12:34:51.451 [WARN ] [ort.modbus.internal.ModbusManagerImpl] - Try 2 out of 3 failed when executing request (ModbusReadRequestBlueprint@1dd6641[slaveId=3,functionCode=READ_INPUT_REGISTERS,start=30517,length=2,maxTries=3]). Will try again soon. Error was: net.wimpi.modbus.ModbusSlaveException Error Code = 2 [operation ID a5cd521c-9a10-41ce-8aa9-4f194035d380]
12:34:51.532 [ERROR] [ort.modbus.internal.ModbusManagerImpl] - Last try 3 failed when executing request (ModbusReadRequestBlueprint@1dd6641[slaveId=3,functionCode=READ_INPUT_REGISTERS,start=30517,length=2,maxTries=3]). Aborting. Error was: net.wimpi.modbus.ModbusSlaveException Error Code = 2 [operation ID a5cd521c-9a10-41ce-8aa9-4f194035d380]
12:34:57.564 [WARN ] [ort.modbus.internal.ModbusManagerImpl] - Try 1 out of 3 failed when executing request (ModbusReadRequestBlueprint@1dd6641[slaveId=3,functionCode=READ_INPUT_REGISTERS,start=30517,length=2,maxTries=3]). Will try again soon. Error was: net.wimpi.modbus.ModbusSlaveException Error Code = 2 [operation ID a734bdd3-3624-4d6a-8e92-80c5a5422a91]
12:34:57.644 [WARN ] [ort.modbus.internal.ModbusManagerImpl] - Try 2 out of 3 failed when executing request (ModbusReadRequestBlueprint@1dd6641[slaveId=3,functionCode=READ_INPUT_REGISTERS,start=30517,length=2,maxTries=3]). Will try again soon. Error was: net.wimpi.modbus.ModbusSlaveException Error Code = 2 [operation ID a734bdd3-3624-4d6a-8e92-80c5a5422a91]
12:34:57.727 [ERROR] [ort.modbus.internal.ModbusManagerImpl] - Last try 3 failed when executing request (ModbusReadRequestBlueprint@1dd6641[slaveId=3,functionCode=READ_INPUT_REGISTERS,start=30517,length=2,maxTries=3]). Aborting. Error was: net.wimpi.modbus.ModbusSlaveException Error Code = 2 [operation ID a734bdd3-3624-4d6a-8e92-80c5a5422a91]
12:35:00.513 [INFO ] [smarthome.event.ItemStateChangedEvent] - CURRENT_POWER_ValueAsNumber changed from 800 to 804

This errors appear when polling the CURRENT YIELD (= register 30517, length =4)
As can be seen from the logging the length was set to 2 instead of 4

Check your pollers setup for mismatches between the specified length and the required length.

EDIT
I had a look at the first post in this topic and have a question about this poller

        Bridge poller input_30769_114 "TP_Input_30769_114" [ start=30773, length=114, refresh=2000, type="input" ] {
        Thing data 30773_2 "TP_30773_2" [ readStart="30773", readValueType="int32"]
        Thing data 30775_2 "TP_30775_2" [ readStart="30775", readValueType="int32"]
        Thing data 30839_2 "TP_30839_2" [ readStart="30839", readValueType="uint32"]

The poller start=30773 and length=114.
In my opinion this covers the register numbers 30773 up to 30829.
This means that register 30839 is not polled.

FYI:
I came across the following SMA document : SMA_Modbus-TI-en-23.xlsx
This document provides a lot off information (e.g applicable registers) about may SMA converters.
Google for it and you will find a link to download.

EDIT 19-03-02

Sorry, my mistake.
The poller start=30773 and length=114 covers the register numbers 30773 up to 30855

Thank you for your help

This is my current things file:

Bridge modbus:tcp:tripower [ host="192.168.100.48", port=502, id=3, timeBetweenTransactionsMillis=250, connectMaxTries=2] {

        Bridge poller input_30775_4 "SMA_Power_input_gesamt" [ start=30775, length=4, refresh=5000, type="input" ] {

                Thing data 30775_4 [ readStart="30775", readValueType="int32", readTransform="JS(minus2zero.js)" ]

        }

        Bridge poller input_30529_72 "TP_Input_30529_72" [ start=30531, length=12, refresh=5000, type="input" ] {

                Thing data 30531_2 "TP_30531_2" [ readStart="30531", readValueType="uint32"]

                Thing data 30537_2 "TP_30537_2" [ readStart="30537", readValueType="uint32"]

        }

}

The config from first post was already reworked

I have tested both my inverters with you’re setup on my OPENHAB 2.5.12 instance:
SB1500

SB2500

For both inverters no errors ( openhab>log:display ) were reported.

Here are some suggestions on how to proceed from here:

  1. Temporarily disconnect the SMA Energy Meter, reboot and check if the errors still remain
  2. Simplify your network to consist of the router, the OpenHab server and the SMA inverter
  3. Create a secondary independent network with just a router (DHCP enabled) , the OpenHab server and the SMA inverter
1 Like

Any progress ?

I will give an update next week. I am at hospital, nothing too serious but a knee surgery.

Thanks for the message, I wish you a good recovery from the surgery.
I will keep my openHAB 2 instance alive.
Come back when you are ready for it.

First rating of your suggestions:

Here are some suggestions on how to proceed from here:

  • Temporarily disconnect the SMA Energy Meter, reboot and check if the errors still remain
    → I can check it next week on a cloudy day or night :slight_smile:
  • Simplify your network to consist of the router, the OpenHab server and the SMA inverter
    → very difficulty, nearly impossible because all devices are mounted and I will not pull everything apart
  • Create a secondary independent network with just a router (DHCP enabled) , the OpenHab server and the SMA inverter
    → also quite difficukty because the OH server is a VM on a server hosting several VMs … I have no idea how this should work,

I am simply living with these errors now …

Well in that case I suggest you close the topic now.

Good recovery from your knee surgery !!

1 Like