[SOLVED] Wrong Values with Modbus and KOSTAL Smart Energy Meter

Tags: #<Tag:0x00007faf80309968>

Hey,

I’ve just set up the modbus binding with tcp and it autodetected the kostal smart energy meter as “Wye-connected three phase (ABCN) meter supporting SunSpec mapping over modbus connection”.
Kudos to @mrbig !

What started with a really UX, sadly resulted in partly offset/wrong values.

As a test, I’ve used 3 channels and saw different results:

  • Total Real Energy Imported - Perfect match
  • Total Real Power Value - Off by Factor 10, f.e. shows -3W when really -32W
  • Total Real Energy Exported - Totally off. Shows 4294728320 Wh when really 238.98 kWh

Did I do something wrong? Do I have to adjust settings?

I did some research and found the specification for the device here: https://www.kostal-solar-electric.com/de-de/download/-/media/document-library-folder---kse/2019/05/09/13/57/ba_kostal_interface_ksem---201911.pdf

Maybe the cause lies in this file:

How should I proceed to track this down?

Thanks and best regards,
Sascha

Hello @Sascha_, thanks for using this bundle.
Unfortunately we weren’t able to test with many different vendors, so it’s possible that some products will show invalid values.

I’ll check the specification you’ve sent, it looks very helpfull.

You could also help by enabling modbus debug, so I can see the raw communication with the device. You have to enable trace messages for the modbus transport to get these logs. After logging in to the Karaf Console, please issue the following command:

 log:set TRACE org.openhab.io.transport.modbus

You will then see logs like these:

[TRACE] [rt.modbus.internal.ModbusManagerImpl] - Response for read request (FC=3, transaction ID=5): 00 05 00 00 00 d9 01 03 d6 00 cb 00 69 00 07 00 00 00 07 00 07 ff ff 5a eb 5a eb 59 fc 5a 1b 9c 78 9c ab 9b f7 9c c6 ff fe 13 81 ff fe ff db 00 2a ff c9 ff e7 00 00 01 fe 00 aa 00 ad 00 b5 00 00 fe 03 ff 5c ff 5c ff 4d 00 00 02 2f f4 f7 0c 13 05 84 ff fe 00 da 3c 70 00 57 06 45 00 49 ed b1 00 4d 71 1e 00 ab f8 95 00 3d 4f f0 00 4f e7 eb 00 32 e9 5f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00 00 00 00 00  [operation ID 3440d97f-690d-418b-ac7f-ea2fbd54b6f1]`

These will be very useful to debug the problem.

Thanks for your feedback!

Hey @mrbig

I’m not only happy that you coded this nice bundle but I’m proud to be of support in order to improve it :slight_smile:

I’ve done the steps you proposed and here’s a block of the (repeating) output:

2020-05-30 10:37:26.469 [DEBUG] [rt.modbus.internal.ModbusManagerImpl] - Executing scheduled (5000ms) poll task BasicPollTaskImpl@5b14fb[request=BasicModbusReadRequestBlueprint@6486a8[slaveId=1,functionCode=READ_MULTIPLE_REGISTERS,start=40069,length=107,maxTries=3],endpoint=ModbusTCPSlaveEndpoint@1785608[address=192.168.178.38,port=502],callback=org.openhab.binding.modbus.sunspec.internal.handler.AbstractSunSpecHandler$1@308cc1]. Current millis: 1590827846468
2020-05-30 10:37:26.474 [TRACE] [rt.modbus.internal.ModbusManagerImpl] - Starting new operation with task BasicPollTaskImpl@5b14fb[request=BasicModbusReadRequestBlueprint@6486a8[slaveId=1,functionCode=READ_MULTIPLE_REGISTERS,start=40069,length=107,maxTries=3],endpoint=ModbusTCPSlaveEndpoint@1785608[address=192.168.178.38,port=502],callback=org.openhab.binding.modbus.sunspec.internal.handler.AbstractSunSpecHandler$1@308cc1]. Trying to get connection [operation ID 7891f195-a230-419f-9662-d4a86b18f149]
2020-05-30 10:37:26.478 [TRACE] [rt.modbus.internal.ModbusManagerImpl] - Executing task BasicPollTaskImpl@5b14fb[request=BasicModbusReadRequestBlueprint@6486a8[slaveId=1,functionCode=READ_MULTIPLE_REGISTERS,start=40069,length=107,maxTries=3],endpoint=ModbusTCPSlaveEndpoint@1785608[address=192.168.178.38,port=502],callback=org.openhab.binding.modbus.sunspec.internal.handler.AbstractSunSpecHandler$1@308cc1] (oneOff=false)! Waiting for connection. Idle connections for this endpoint: 1, and active 0 [operation ID 7891f195-a230-419f-9662-d4a86b18f149]
2020-05-30 10:37:26.495 [TRACE] [ing.ModbusSlaveConnectionFactoryImpl] - Waited 0ms (interTransactionDelayMillis 30ms) before giving returning connection TCPMasterConnection@fa2c78[socket=Socket[addr=/192.168.178.38,port=502,localport=40010]] for endpoint ModbusTCPSlaveEndpoint@1785608[address=192.168.178.38,port=502], to ensure delay between transactions.
2020-05-30 10:37:26.499 [TRACE] [rt.modbus.internal.ModbusManagerImpl] - borrowing connection (got Optional[TCPMasterConnection@fa2c78[socket=Socket[addr=/192.168.178.38,port=502,localport=40010]]]) for endpoint ModbusTCPSlaveEndpoint@1785608[address=192.168.178.38,port=502] took 15 ms
2020-05-30 10:37:26.503 [TRACE] [rt.modbus.internal.ModbusManagerImpl] - Executing task BasicPollTaskImpl@5b14fb[request=BasicModbusReadRequestBlueprint@6486a8[slaveId=1,functionCode=READ_MULTIPLE_REGISTERS,start=40069,length=107,maxTries=3],endpoint=ModbusTCPSlaveEndpoint@1785608[address=192.168.178.38,port=502],callback=org.openhab.binding.modbus.sunspec.internal.handler.AbstractSunSpecHandler$1@308cc1] (oneOff=false)! Connection received in 20 ms [operation ID 7891f195-a230-419f-9662-d4a86b18f149]
2020-05-30 10:37:26.506 [TRACE] [rt.modbus.internal.ModbusManagerImpl] - Operation with task BasicPollTaskImpl@5b14fb[request=BasicModbusReadRequestBlueprint@6486a8[slaveId=1,functionCode=READ_MULTIPLE_REGISTERS,start=40069,length=107,maxTries=3],endpoint=ModbusTCPSlaveEndpoint@1785608[address=192.168.178.38,port=502],callback=org.openhab.binding.modbus.sunspec.internal.handler.AbstractSunSpecHandler$1@308cc1]. Got a connection successfully [operation ID 7891f195-a230-419f-9662-d4a86b18f149]
2020-05-30 10:37:26.510 [TRACE] [rt.modbus.internal.ModbusManagerImpl] - Try 1 out of 3 [operation ID 7891f195-a230-419f-9662-d4a86b18f149]
2020-05-30 10:37:26.512 [TRACE] [rt.modbus.internal.ModbusManagerImpl] - Ensuring that enough time passes before retrying again. Sleeping if necessary [operation ID 7891f195-a230-419f-9662-d4a86b18f149]
2020-05-30 10:37:26.516 [TRACE] [rt.modbus.internal.ModbusManagerImpl] - Sleep ended, slept 0 [operation ID 7891f195-a230-419f-9662-d4a86b18f149]
2020-05-30 10:37:26.518 [TRACE] [rt.modbus.internal.ModbusManagerImpl] - Going execute transaction with request request (FC=READ_MULTIPLE_REGISTERS): 00 00 00 00 00 06 01 03 9c 85 00 6b  [operation ID 7891f195-a230-419f-9662-d4a86b18f149]
2020-05-30 10:37:26.528 [TRACE] [rt.modbus.internal.ModbusManagerImpl] - Response for read request (FC=3, transaction ID=2778): 0a da 00 00 00 d9 01 03 d6 00 cb 00 69 80 00 00 81 00 8d 00 d3 ff fe 80 00 5a c5 59 d4 5a d4 80 00 80 00 80 00 80 00 ff fe 13 8c ff fe ff 92 ff e3 ff e0 ff d0 00 01 ff 92 ff e3 ff e0 ff d0 00 01 00 00 00 00 00 00 00 00 00 01 03 e8 03 e8 03 e8 03 e8 ff fd ff fc 56 ec ff ff 25 18 ff ff 16 2a ff fe 07 8c 00 00 70 4b 00 00 30 95 00 00 33 59 00 00 20 7b 00 00 ff fc 4c f1 ff ff 24 53 ff ff 15 6f ff fd fa 66 00 00 93 90 00 00 3b 61 00 00 3a 37 00 00 32 42 00 00 80 00 00 00 80 00 00 00 80 00 00 00 80 00 00 00 80 00 00 00 80 00 00 00 80 00 00 00 80 00 00 00 80 00 00 00 80 00 00 00 80 00 00 00 80 00 00 00 80 00 00 00 80 00 00 00 80 00 00 00 80 00 00 00 00 00 00 00 00 00  [operation ID 7891f195-a230-419f-9662-d4a86b18f149]
2020-05-30 10:37:26.531 [TRACE] [modbus.internal.ModbusLibraryWrapper] - Calling read response callback org.openhab.binding.modbus.sunspec.internal.handler.AbstractSunSpecHandler$1@308cc1 for request BasicModbusReadRequestBlueprint@6486a8[slaveId=1,functionCode=READ_MULTIPLE_REGISTERS,start=40069,length=107,maxTries=3]. Response was net.wimpi.modbus.msg.ReadMultipleRegistersResponse@1201b2d
2020-05-30 10:37:26.618 [TRACE] [modbus.internal.ModbusLibraryWrapper] - Called read response callback org.openhab.binding.modbus.sunspec.internal.handler.AbstractSunSpecHandler$1@308cc1 for request BasicModbusReadRequestBlueprint@6486a8[slaveId=1,functionCode=READ_MULTIPLE_REGISTERS,start=40069,length=107,maxTries=3]. Response was net.wimpi.modbus.msg.ReadMultipleRegistersResponse@1201b2d
2020-05-30 10:37:26.622 [TRACE] [ing.ModbusSlaveConnectionFactoryImpl] - Validating endpoint ModbusTCPSlaveEndpoint@1785608[address=192.168.178.38,port=502] connection TCPMasterConnection@fa2c78[socket=Socket[addr=/192.168.178.38,port=502,localport=40010]] -> true
2020-05-30 10:37:26.627 [TRACE] [ing.ModbusSlaveConnectionFactoryImpl] - Passivating connection TCPMasterConnection@fa2c78[socket=Socket[addr=/192.168.178.38,port=502,localport=40010]] for endpoint ModbusTCPSlaveEndpoint@1785608[address=192.168.178.38,port=502]...
2020-05-30 10:37:26.630 [TRACE] [ing.ModbusSlaveConnectionFactoryImpl] - (passivate) Connection TCPMasterConnection@fa2c78[socket=Socket[addr=/192.168.178.38,port=502,localport=40010]] (endpoint ModbusTCPSlaveEndpoint@1785608[address=192.168.178.38,port=502]) age 135ms is over the reconnectAfterMillis=0ms limit or has been connection time (1590827846494) is after the "disconnectBeforeConnectedMillis"=1590813931420 -> disconnecting.
2020-05-30 10:37:26.637 [TRACE] [ing.ModbusSlaveConnectionFactoryImpl] - ...Passivated connection TCPMasterConnection@fa2c78[socket=Socket[addr=/192.168.178.38,port=502,localport=40010]] for endpoint ModbusTCPSlaveEndpoint@1785608[address=192.168.178.38,port=502]
2020-05-30 10:37:26.640 [TRACE] [rt.modbus.internal.ModbusManagerImpl] - returned connection to pool for endpoint ModbusTCPSlaveEndpoint@1785608[address=192.168.178.38,port=502]
2020-05-30 10:37:26.644 [TRACE] [rt.modbus.internal.ModbusManagerImpl] - returning connection for endpoint ModbusTCPSlaveEndpoint@1785608[address=192.168.178.38,port=502] took 22 ms
2020-05-30 10:37:26.647 [TRACE] [rt.modbus.internal.ModbusManagerImpl] - Connection was returned to the pool, ending operation [operation ID 7891f195-a230-419f-9662-d4a86b18f149]
2020-05-30 10:37:26.650 [DEBUG] [rt.modbus.internal.ModbusManagerImpl] - Modbus operation ended, timing info: {total: 176 ms, connection: 46, transaction=4, callback=91} [operation ID 7891f195-a230-419f-9662-d4a86b18f149]
2020-05-30 10:37:26.654 [DEBUG] [rt.modbus.internal.ModbusManagerImpl] - Execution of scheduled (5000ms) poll task BasicPollTaskImpl@5b14fb[request=BasicModbusReadRequestBlueprint@6486a8[slaveId=1,functionCode=READ_MULTIPLE_REGISTERS,start=40069,length=107,maxTries=3],endpoint=ModbusTCPSlaveEndpoint@1785608[address=192.168.178.38,port=502],callback=org.openhab.binding.modbus.sunspec.internal.handler.AbstractSunSpecHandler$1@308cc1] finished at 1590827846653. Was started at millis: 1590827846468 (=duration of 185 millis)

Please tell me if there’s anything I can further do to assist :sweat_smile:

Best,
Sascha

Thank you @Sascha_ seems like I’ve found the problem.

I’ve built a new version, could you please download it from here, and try to see if it fixes your problems?

Thanks!

Thanks for the fast investigation and I’m sure you found the cause of the problem.

However, I was not able to test because of

2020-05-31 09:28:23.148 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.binding.modbus-2.5.6-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.modbus [268]
  Unresolved requirement: Import-Package: org.openhab.io.transport.modbus

        at org.eclipse.osgi.container.Module.start(Module.java:444) ~[org.eclipse.osgi-3.12.100.jar:?]
        at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) ~[org.eclipse.osgi-3.12.100.jar:?]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [bundleFile:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [bundleFile:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520) [bundleFile:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [bundleFile:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [bundleFile:3.6.4]

I’ve first uninstalled the modbus binding from the marketplace. Then I’ve put the downloaded file into the addons directory. Openhab found this and tried to load it but failed with the log above.

I’ve stopped and started OH, sadly to no avail.

I’m on 2.5.5-1.

Thank you!

Hello,

sorry, I should not do these late when I’m tired. I’ve sent you the modbus package instead of the sunspec package.

But it could be the best to replace all three (io.modbus, modbus, modbus.sunspec) with the new version.

Here is the link to the sunspec package:
https://in.sneaker.hu/~mrbig/openhab/org.openhab.binding.modbus.sunspec-2.5.6-SNAPSHOT.jar
And this is the transport package:
https://in.sneaker.hu/~mrbig/openhab/org.openhab.io.transport.modbus-2.5.6-SNAPSHOT.jar
Replacing all three should fix the dependency issues

Thank you again very much!

Still no luck yet :frowning:

2020-05-31 13:04:17.502 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.binding.modbus-2.5.6-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.modbus [49]
  Unresolved requirement: Import-Package: org.openhab.io.transport.modbus.endpoint
    -> Export-Package: org.openhab.io.transport.modbus.endpoint; bundle-symbolic-name="org.openhab.io.transport.modbus"; bundle-version="2.5.6.202005310813"; version="2.5.6"
       org.openhab.io.transport.modbus [53]
         Unresolved requirement: Import-Package: gnu.io; version="[3.12.0,6.0.0)"
  Unresolved requirement: Import-Package: org.openhab.io.transport.modbus
    -> Export-Package: org.openhab.io.transport.modbus; bundle-symbolic-name="org.openhab.io.transport.modbus"; bundle-version="2.5.6.202005310813"; version="2.5.6"; uses:="org.eclipse.smarthome.core.library.types,org.eclipse.smarthome.core.types,org.openhab.io.transport.modbus.endpoint"

        at org.eclipse.osgi.container.Module.start(Module.java:444) ~[org.eclipse.osgi-3.12.100.jar:?]
        at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) ~[org.eclipse.osgi-3.12.100.jar:?]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [bundleFile:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [bundleFile:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1221) [bundleFile:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:515) [bundleFile:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [bundleFile:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [bundleFile:3.6.4]
2020-05-31 13:04:17.565 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.io.transport.modbus-2.5.6-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.io.transport.modbus [53]
  Unresolved requirement: Import-Package: gnu.io; version="[3.12.0,6.0.0)"

        at org.eclipse.osgi.container.Module.start(Module.java:444) ~[org.eclipse.osgi-3.12.100.jar:?]
        at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) ~[org.eclipse.osgi-3.12.100.jar:?]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [bundleFile:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [bundleFile:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1221) [bundleFile:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:515) [bundleFile:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [bundleFile:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [bundleFile:3.6.4]
2020-05-31 13:04:17.590 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.binding.modbus.sunspec-2.5.6-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.modbus.sunspec [55]
  Unresolved requirement: Import-Package: org.openhab.binding.modbus.handler
    -> Export-Package: org.openhab.binding.modbus.handler; bundle-symbolic-name="org.openhab.binding.modbus"; bundle-version="2.5.6.202005302144"; version="2.5.5"; uses:="org.eclipse.smarthome.core.common.registry,org.eclipse.smarthome.core.thing,org.openhab.io.transport.modbus,org.openhab.io.transport.modbus.endpoint"
       org.openhab.binding.modbus [49]
         Unresolved requirement: Import-Package: org.openhab.io.transport.modbus.endpoint
           -> Export-Package: org.openhab.io.transport.modbus.endpoint; bundle-symbolic-name="org.openhab.io.transport.modbus"; bundle-version="2.5.6.202005310813"; version="2.5.6"
              org.openhab.io.transport.modbus [53]
                Unresolved requirement: Import-Package: gnu.io; version="[3.12.0,6.0.0)"
         Unresolved requirement: Import-Package: org.openhab.io.transport.modbus
           -> Export-Package: org.openhab.io.transport.modbus; bundle-symbolic-name="org.openhab.io.transport.modbus"; bundle-version="2.5.6.202005310813"; version="2.5.6"; uses:="org.eclipse.smarthome.core.library.types,org.eclipse.smarthome.core.types,org.openhab.io.transport.modbus.endpoint"
  Unresolved requirement: Import-Package: org.openhab.binding.modbus.discovery
    -> Export-Package: org.openhab.binding.modbus.discovery; bundle-symbolic-name="org.openhab.binding.modbus"; bundle-version="2.5.6.202005302144"; version="2.5.5"; uses:="org.eclipse.smarthome.config.discovery,org.eclipse.smarthome.core.thing,org.openhab.binding.modbus.handler"

        at org.eclipse.osgi.container.Module.start(Module.java:444) ~[org.eclipse.osgi-3.12.100.jar:?]
        at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) ~[org.eclipse.osgi-3.12.100.jar:?]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [bundleFile:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [bundleFile:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1221) [bundleFile:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:515) [bundleFile:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [bundleFile:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [bundleFile:3.6.4]

I’ve restarted, cleaned the cache etc. But there still seems to be something missing :thinking:

@Sascha_, it’s always quite complicated to change a few packages in OH :frowning:

It might be easier to revert to the original packages from 2.5.5, and to replace only the sunspec package.

For this I’ve patched against the 2.5.5 version, and recompiled the necessary packages. Uploaded them here:
http://in.sneaker.hu/~mrbig/openhab/org.openhab.io.transport.modbus-2.5.5.jar
http://in.sneaker.hu/~mrbig/openhab/org.openhab.binding.modbus-2.5.5.jar
http://in.sneaker.hu/~mrbig/openhab/org.openhab.binding.modbus.sunspec-2.5.5.jar

Also make sure that there is only a single version of each of the .jar-s installed, because it’s easy to confuse OH with duplicated packages. You can check the list of bundles installed at the karaf console with the bundle:list command.

I hope this will help, sorry for the trouble

Thank you very much, @mrbig for your support!

I’ve tried everything I can imagine without getting into the IDE :wink:

  • I’ve placed the jars in the addon folder, resulting in missing dependencies
  • Restarted with clean cache, tried again
  • Installed the marketplace modbus binding and replaced the jars in /var/lib/openhab2/tmp/mvn/org/openhab/addons/bundles/, restarted, cleaned the cache…

Currently, the bundle is working again but returning the same values as before. I’m not really sure the replacement of the files caused any side effects :thinking::frowning:

I know dependency hell, especially in java. That’s why I’m trying to avoid it - but for openhab I’m all in :smiley:

Do you have any ideas left?

Hi @Sascha_, now that it’s working again, I would try to lookup the org.openhab.binding.modbus.sunspec package, and replace it with the 2.5.5-jar from the above link, then restart the application. I’ve changed how the total values are parsed, and the reactive power value should be fixed by now as well. It’s just very likely, that OH finds the original jár somewhere.

openhab> bundle:headers 235

openHAB Add-ons :: Bundles :: SunSpec Bundle (235)
--------------------------------------------------
Automatic-Module-Name = org.openhab.binding.modbus.sunspec
Bnd-LastModified = 1589710951215

Using the karaf console, I saw the old version have been used.
Using bundle:uninstall and then placing the sunspec binding into the addon folder and then disabling the things and reenabling caused the new binding to be used.

Good news, the values are a match!

THANK YOU VERY MUCH!!! THANK YOU FOR YOUR EFFORTS AND FAST SUPPORT!!! THANK YOU @mrbig!!!

Please push a PR for others to use this more user friendly.

Thank you @Sascha_ for reporting this, I’ve created a PR on the main repo with the fixes. Hopefully it will make it to the next minor release.

If you happen to find other issues, feel free to contact me.

Hi @Sascha_

Would you mind sharing your bridge/things configuration? I’m trying to setup KSEM with modbus-sunspec bundle in version 2.5.8 and get wrong values as well.

Thanks,
Peter

Hi @pesimon,

you’re welcome :slight_smile:

Bridge:

{
  "statusInfo": {
    "status": "ONLINE",
    "statusDetail": "NONE"
  },
  "editable": true,
  "label": "Kostal Modbus",
  "configuration": {
    "timeBetweenTransactionsMillis": 30,
    "connectMaxTries": 60,
    "reconnectAfterMillis": 0,
    "port": 502,
    "timeBetweenReconnectMillis": 0,
    "host": "192.168.178.38",
    "connectTimeoutMillis": 1000,
    "id": 1,
    "enableDiscovery": true
  },
  "properties": {},
  "UID": "modbus:tcp:8b89f8b6",
  "thingTypeUID": "modbus:tcp",
  "channels": []
}

Thing (KSEM):

{
  "statusInfo": {
    "status": "ONLINE",
    "statusDetail": "NONE"
  },
  "editable": true,
  "label": "Kostal Energy Meter",
  "bridgeUID": "modbus:tcp:8b89f8b6",
  "configuration": {
    "length": 61,
    "refresh": 1,
    "maxTries": 3,
    "address": 40000
  },
  "properties": {
    "serialNumber": "73800057",
    "blockLength": "107.0",
    "vendor": "KOSTAL",
    "model": "KOSTAL Smart Energy Meter",
    "version": "1.1.2",
    "blockAddress": "40069.0",
    "uniqueAddress": "modbus:tcp:8b89f8b6:40069"
  },
  "UID": "modbus:meter-wye-phase:8b89f8b6:40069",
  "thingTypeUID": "modbus:meter-wye-phase",
  "channels": [
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acGeneral#ac-total-current",
      "id": "acGeneral#ac-total-current",
      "channelTypeUID": "modbus:ac-total-current-type",
      "itemType": "Number:ElectricCurrent",
      "kind": "STATE",
      "label": "AC Total Current Value",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acGeneral#ac-average-voltage-to-n",
      "id": "acGeneral#ac-average-voltage-to-n",
      "channelTypeUID": "modbus:ac-average-voltage-to-n-type",
      "itemType": "Number:ElectricPotential",
      "kind": "STATE",
      "label": "Average Line To Neutral AC Voltage",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acGeneral#ac-average-voltage-to-next",
      "id": "acGeneral#ac-average-voltage-to-next",
      "channelTypeUID": "modbus:ac-average-voltage-to-next-type",
      "itemType": "Number:ElectricPotential",
      "kind": "STATE",
      "label": "Average Line To Line AC Voltage",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acGeneral#ac-frequency",
      "id": "acGeneral#ac-frequency",
      "channelTypeUID": "modbus:ac-frequency-type",
      "itemType": "Number:Frequency",
      "kind": "STATE",
      "label": "AC Frequency Value",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [
        "KostalEnergyMeter_AcGeneral_TotalRealPowerValue"
      ],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acGeneral#ac-total-real-power",
      "id": "acGeneral#ac-total-real-power",
      "channelTypeUID": "modbus:ac-total-real-power-type",
      "itemType": "Number:Power",
      "kind": "STATE",
      "label": "Total Real Power Value",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acGeneral#ac-total-apparent-power",
      "id": "acGeneral#ac-total-apparent-power",
      "channelTypeUID": "modbus:ac-total-apparent-power-type",
      "itemType": "Number:Power",
      "kind": "STATE",
      "label": "Total Apparent Power Value",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acGeneral#ac-total-reactive-power",
      "id": "acGeneral#ac-total-reactive-power",
      "channelTypeUID": "modbus:ac-total-reactive-power-type",
      "itemType": "Number:Power",
      "kind": "STATE",
      "label": "Total Reactive Power Value",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acGeneral#ac-average-power-factor",
      "id": "acGeneral#ac-average-power-factor",
      "channelTypeUID": "modbus:ac-average-power-factor-type",
      "itemType": "Number:Dimensionless",
      "kind": "STATE",
      "label": "Average AC Power Factor",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [
        "KostalEnergyMeter_AcGeneral_TotalRealEnergyExported"
      ],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acGeneral#ac-total-exported-real-energy",
      "id": "acGeneral#ac-total-exported-real-energy",
      "channelTypeUID": "modbus:ac-total-exported-real-energy-type",
      "itemType": "Number:Energy",
      "kind": "STATE",
      "label": "Total Real Energy Exported",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [
        "KostalEnergyMeter_AcGeneral_TotalRealEnergyImported"
      ],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acGeneral#ac-total-imported-real-energy",
      "id": "acGeneral#ac-total-imported-real-energy",
      "channelTypeUID": "modbus:ac-total-imported-real-energy-type",
      "itemType": "Number:Energy",
      "kind": "STATE",
      "label": "Total Real Energy Imported",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acGeneral#ac-total-exported-apparent-energy",
      "id": "acGeneral#ac-total-exported-apparent-energy",
      "channelTypeUID": "modbus:ac-total-exported-apparent-energy-type",
      "itemType": "Number:Energy",
      "kind": "STATE",
      "label": "Total Apparent Energy Exported",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acGeneral#ac-total-imported-apparent-energy",
      "id": "acGeneral#ac-total-imported-apparent-energy",
      "channelTypeUID": "modbus:ac-total-imported-apparent-energy-type",
      "itemType": "Number:Energy",
      "kind": "STATE",
      "label": "Total Apparent Energy Imported",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acGeneral#ac-total-imported-reactive-energy-q1",
      "id": "acGeneral#ac-total-imported-reactive-energy-q1",
      "channelTypeUID": "modbus:ac-total-imported-reactive-energy-q1-type",
      "itemType": "Number:Energy",
      "kind": "STATE",
      "label": "Total Reactive Energy Imported Quadrant 1",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acGeneral#ac-total-imported-reactive-energy-q2",
      "id": "acGeneral#ac-total-imported-reactive-energy-q2",
      "channelTypeUID": "modbus:ac-total-imported-reactive-energy-q2-type",
      "itemType": "Number:Energy",
      "kind": "STATE",
      "label": "Total Reactive Energy Imported Quadrant 2",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acGeneral#ac-total-exported-reactive-energy-q3",
      "id": "acGeneral#ac-total-exported-reactive-energy-q3",
      "channelTypeUID": "modbus:ac-total-exported-reactive-energy-q3-type",
      "itemType": "Number:Energy",
      "kind": "STATE",
      "label": "Total Reactive Energy Exported Quadrant 3",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acGeneral#ac-total-exported-reactive-energy-q4",
      "id": "acGeneral#ac-total-exported-reactive-energy-q4",
      "channelTypeUID": "modbus:ac-total-exported-reactive-energy-q4-type",
      "itemType": "Number:Energy",
      "kind": "STATE",
      "label": "Total Reactive Energy Exported Quadrant 4",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseA#ac-phase-current",
      "id": "acPhaseA#ac-phase-current",
      "channelTypeUID": "modbus:ac-phase-current-type",
      "itemType": "Number:ElectricCurrent",
      "kind": "STATE",
      "label": "AC Phase Current Value",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseA#ac-voltage-to-n",
      "id": "acPhaseA#ac-voltage-to-n",
      "channelTypeUID": "modbus:ac-voltage-to-n-type",
      "itemType": "Number:ElectricPotential",
      "kind": "STATE",
      "label": "AC Voltage Phase To N Value",
      "description": "This phase's AC voltage relative to N line",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseA#ac-voltage-to-next",
      "id": "acPhaseA#ac-voltage-to-next",
      "channelTypeUID": "modbus:ac-voltage-to-next-type",
      "itemType": "Number:ElectricPotential",
      "kind": "STATE",
      "label": "AC Voltage",
      "description": "This phase's AC voltage relative to the next phase",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseA#ac-real-power",
      "id": "acPhaseA#ac-real-power",
      "channelTypeUID": "modbus:ac-real-power-type",
      "itemType": "Number:Power",
      "kind": "STATE",
      "label": "AC Real Power Value",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseA#ac-apparent-power",
      "id": "acPhaseA#ac-apparent-power",
      "channelTypeUID": "modbus:ac-apparent-power-type",
      "itemType": "Number:Power",
      "kind": "STATE",
      "label": "AC Apparent Power Value",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseA#ac-reactive-power",
      "id": "acPhaseA#ac-reactive-power",
      "channelTypeUID": "modbus:ac-reactive-power-type",
      "itemType": "Number:Power",
      "kind": "STATE",
      "label": "AC Reactive Power Value",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseA#ac-power-factor",
      "id": "acPhaseA#ac-power-factor",
      "channelTypeUID": "modbus:ac-power-factor-type",
      "itemType": "Number:Dimensionless",
      "kind": "STATE",
      "label": "AC Power Factor",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseA#ac-exported-real-energy",
      "id": "acPhaseA#ac-exported-real-energy",
      "channelTypeUID": "modbus:ac-exported-real-energy-type",
      "itemType": "Number:Energy",
      "kind": "STATE",
      "label": "Real Energy Exported",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseA#ac-imported-real-energy",
      "id": "acPhaseA#ac-imported-real-energy",
      "channelTypeUID": "modbus:ac-imported-real-energy-type",
      "itemType": "Number:Energy",
      "kind": "STATE",
      "label": "Real Energy Imported",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseA#ac-exported-apparent-energy",
      "id": "acPhaseA#ac-exported-apparent-energy",
      "channelTypeUID": "modbus:ac-exported-apparent-energy-type",
      "itemType": "Number:Energy",
      "kind": "STATE",
      "label": "Apparent Energy Exported",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseA#ac-imported-apparent-energy",
      "id": "acPhaseA#ac-imported-apparent-energy",
      "channelTypeUID": "modbus:ac-imported-apparent-energy-type",
      "itemType": "Number:Energy",
      "kind": "STATE",
      "label": "Apparent Energy Imported",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseA#ac-imported-reactive-energy-q1",
      "id": "acPhaseA#ac-imported-reactive-energy-q1",
      "channelTypeUID": "modbus:ac-imported-reactive-energy-q1-type",
      "itemType": "Number:Energy",
      "kind": "STATE",
      "label": "Reactive Energy Imported Quadrant 1",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseA#ac-imported-reactive-energy-q2",
      "id": "acPhaseA#ac-imported-reactive-energy-q2",
      "channelTypeUID": "modbus:ac-imported-reactive-energy-q2-type",
      "itemType": "Number:Energy",
      "kind": "STATE",
      "label": "Reactive Energy Imported Quadrant 2",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseA#ac-exported-reactive-energy-q3",
      "id": "acPhaseA#ac-exported-reactive-energy-q3",
      "channelTypeUID": "modbus:ac-exported-reactive-energy-q3-type",
      "itemType": "Number:Energy",
      "kind": "STATE",
      "label": "Reactive Energy Exported Quadrant 3",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseA#ac-exported-reactive-energy-q4",
      "id": "acPhaseA#ac-exported-reactive-energy-q4",
      "channelTypeUID": "modbus:ac-exported-reactive-energy-q4-type",
      "itemType": "Number:Energy",
      "kind": "STATE",
      "label": "Reactive Energy Exported Quadrant 4",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseB#ac-phase-current",
      "id": "acPhaseB#ac-phase-current",
      "channelTypeUID": "modbus:ac-phase-current-type",
      "itemType": "Number:ElectricCurrent",
      "kind": "STATE",
      "label": "AC Phase Current Value",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseB#ac-voltage-to-n",
      "id": "acPhaseB#ac-voltage-to-n",
      "channelTypeUID": "modbus:ac-voltage-to-n-type",
      "itemType": "Number:ElectricPotential",
      "kind": "STATE",
      "label": "AC Voltage Phase To N Value",
      "description": "This phase's AC voltage relative to N line",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseB#ac-voltage-to-next",
      "id": "acPhaseB#ac-voltage-to-next",
      "channelTypeUID": "modbus:ac-voltage-to-next-type",
      "itemType": "Number:ElectricPotential",
      "kind": "STATE",
      "label": "AC Voltage",
      "description": "This phase's AC voltage relative to the next phase",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseB#ac-real-power",
      "id": "acPhaseB#ac-real-power",
      "channelTypeUID": "modbus:ac-real-power-type",
      "itemType": "Number:Power",
      "kind": "STATE",
      "label": "AC Real Power Value",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseB#ac-apparent-power",
      "id": "acPhaseB#ac-apparent-power",
      "channelTypeUID": "modbus:ac-apparent-power-type",
      "itemType": "Number:Power",
      "kind": "STATE",
      "label": "AC Apparent Power Value",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseB#ac-reactive-power",
      "id": "acPhaseB#ac-reactive-power",
      "channelTypeUID": "modbus:ac-reactive-power-type",
      "itemType": "Number:Power",
      "kind": "STATE",
      "label": "AC Reactive Power Value",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseB#ac-power-factor",
      "id": "acPhaseB#ac-power-factor",
      "channelTypeUID": "modbus:ac-power-factor-type",
      "itemType": "Number:Dimensionless",
      "kind": "STATE",
      "label": "AC Power Factor",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseB#ac-exported-real-energy",
      "id": "acPhaseB#ac-exported-real-energy",
      "channelTypeUID": "modbus:ac-exported-real-energy-type",
      "itemType": "Number:Energy",
      "kind": "STATE",
      "label": "Real Energy Exported",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseB#ac-imported-real-energy",
      "id": "acPhaseB#ac-imported-real-energy",
      "channelTypeUID": "modbus:ac-imported-real-energy-type",
      "itemType": "Number:Energy",
      "kind": "STATE",
      "label": "Real Energy Imported",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseB#ac-exported-apparent-energy",
      "id": "acPhaseB#ac-exported-apparent-energy",
      "channelTypeUID": "modbus:ac-exported-apparent-energy-type",
      "itemType": "Number:Energy",
      "kind": "STATE",
      "label": "Apparent Energy Exported",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseB#ac-imported-apparent-energy",
      "id": "acPhaseB#ac-imported-apparent-energy",
      "channelTypeUID": "modbus:ac-imported-apparent-energy-type",
      "itemType": "Number:Energy",
      "kind": "STATE",
      "label": "Apparent Energy Imported",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseB#ac-imported-reactive-energy-q1",
      "id": "acPhaseB#ac-imported-reactive-energy-q1",
      "channelTypeUID": "modbus:ac-imported-reactive-energy-q1-type",
      "itemType": "Number:Energy",
      "kind": "STATE",
      "label": "Reactive Energy Imported Quadrant 1",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseB#ac-imported-reactive-energy-q2",
      "id": "acPhaseB#ac-imported-reactive-energy-q2",
      "channelTypeUID": "modbus:ac-imported-reactive-energy-q2-type",
      "itemType": "Number:Energy",
      "kind": "STATE",
      "label": "Reactive Energy Imported Quadrant 2",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseB#ac-exported-reactive-energy-q3",
      "id": "acPhaseB#ac-exported-reactive-energy-q3",
      "channelTypeUID": "modbus:ac-exported-reactive-energy-q3-type",
      "itemType": "Number:Energy",
      "kind": "STATE",
      "label": "Reactive Energy Exported Quadrant 3",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseB#ac-exported-reactive-energy-q4",
      "id": "acPhaseB#ac-exported-reactive-energy-q4",
      "channelTypeUID": "modbus:ac-exported-reactive-energy-q4-type",
      "itemType": "Number:Energy",
      "kind": "STATE",
      "label": "Reactive Energy Exported Quadrant 4",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseC#ac-phase-current",
      "id": "acPhaseC#ac-phase-current",
      "channelTypeUID": "modbus:ac-phase-current-type",
      "itemType": "Number:ElectricCurrent",
      "kind": "STATE",
      "label": "AC Phase Current Value",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseC#ac-voltage-to-n",
      "id": "acPhaseC#ac-voltage-to-n",
      "channelTypeUID": "modbus:ac-voltage-to-n-type",
      "itemType": "Number:ElectricPotential",
      "kind": "STATE",
      "label": "AC Voltage Phase To N Value",
      "description": "This phase's AC voltage relative to N line",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseC#ac-voltage-to-next",
      "id": "acPhaseC#ac-voltage-to-next",
      "channelTypeUID": "modbus:ac-voltage-to-next-type",
      "itemType": "Number:ElectricPotential",
      "kind": "STATE",
      "label": "AC Voltage",
      "description": "This phase's AC voltage relative to the next phase",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseC#ac-real-power",
      "id": "acPhaseC#ac-real-power",
      "channelTypeUID": "modbus:ac-real-power-type",
      "itemType": "Number:Power",
      "kind": "STATE",
      "label": "AC Real Power Value",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseC#ac-apparent-power",
      "id": "acPhaseC#ac-apparent-power",
      "channelTypeUID": "modbus:ac-apparent-power-type",
      "itemType": "Number:Power",
      "kind": "STATE",
      "label": "AC Apparent Power Value",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseC#ac-reactive-power",
      "id": "acPhaseC#ac-reactive-power",
      "channelTypeUID": "modbus:ac-reactive-power-type",
      "itemType": "Number:Power",
      "kind": "STATE",
      "label": "AC Reactive Power Value",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseC#ac-power-factor",
      "id": "acPhaseC#ac-power-factor",
      "channelTypeUID": "modbus:ac-power-factor-type",
      "itemType": "Number:Dimensionless",
      "kind": "STATE",
      "label": "AC Power Factor",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseC#ac-exported-real-energy",
      "id": "acPhaseC#ac-exported-real-energy",
      "channelTypeUID": "modbus:ac-exported-real-energy-type",
      "itemType": "Number:Energy",
      "kind": "STATE",
      "label": "Real Energy Exported",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseC#ac-imported-real-energy",
      "id": "acPhaseC#ac-imported-real-energy",
      "channelTypeUID": "modbus:ac-imported-real-energy-type",
      "itemType": "Number:Energy",
      "kind": "STATE",
      "label": "Real Energy Imported",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseC#ac-exported-apparent-energy",
      "id": "acPhaseC#ac-exported-apparent-energy",
      "channelTypeUID": "modbus:ac-exported-apparent-energy-type",
      "itemType": "Number:Energy",
      "kind": "STATE",
      "label": "Apparent Energy Exported",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseC#ac-imported-apparent-energy",
      "id": "acPhaseC#ac-imported-apparent-energy",
      "channelTypeUID": "modbus:ac-imported-apparent-energy-type",
      "itemType": "Number:Energy",
      "kind": "STATE",
      "label": "Apparent Energy Imported",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseC#ac-imported-reactive-energy-q1",
      "id": "acPhaseC#ac-imported-reactive-energy-q1",
      "channelTypeUID": "modbus:ac-imported-reactive-energy-q1-type",
      "itemType": "Number:Energy",
      "kind": "STATE",
      "label": "Reactive Energy Imported Quadrant 1",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseC#ac-imported-reactive-energy-q2",
      "id": "acPhaseC#ac-imported-reactive-energy-q2",
      "channelTypeUID": "modbus:ac-imported-reactive-energy-q2-type",
      "itemType": "Number:Energy",
      "kind": "STATE",
      "label": "Reactive Energy Imported Quadrant 2",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseC#ac-exported-reactive-energy-q3",
      "id": "acPhaseC#ac-exported-reactive-energy-q3",
      "channelTypeUID": "modbus:ac-exported-reactive-energy-q3-type",
      "itemType": "Number:Energy",
      "kind": "STATE",
      "label": "Reactive Energy Exported Quadrant 3",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    },
    {
      "linkedItems": [],
      "uid": "modbus:meter-wye-phase:8b89f8b6:40069:acPhaseC#ac-exported-reactive-energy-q4",
      "id": "acPhaseC#ac-exported-reactive-energy-q4",
      "channelTypeUID": "modbus:ac-exported-reactive-energy-q4-type",
      "itemType": "Number:Energy",
      "kind": "STATE",
      "label": "Reactive Energy Exported Quadrant 4",
      "defaultTags": [],
      "properties": {},
      "configuration": {}
    }
  ],
  "location": "Keller"
}

Hope that helps,
Sascha

Thanks a lot… it’s working – address=40069 and length=107 did the trick. KSEM [ documentation describes start of SunSpec register at address 40071, which confused me.

Would be a good idea to add this to the sample section

Full ksem.things config:

Bridge modbus:tcp:bridge [ host="ksem", port=502, id=1,  enableDiscovery=true ]
{
    Thing modbus:meter-wye-phase:bridge:40069 "Kostal Smart Engery Meter" (modbus:tcp:modbusbridge) [ address=40069, length=107, maxTries=1   ]
}

I guess you used the PaperUI for configuration?

Comment; that’s a bit, uhh, insistent. Usually 1 or 2 TCP connect attempts is considered sufficient.