LswLogger Binding [Sofar/Omnik/IE wifi/eth stick for SolarmanPV]

logo

This binding lets you connect to LSW logger for Sofar/Omnik/IE for SolarmanPV based on protocol v5 (iGEN tech).

Supported Things

As for now two families of stick loggers are supported.

LSW Logger

Supports following:

Inverter Stick firmware Notes
Sofar Solar: SF4ES005 LSW3_15_FFFF_1.0.57
LSW3_15_FFFF_1.0.65
ME_08_2701_2.06

Deye01

Supports Deye01

Please note - some other sticks may be supported by this thing, though they were not tested.

G3 Hyd (beta)

Supports Sofar G3, HYD 5-xxKTL-3ph, ZCS Azzurro 3-Phase familiy

This thing is beta

Debug logger (beta)

Supports basically any solarman like logger but it is not designed to expose any particular data. Instead it can be used to tinker around modbus registers exposed by an inverter.

In case of problem with other thing types from the binding, like not drawing appropriate data from your logger/inverter - you may find this thing type useful:

  1. Configure this thing.
  2. For each pair of register you find should work with your inverter make some tests and note the results:
    • Note values from lastReponse channel
    • Note any logs you catch from the binding
  3. File an issue on github with noted data, and information about your logger (like SN format, firmware version and type) and inverter (name, model, firmware versionm etc).
  4. Wait for my help :slight_smile:

During setup of this thing you enter serial number of your logger, ip and port along with first and last modbus registers you want to be requested. Then the raw response from the inverter/logger is presented as lastResponse channel.

Currently known registers:

First register Last register Inverter
0x0000 0x0027 SF4ES005
0x0404 0x0420 Sofar G3, HYD 5-20KTL-3PH, ZCS Azzurro 3-Phase (HYD6000 ZSS)
0x0484 0x04AF Same as above
0x0584 0x0589 Same as above
0x0604 0x060A Same as above
0x0684 0x069B Same as above
0x0200 0x0255 Sofar HYD3000/4000/5000/6000-ES
0x10B0 0x10BC Same as above
0x0200 0x0245 Solarman ME3000-SP
0x10B0 0x10BC Solarman ME3000-SP
0x0400 0x042B # ZCS Azzurro 3-phase non-hybrid inverters with LSW-3 WiFi logger with SN 23xxxxxxxx and FW SW3_15_270A_1.53: 3PH 3.3KTL-V3, 3PH 4.4KTL-V3, 3PH 5.5KTL-V3, 3PH 6.6KTL-V3
Not tested, but could probably work: ZCS Azzurro 3PH 8.8KTL-V3, ZCS Azzurro 3PH 11KTL-V3, ZCS Azzurro 3PH 12KTL-V3, SOFAR Solar 4.4KTLX-G3, SOFAR Solar 5.5KTLX-G3, SOFAR Solar 6.6KTLX-G3, SOFAR Solar 8.8KTLX-G3, SOFAR Solar 11KTLX-G3, SOFAR Solar 12KTLX-G3
0x0482 0x04A4 Same as above
0x0582 0x0589 Same as above
0x0682 0x068B Same as above
0x0003 0x0080 SUN600G3 (DEYE/VESDAS), SUN2000G3
0x0003 0x0070 DEYE Hybrid
0x0096 0x00f8 Same as above
0x0003 0x0059 SUN-8/12K-SG04LP3-EU
0x0202 0x022E Same as above
0x024A 0x024F Same as above
0x0256 0x027C Same as above
0x0284 0x028D Same as above
0x02A0 0x02A7 Same as above

Discovery

Binding does not support discovery.

Thing Configuration

Each thing must be configured with following properties

Property Value Description
hostname IP or hostname IP or network resolvable name of your logger stick
port defaults to 8899 Port for communicating with logger, mostly 8899
serialNumber S/N, number Serial number of your stick logger
refreshTime Period in seconds Time between next request for data from logger
retriesCount Count as number Reconnecting tries after which logger will be marked offline
maxOfflineTime Period in minutes Max period in minutes afer which logger is assumed to broken
startRegister First modbus register Only for debug thing. Example value 0x0000
endRegister Last modbus register Only for debug thing. Example value 0x0027

Channels

Available channels differs between things and your inverter.

Suppport this project

You can support this project by sponsoring its maintainers:
Piotr Bojko

Changelog

Please see all release notes here.

Resources

org.openhab.binding.lswlogger-0.5.0.jar

Release 0.5.0
Release 0.4.1
Release 0.4.0
Release 0.3.0
Release 0.2.0

3 Likes

@Piotr_Bojko For me with a SN 23… stick with the firmware LSW3_15_270A_1.53 the main values remain NULL. Only some temperature values are readed properly. Is there any plan to update that beta version? I would support that. thank you!

Hello, I have the same firmware and a 23xxx serial number. I have only the β€œonline” value as β€œON”, others are null. I see seldom messages like this on the log:

[WARN ] [al.protocolv5.UnknownResponseHandler] - Unknown response, length 14: A5:01:00:10:47:00:83:44:EA:3D:8D:00:D3:15:

I can volunteer to be a beta tester for the SN23 thing

Hi, for all want to help to troubleshoot the binding within theirs inverter and logger - now there is a debug thing type. Please read the docs about it. Tinker with it and share results on binding github - GitHub - ptrbojko/openhab-lsw4inverter-binding (file an issue)

2 Likes

I use following ECMA-Code to format the monster-string.

var log = Java.type('org.slf4j.LoggerFactory').getLogger('org.openhab.rule.' + ctx.ruleUID);

var sun = items.getItem("Debug_thing_Debug_response");

var bytes = sun.state.split(":");

for(let i = 0;i< bytes.length;i++){
  log.info(i + ": " + parseInt(bytes[i],16));  
}

But I was not able to link any Numbers yet, not even with the base from here.

But I have not invested a lot of time yet.

Thought it might help someone.

Hi Piotr.
I have an Omnikosl inverter.
My logger died but I bought a new one the same LSW-3 1727… Firmware: LSW3_14_1E03_1.20 from the Afore inverter.
The logger works but cannot connect to my inverter (omniksol). Is there anything I can do to make it find it?

I have no idea on how to tinker about such case. Maybe ask support of omniksol? They should be able to reconfigure your logger to query proper modbus addresses of your inverter.

I’ve released new version 0.4.0 of the binging:

  1. OH 4.x is now supported.
  2. OH 3.x support is dropped.
  3. Engine is rewritten to speed up adding new modbus registers and new inverters.
  4. Support for G3 Hyd (beta) is added
  5. Support for Deye is added (though not all Deye inverters).

You can support more progress on this binding by me here - Sponsor @ptrbojko on GitHub Sponsors Β· GitHub . It would me much appreciated in this hard times :slight_smile:

Are you able to determine whether one of following definitions of registers may be suit to your inverter? https://github.com/StephanJoubert/home_assistant_solarman/tree/main/custom_components/solarman/inverter_definitions

Hi Piotr,

I got issue when trying to install the binding v0.4.0.
The binding is installed but couldn’t activate it.
Check my console log below:

openhab> bundle:list 301
START LEVEL 100 , List Threshold: 50
ID β”‚ State β”‚ Lvl β”‚ Version β”‚ Name
────┼───────────┼─────┼─────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
301 β”‚ Installed β”‚ 80 β”‚ 0.4.0 β”‚ openHAB Add-ons :: Bundles :: LswLogger Binding
openhab> bundle:status 301
Installed
openhab> bundle:start 301
Error executing command: Error executing command on bundles:
Error starting bundle 301: Could not resolve module: org.openhab.binding.lswlogger [301]
Unresolved requirement: Require-Capability: osgi.extender; filter:=β€œ(&(osgi.extender=osgi.component)(version>=1.5.0)(!(version>=2.0.0)))”

My Openhab version is 3.4.4,

and i hope i checked the right component for osgi version:
openhab> bundle:update org.osgi.service.jaxrs
openhab> bundle:list 226
START LEVEL 100 , List Threshold: 50
ID β”‚ State β”‚ Lvl β”‚ Version β”‚ Name
────┼────────┼─────┼────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
226 β”‚ Active β”‚ 80 β”‚ 1.0.0.201802012106 β”‚ org.osgi:org.osgi.service.jaxrs

During latest cleaning I’ve bumbed the addon to support oh4 and drop support for oh3. I have not really thought about this, pros and cons. It was just simpler to me to follow current version of OH.

Are you planning to step into OH4 or rather wait?

Hi Piotr,

it was quite a journey, I had to upgrade Debian, OH, Java, … to get to v4.
Now it seems to be working (the thing is online), but the values are not refreshed?
I can see the following values:
Online - ON
OperationState - Fault
TotalGenerationTime - 38
TodayGenerationTime - 24
everyhting else is 0.

and I can see the following in the log:

2024-02-26 19:27:18.327 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:
java.lang.ArrayIndexOutOfBoundsException: Index 1024 out of bounds for length 5

  •    at org.openhab.binding.lswlogger.internal.bytebuffer.ExtractingBuilder$ShortExtractor.lambda$mappedTo$3(ExtractingBuilder.java:75) ~[?:?]*
    
  •    at java.util.function.Function.lambda$andThen$1(Function.java:88) ~[?:?]*
    
  •    at org.openhab.binding.lswlogger.internal.protocolv5.modbus.ModbusRegisterDefinitionBuilder.lambda$add$0(ModbusRegisterDefinitionBuilder.java:37) ~[?:?]*
    
  •    at org.openhab.binding.lswlogger.internal.protocolv5.modbus.ModbusRegistryValueDefinition.accept(ModbusRegistryValueDefinition.java:41) ~[?:?]*
    
  •    at org.openhab.binding.lswlogger.internal.protocolv5.modbus.ByteBufferConsumer.lambda$accept$0(ByteBufferConsumer.java:35) ~[?:?]*
    
  •    at java.util.ArrayList.forEach(ArrayList.java:1511) ~[?:?]*
    
  •    at org.openhab.binding.lswlogger.internal.protocolv5.modbus.ByteBufferConsumer.accept(ByteBufferConsumer.java:26) ~[?:?]*
    
  •    at org.openhab.binding.lswlogger.internal.protocolv5.AbstractDataResponseHandler.extract(AbstractDataResponseHandler.java:40) ~[?:?]*
    
  •    at org.openhab.binding.lswlogger.internal.protocolv5.AbstractDataResponseHandler.handle(AbstractDataResponseHandler.java:29) ~[?:?]*
    
  •    at org.openhab.binding.lswlogger.internal.protocolv5.ResponseDispatcher.accept(ResponseDispatcher.java:32) ~[?:?]*
    
  •    at org.openhab.binding.lswlogger.internal.protocolv5.states.ReadingResponseState$ReadingHandler.onRead(ReadingResponseState.java:69) ~[?:?]*
    
  •    at org.openhab.binding.lswlogger.internal.connection.Channel.read(Channel.java:124) ~[?:?]*
    
  •    at org.openhab.binding.lswlogger.internal.protocolv5.states.ReadingResponseState$ReadingHandler.run(ReadingResponseState.java:62) ~[?:?]*
    
  •    at org.openhab.binding.lswlogger.internal.protocolv5.states.StateMachine$MetaRunnableWrapper.handle(StateMachine.java:139) ~[?:?]*
    
  •    at org.openhab.binding.lswlogger.internal.protocolv5.states.StateMachine.run(StateMachine.java:84) ~[?:?]*
    
  •    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?]*
    
  •    at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]*
    
  •    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?]*
    
  •    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]*
    
  •    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]*
    
  •    at java.lang.Thread.run(Thread.java:840) [?:?]*
    

I have created the basic lsw logger thing:

Shouldn’t you try thing called G3 Hyd (beta) ? It should support Sofar G3, HYD 5-20KTL-3ph, ZCS Azzurro 3-Phase families. It is based on modbus register definitions from here - https://github.com/StephanJoubert/home_assistant_solarman/blob/main/custom_components/solarman/inverter_definitions/sofar_g3hyd.yaml

Hi Piotr,

I have tried that one already before but got error when iniciating the thing:

Status:

UNINITIALIZED

HANDLER_INITIALIZING_ERROR

UID segment ’ loadSysActivePower’ contains invalid characters. The last segment of the channel UID must match the pattern β€˜[\w-]|[\w-]#[\w-]*’.

So I skipped to the default one.
Do you need any other log for the issue?

Thanks.

I see the bug for this Thing type. I will fix it in a 2-3 days.

1 Like

Waiting for the next release then. Thanks.

Hi Piotr,

have you managed to fix that one?
Thanks.

Ive released a patch 0.4.1

Hi,

I can see some values for the items now like:
Ambient temperature,
Module temperature,
Online,
Operating state,
Radiator temperature,

but not even one for …energy, …power, phase… Nothing really important.
Unfortunatelly useless now :frowning:

You can see the update procedure in the log:

2024-03-05 08:20:30.600 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item β€˜KeContact_EV_Charging_Station_System_Uptime’ changed from 301393 s to 301396 s
2024-03-05 08:20:30.600 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item β€˜G3_Hyd_beta_Online’ updated to ON
2024-03-05 08:20:30.600 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item β€˜G3_Hyd_beta_Operating_state’ updated to grid-connected
2024-03-05 08:20:30.601 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item β€˜G3_Hyd_beta_Ambient_temperature_1’ updated to 42 Β°C
2024-03-05 08:20:30.601 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item β€˜G3_Hyd_beta_Ambient_temperature_2’ updated to 0 Β°C
2024-03-05 08:20:30.601 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item β€˜G3_Hyd_beta_Radiator_temperature_1’ updated to 35 Β°C
2024-03-05 08:20:30.601 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item β€˜G3_Hyd_beta_Radiator_temperature_1’ changed from 34 Β°C to 35 Β°C
2024-03-05 08:20:30.601 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item β€˜G3_Hyd_beta_Radiator_temperature_3’ updated to 0 Β°C
2024-03-05 08:20:30.601 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item β€˜G3_Hyd_beta_Radiator_temperature_4’ updated to 0 Β°C
2024-03-05 08:20:30.601 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item β€˜G3_Hyd_beta_Radiator_temperature_5’ updated to 0 Β°C
2024-03-05 08:20:30.601 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item β€˜G3_Hyd_beta_Radiator_temperature_6’ updated to 0 Β°C
2024-03-05 08:20:30.601 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item β€˜G3_Hyd_beta_Module_temperature_1’ updated to 38 Β°C
2024-03-05 08:20:30.601 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item β€˜G3_Hyd_beta_Module_temperature_1’ changed from 37 Β°C to 38 Β°C
2024-03-05 08:20:30.602 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item β€˜G3_Hyd_beta_Module_temperature_2’ updated to 0 Β°C
2024-03-05 08:20:30.602 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item β€˜G3_Hyd_beta_Module_temperature_3’ updated to 18457 Β°C
2024-03-05 08:20:30.602 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item β€˜G3_Hyd_beta_Module_temperature_3’ changed from 31001 Β°C to 18457 Β°C
2024-03-05 08:20:30.602 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item β€˜G3_Hyd_beta_Online’ updated to ON
2024-03-05 08:20:31.115 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item β€˜ZehnderWHR930VentilationSystem_OutdoorTemperatureIncoming’ updated to UNDEF

Any hint?
Thanks.

I;ve released new version. @fcela You may ugrade - maybe some things will go further for you