catalinsanda / org.openhab.binding.solarman

Binding used to communicate with Solarman (IGEN-Tech) v5 based solar inverter data loggers
Eclipse Public License 2.0
9 stars 3 forks source link

Getting "Duplicate channels solarman:logger:31864edd38:solar#pv1_voltage" on deye_4mppt during initialization #6

Closed joba642 closed 1 year ago

joba642 commented 1 year ago

Hi, i am using a DEYE SUN2000g3-eu-230 Inverter with the binding on openhab 4.0.0M3 and getting this Error:

2023-06-08 08:11:08.780 [WARN ] [core.thing.internal.ThingManagerImpl] - Channel types or config descriptions for thing 'solarman:logger:31864edd38' are missing in the respective registry for more than 120s. In case it does not happen immediately after an upgrade, it should be fixed in the binding. 2023-06-08 08:11:08.804 [WARN ] [core.thing.internal.ThingManagerImpl] - Failed to normalize configuration for thing 'solarman:logger:31864edd38': {thing/channel=Type description solarman:grid_current for solarman:logger:31864edd38:grid#grid_current not found, although we checked the presence before.} 2023-06-08 08:11:09.821 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.initialize()' on 'org.openhab.binding.solarman.internal.SolarmanLoggerHandler@781abdeb': Duplicate channels solarman:logger:31864edd38:solar#pv1_voltage java.lang.IllegalArgumentException: Duplicate channels solarman:logger:31864edd38:solar#pv1_voltage at org.openhab.core.thing.util.ThingHelper.ensureUniqueChannels(ThingHelper.java:135) ~[?:?] at org.openhab.core.thing.util.ThingHelper.ensureUniqueChannels(ThingHelper.java:111) ~[?:?] at org.openhab.core.thing.binding.builder.ThingBuilder.withChannels(ThingBuilder.java:150) ~[?:?] at org.openhab.binding.solarman.internal.SolarmanLoggerHandler.setupChannelsForInverterDefinition(SolarmanLoggerHandler.java:352) ~[?:?] at org.openhab.binding.solarman.internal.SolarmanLoggerHandler.initialize(SolarmanLoggerHandler.java:134) ~[?:?] at jdk.internal.reflect.GeneratedMethodAccessor44.invoke(Unknown Source) ~[?:?] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:147) ~[?:?] at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) ~[?:?] at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?] 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:833) ~[?:?] 2023-06-08 08:11:09.838 [ERROR] [core.thing.internal.ThingManagerImpl] - Exception occurred while initializing handler of thing 'solarman:logger:31864edd38': Duplicate channels solarman:logger:31864edd38:solar#pv1_voltage java.lang.IllegalArgumentException: Duplicate channels solarman:logger:31864edd38:solar#pv1_voltage at org.openhab.core.thing.util.ThingHelper.ensureUniqueChannels(ThingHelper.java:135) ~[?:?] at org.openhab.core.thing.util.ThingHelper.ensureUniqueChannels(ThingHelper.java:111) ~[?:?] at org.openhab.core.thing.binding.builder.ThingBuilder.withChannels(ThingBuilder.java:150) ~[?:?] at org.openhab.binding.solarman.internal.SolarmanLoggerHandler.setupChannelsForInverterDefinition(SolarmanLoggerHandler.java:352) ~[?:?] at org.openhab.binding.solarman.internal.SolarmanLoggerHandler.initialize(SolarmanLoggerHandler.java:134) ~[?:?] at jdk.internal.reflect.GeneratedMethodAccessor44.invoke(Unknown Source) ~[?:?] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:147) ~[?:?] at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) ~[?:?] at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?] 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:833) ~[?:?]

catalinsanda commented 1 year ago

Hey, can you please post your configuration files, I'm interested mostly in your things file?

I've tried your inverter type with my inverter and it seems to be working. Well some Modbus registers match so I'm able to read the values for those.

Here is the configuration that I've tried:

Thing solarman:logger:local [ hostname="a.b.c.d", inverterType="deye_4mppt", serialNumber="1234567890", additionalRequests="0x03:0x27D-0x27E" ] {
Channels:
    Type number : Inverter_Frequency [scale="0.01", uom="Hz", rule="3", registers="0x27E"]
}

You can remove the additionalRequests and the Inverter_Frequency if you don't need it.

joba642 commented 1 year ago

I didn't use a things file - i added the logger using the GUI. Thats the code: UID: solarman:logger:31864edd38 label: Solarman Binding Thing thingTypeUID: solarman:logger configuration: inverterType: deye_4mppt hostname: a.b.c.d serialNumber: "012345678" port: 8899 refreshInterval: 60

joba642 commented 1 year ago

I now tried to add the logger using a file (after deleting it with the GUI) and now it's working!

Thanks for your help.

catalinsanda commented 1 year ago

Glad it works, I totally disregarded installing things via the GUI as I never use it, but that's probably the preferred way. Thanks for reminding me. I'll give it a go and fix whatever bug I find there.

catalinsanda commented 1 year ago

@joba642 - I think I fixed the "Duplicate channels" bug in commit bfd85f264d8e55c1a93061cd2e13ed61d4236be5. Can you please test it with the latest release?

joba642 commented 1 year ago

@catalinsanda: I tested the new Release - and now its working like a charm.

Thanks for your efforts.

catalinsanda commented 1 year ago

Great that it works. Closing this issue.