Duplicate channels holidayMode_activated

I’m trying to set up the KM200 binding on the latest OpenHab 2.5.x but I get an exception in the logging about duplicate channels and the related thing remains in status: UNINITIALIZED - HANDLER_INITIALIZING_ERROR Duplicate channels km200:heatingCircuit:junkers:1:holidayMode_activated

I initially thought this would be because I have two heating circuits but the issue remains after removing one of the circuits from the config and restarting.

KM200.things:

Bridge km200:kmdevice:junkers "KM200" @ "TEC" [
privateKey= "xxx", 
maxnbrrepeats=10.0, 
readDelay=100, 
refreshInterval=30, 
maxNbrRepeats=10, 
ip4Address="x.x.x.x", 
refreshinterval=30.0, 
readdelay=100.0 ] 
{
    heatingCircuit 1 "floor_heating_circuit"
    //heatingCircuit 2 "radiator_circuit"
    dhwCircuit 1 "hot_water"
    sensor 1 "sensors"
    heatSource 1 "heater"
    notification 1 "notifications"
}

Here’s the exceptions I get:

2020-12-05 10:49:06.407 [WARN ] [core.thing.internal.ThingManagerImpl] - Initializing handler for thing 'km200:kmdevice:junkers' takes more than 5000ms.
2020-12-05 10:51:28.011 [INFO ] [l.handler.KM200VirtualServiceHandler] - No references for switch service: /heatingCircuits/hc2/switchPrograms/A, this is not supported
2020-12-05 10:51:28.014 [INFO ] [l.handler.KM200VirtualServiceHandler] - No references for switch service: /heatingCircuits/hc2/switchPrograms/B, this is not supported
2020-12-05 10:51:28.269 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.initialize()' on 'org.openhab.binding.km200.internal.handler.KM200ThingHandler@147a71c': Duplicate channels km200:heatingCircuit:junkers:1:holidayMode_activated
java.lang.IllegalArgumentException: Duplicate channels km200:heatingCircuit:junkers:1:holidayMode_activated
	at org.eclipse.smarthome.core.thing.util.ThingHelper.ensureUniqueChannels(ThingHelper.java:165) ~[?:?]
	at org.eclipse.smarthome.core.thing.util.ThingHelper.ensureUniqueChannels(ThingHelper.java:141) ~[?:?]
	at org.eclipse.smarthome.core.thing.binding.builder.ThingBuilder.withChannels(ThingBuilder.java:87) ~[?:?]
	at org.openhab.binding.km200.internal.handler.KM200ThingHandler.initialize(KM200ThingHandler.java:313) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_272]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_272]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_272]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_272]
	at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:152) [bundleFile:?]
	at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_272]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_272]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_272]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_272]
2020-12-05 10:51:28.317 [ERROR] [core.thing.internal.ThingManagerImpl] - Exception occurred while initializing handler of thing 'km200:heatingCircuit:junkers:1': Duplicate channels km200:heatingCircuit:junkers:1:holidayMode_activated
java.lang.IllegalArgumentException: Duplicate channels km200:heatingCircuit:junkers:1:holidayMode_activated
	at org.eclipse.smarthome.core.thing.util.ThingHelper.ensureUniqueChannels(ThingHelper.java:165) ~[?:?]
	at org.eclipse.smarthome.core.thing.util.ThingHelper.ensureUniqueChannels(ThingHelper.java:141) ~[?:?]
	at org.eclipse.smarthome.core.thing.binding.builder.ThingBuilder.withChannels(ThingBuilder.java:87) ~[?:?]
	at org.openhab.binding.km200.internal.handler.KM200ThingHandler.initialize(KM200ThingHandler.java:313) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_272]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_272]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_272]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_272]
	at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:152) [bundleFile:?]
	at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_272]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_272]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_272]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_272]

The 1.x binding reports the following services in the logging. I don’t seem to find any duplicates here:

/dhwCircuits
/dhwCircuits/dhw1
/dhwCircuits/dhw1/actualTemp
/dhwCircuits/dhw1/charge
/dhwCircuits/dhw1/chargeDuration
/dhwCircuits/dhw1/cpStartph
/dhwCircuits/dhw1/currentSetpoint
/dhwCircuits/dhw1/holidayMode
/dhwCircuits/dhw1/holidayMode/activated
/dhwCircuits/dhw1/operationMode
/dhwCircuits/dhw1/singleChargeSetpoint
/dhwCircuits/dhw1/status
/dhwCircuits/dhw1/switchPrograms
/dhwCircuits/dhw1/tdsetPoint
/dhwCircuits/dhw1/temperatureLevels
/dhwCircuits/dhw1/temperatureLevels/high
/dhwCircuits/dhw1/temperatureLevels/off
/dhwCircuits/dhw1/waterFlow
/dhwCircuits/dhw1/workingTime
/gateway
/gateway/boschSHPassword
/gateway/DateTime
/gateway/haiPassword
/gateway/instAccess
/gateway/instPassword
/gateway/instWriteAccess
/gateway/knxPassword
/gateway/logging
/gateway/logging/reqBusVar
/gateway/logging/switch
/gateway/logging/userAcceptance
/gateway/portalPassword
/gateway/update
/gateway/update/request
/gateway/update/status
/gateway/update/strategy
/gateway/update/version
/gateway/userpassword
/gateway/uuid
/gateway/version
/gateway/versionFirmware
/gateway/versionHardware
/heatingCircuits
/heatingCircuits/hc1
/heatingCircuits/hc1/activeSwitchProgram
/heatingCircuits/hc1/actualSupplyTempSetpoint
/heatingCircuits/hc1/controlType
/heatingCircuits/hc1/cooling
/heatingCircuits/hc1/currentOpModeInfo
/heatingCircuits/hc1/currentRoomSetpoint
/heatingCircuits/hc1/currentSuWiMode
/heatingCircuits/hc1/designTemp
/heatingCircuits/hc1/heatCurveMax
/heatingCircuits/hc1/heatCurveMin
/heatingCircuits/hc1/holidayMode
/heatingCircuits/hc1/holidayMode/activated
/heatingCircuits/hc1/nextSetpoint
/heatingCircuits/hc1/operationMode
/heatingCircuits/hc1/pumpModulation
/heatingCircuits/hc1/roomInfluence
/heatingCircuits/hc1/roomtemperature
/heatingCircuits/hc1/roomTempOffset
/heatingCircuits/hc1/setpointOptimization
/heatingCircuits/hc1/status
/heatingCircuits/hc1/supplyTemperatureSetpoint
/heatingCircuits/hc1/suWiSwitchMode
/heatingCircuits/hc1/suWiThreshold
/heatingCircuits/hc1/switchProgramMode
/heatingCircuits/hc1/switchPrograms
/heatingCircuits/hc1/switchPrograms/A
/heatingCircuits/hc1/switchPrograms/A/comfort2
/heatingCircuits/hc1/switchPrograms/A/cycle
/heatingCircuits/hc1/switchPrograms/A/eco
/heatingCircuits/hc1/switchPrograms/A/nbrCycles
/heatingCircuits/hc1/switchPrograms/A/weekday
/heatingCircuits/hc1/switchPrograms/B
/heatingCircuits/hc1/switchPrograms/B/comfort2
/heatingCircuits/hc1/switchPrograms/B/cycle
/heatingCircuits/hc1/switchPrograms/B/eco
/heatingCircuits/hc1/switchPrograms/B/nbrCycles
/heatingCircuits/hc1/switchPrograms/B/weekday
/heatingCircuits/hc1/temperatureLevels
/heatingCircuits/hc1/temperatureLevels/comfort2
/heatingCircuits/hc1/temperatureLevels/eco
/heatingCircuits/hc1/temporaryRoomSetpoint
/heatingCircuits/hc1/timeToNextSetpoint
/heatingCircuits/hc2
/heatingCircuits/hc2/activeSwitchProgram
/heatingCircuits/hc2/actualSupplyTemperature
/heatingCircuits/hc2/actualSupplyTempSetpoint
/heatingCircuits/hc2/controlType
/heatingCircuits/hc2/cooling
/heatingCircuits/hc2/currentOpModeInfo
/heatingCircuits/hc2/currentRoomSetpoint
/heatingCircuits/hc2/currentSuWiMode
/heatingCircuits/hc2/designTemp
/heatingCircuits/hc2/heatCurveMax
/heatingCircuits/hc2/heatCurveMin
/heatingCircuits/hc2/holidayMode
/heatingCircuits/hc2/holidayMode/activated
/heatingCircuits/hc2/nextSetpoint
/heatingCircuits/hc2/operationMode
/heatingCircuits/hc2/pumpModulation
/heatingCircuits/hc2/roomInfluence
/heatingCircuits/hc2/roomtemperature
/heatingCircuits/hc2/roomTempOffset
/heatingCircuits/hc2/setpointOptimization
/heatingCircuits/hc2/status
/heatingCircuits/hc2/supplyTemperatureSetpoint
/heatingCircuits/hc2/suWiSwitchMode
/heatingCircuits/hc2/suWiThreshold
/heatingCircuits/hc2/switchProgramMode
/heatingCircuits/hc2/switchPrograms
/heatingCircuits/hc2/switchPrograms/A
/heatingCircuits/hc2/switchPrograms/A/21.0
/heatingCircuits/hc2/switchPrograms/A/cycle
/heatingCircuits/hc2/switchPrograms/A/nbrCycles
/heatingCircuits/hc2/switchPrograms/A/null
/heatingCircuits/hc2/switchPrograms/A/weekday
/heatingCircuits/hc2/switchPrograms/B
/heatingCircuits/hc2/switchPrograms/B/15.0
/heatingCircuits/hc2/switchPrograms/B/21.0
/heatingCircuits/hc2/switchPrograms/B/cycle
/heatingCircuits/hc2/switchPrograms/B/nbrCycles
/heatingCircuits/hc2/switchPrograms/B/weekday
/heatingCircuits/hc2/temporaryRoomSetpoint
/heatingCircuits/hc2/timeToNextSetpoint
/heatSources
/heatSources/actualCHPower
/heatSources/actualDHWPower
/heatSources/actualModulation
/heatSources/actualPower
/heatSources/actualSupplyTemperature
/heatSources/applianceSupplyTemperature
/heatSources/burnerModulationSetpoint
/heatSources/burnerPowerSetpoint
/heatSources/ch
/heatSources/ch/energyMonitoring
/heatSources/ChimneySweeper
/heatSources/chimneyTemperature
/heatSources/CHpumpModulation
/heatSources/dhw
/heatSources/dhw/energyMonitoring
/heatSources/electricGrid
/heatSources/energyMonitoring
/heatSources/energyMonitoring/consumption
/heatSources/energyMonitoring/correctionFactor
/heatSources/energyMonitoring/maxTankLevel
/heatSources/energyMonitoring/minTankLevel
/heatSources/energyMonitoring/startDateTime
/heatSources/energyMonitoring/tankLevel
/heatSources/flameStatus
/heatSources/fuelCell
/heatSources/gasAirPressure
/heatSources/hs1
/heatSources/hs1/actualModulation
/heatSources/hs1/actualPower
/heatSources/hs1/flameStatus
/heatSources/hs1/info
/heatSources/hs1/type
/heatSources/info
/heatSources/nominalCHPower
/heatSources/numberOfStarts
/heatSources/pool
/heatSources/pool/energyMonitoring
/heatSources/powerSetpoint
/heatSources/returnTemperature
/heatSources/sensors
/heatSources/supplyTemperatureSetpoint
/heatSources/systemPressure
/heatSources/total
/heatSources/total/energyMonitoring
/heatSources/workingTime
/heatSources/workingTime/centralHeating
/heatSources/workingTime/secondBurner
/heatSources/workingTime/totalSystem
/notifications
/notifications/error
/notifications/errorString
/notifications/nbrErrors
/recordings
/recordings/dhwCircuits
/recordings/dhwCircuits/dhw1
/recordings/dhwCircuits/dhw1/actualTemp
/recordings/heatingCircuits
/recordings/heatingCircuits/hc1
/recordings/heatingCircuits/hc1/roomtemperature
/recordings/heatingCircuits/hc2
/recordings/heatingCircuits/hc2/roomtemperature
/recordings/heatSources
/recordings/heatSources/actualCHPower
/recordings/heatSources/actualDHWPower
/recordings/heatSources/actualPower
/recordings/heatSources/hs1
/recordings/heatSources/hs1/actualPower
/recordings/heatSources/total
/recordings/heatSources/total/energyMonitoring
/recordings/system
/recordings/system/heatSources
/recordings/system/heatSources/hs1
/recordings/system/heatSources/hs1/actualPower
/recordings/system/sensors
/recordings/system/sensors/temperatures
/recordings/system/sensors/temperatures/outdoor_t1
/solarCircuits
/system
/system/appliance
/system/appliance/actualSupplyTemperature
/system/brand
/system/bus
/system/busReq
/system/healthStatus
/system/holidayModes
/system/holidayModes/hm1
/system/holidayModes/hm1/assignedTo
/system/holidayModes/hm1/delete
/system/holidayModes/hm1/dhwMode
/system/holidayModes/hm1/hcMode
/system/holidayModes/hm1/startStop
/system/holidayModes/hm2
/system/holidayModes/hm2/assignedTo
/system/holidayModes/hm2/delete
/system/holidayModes/hm2/dhwMode
/system/holidayModes/hm2/hcMode
/system/holidayModes/hm2/startStop
/system/holidayModes/hm3
/system/holidayModes/hm3/assignedTo
/system/holidayModes/hm3/delete
/system/holidayModes/hm3/dhwMode
/system/holidayModes/hm3/hcMode
/system/holidayModes/hm3/startStop
/system/holidayModes/hm4
/system/holidayModes/hm4/assignedTo
/system/holidayModes/hm4/delete
/system/holidayModes/hm4/dhwMode
/system/holidayModes/hm4/hcMode
/system/holidayModes/hm4/startStop
/system/holidayModes/hm5
/system/holidayModes/hm5/assignedTo
/system/holidayModes/hm5/delete
/system/holidayModes/hm5/dhwMode
/system/holidayModes/hm5/hcMode
/system/holidayModes/hm5/startStop
/system/info
/system/minOutdoorTemp
/system/sensors
/system/sensors/temperatures
/system/sensors/temperatures/chimney
/system/sensors/temperatures/hotWater_t2
/system/sensors/temperatures/outdoor_t1
/system/sensors/temperatures/return
/system/sensors/temperatures/supply_t1
/system/sensors/temperatures/supply_t1_setpoint
/system/sensors/temperatures/switch
/system/systemType

I remember, that I had trouble with this initially, when I first set up my heating as well. My current configuration does not list the individual circuits inside the braces at all. Everything, which I tried there, is still commented out. Perhaps try to leave the curly braces empty, in my case this worked and the relevant circuits were discovered automatically.

Unfortunately nothing is discovered automatically besides the KM200 itself. When I initially enabled the add-on and added the discovered Thing in paper UI, it had the same behaviour - nothing else was discovered but the KM200 was online.

I tried now with only the “sensor”-Thing and this is working. I can see the channels in paper UI and I can define Items for them.
Edit: I also added some more Things, including hot_water, but as soon as I add a heating circuit I get the exceptions. The other Things keep working though.

I found the cause of issue. The last two parts of the service path are used to generate the channel name.
For example, for the hot water circuit:

  • /dhwCircuits/dhw1/actualTemp is translated to channel km200:dhwCircuit:junkers:1:dhw1_actualTemp
  • /dhwCircuits/dhw1/holidayMode/activated is translated to channel km200:dhwCircuit:junkers:1:holidayMode_activated

In the second example the channel name doesn’t include the actual heating circuit (dhw1 in this case). For hot water this is no problem as there is only 1 circuit (dhw1) below dhwCircuits.

For heatingCircuit this is a problem however, because the following 2 services will result in the same channel name:

  • /heatingCircuits/hc1/holidayMode -> km200:heatingCircuit:junkers:1:holidayMode_activated
  • /heatingCircuits/hc2/holidayMode -> km200:heatingCircuit:junkers:1:holidayMode_activated

Hence, an exception is thrown.

So in my thing configuration it also doesn’t make sense to define the second circuit:

heatingCircuit 2 "radiator_circuit"

because both heating circuits are grouped under a single Thing.

Good that you have found a working solution. Just for the record: I have defined my configuration in a thing file, not via PaperUI. In this Case ist worked by automatic discovery.

Well at the time of my previous post I didn’t have a working solution yet. I merely found the cause of the issue :slight_smile:
Meanwhile I modified the add-on so that it ignores the holidayMode service, I don’t need it anyway. This fixes the issue for me.
However a cleaner solution should be implemented. But it’s up to the owner of this add-on to decide about that. I believe that would be @Markinus according to the CODEOWNERS file.