Skip to content

Commit

Permalink
[kostalinverter] Add Second Generation (Piko10-20) type inverters (#8574
Browse files Browse the repository at this point in the history
)

* Binding redesigned 20200923 by Örjan Backsell

Signed-off-by: basse04 [email protected]
Also-by: Christian Schneider <>
Also-by: René Stakemeier <>
Also-by: Christoph Weitkamp <>


This is the upgraded version of Kostal Inverter extended with
functionality for the Inverter type of Second generation PIKO 10-20
[kostalinverter], regarded OH3.
[WIP]

Signed-off-by: basse04 <[email protected]>

* Binding redesigned 20200923 by Örjan Backsell

Signed-off-by: basse04 [email protected]
Also-by: Christian Schneider <>
Also-by: René Stakemeier <>
Also-by: Christoph Weitkamp <>


This is the upgraded version of Kostal Inverter extended with
functionality for the Inverter type of Second generation PIKO 10-20
[kostalinverter] regarded oH3
[WIP]

Signed-off-by: basse04 <[email protected]>

* Binding redesigned 20200923 by Örjan Backsell

Signed-off-by: basse04 [email protected]
Also-by: Christian Schneider <>
Also-by: René Stakemeier <>
Also-by: Christoph Weitkamp <>


This is the upgraded version of Kostal Inverter extended with
functionality for the Inverter type of Second generation PIKO 10-20
[kostalinverter] regarded oH3
[WIP]

Signed-off-by: basse04 <[email protected]>

* Binding redesigned 20200923 by Örjan Backsell

Signed-off-by: basse04 [email protected]
Also-by: Christian Schneider <>
Also-by: René Stakemeier <>
Also-by: Christoph Weitkamp <>


This is the upgraded version of Kostal Inverter extended with
functionality for the Inverter type of Second generation PIKO 10-20
[kostalinverter] regarded oH3
[WIP]

Signed-off-by: basse04 <[email protected]>

* Binding redesigned 20200924 by Örjan Backsell

Signed-off-by: basse04 [email protected]
Also-by: Christian Schneider <>
Also-by: René Stakemeier <>
Also-by: Christoph Weitkamp <>


This is the upgraded version of Kostal Inverter extended with
functionality for the Inverter type of Second generation PIKO 10-20
[kostalinverter] regarded oH3
[WIP]

Signed-off-by: basse04 <[email protected]>

* Binding redesigned 20200924 by Örjan Backsell

Signed-off-by: basse04 [email protected]
Also-by: Christian Schneider <>
Also-by: René Stakemeier <>
Also-by: Christoph Weitkamp <>

Changes made in
org.openhab.binding.internal.kostal.inverter.secondgeneration.SecondGenerationHandler.java
found by Travis tests.

Signed-off-by: basse04 <[email protected]>

* Binding redesigned 20201007 by Örjan Backsell

Signed-off-by: basse04 [email protected]
Also-by: Christian Schneider <>
Also-by: René Stakemeier <>
Also-by: Christoph Weitkamp <>

Done changes in:
Channels.xml
PIKO1020.xml
README.md
SecondGeneration.xml
SecondGenerationChannelConfiguration.java

Signed-off-by: basse04 <[email protected]>

* Binding redesigned 20201008 by Örjan Backsell

Signed-off-by: basse04 <[email protected]>

* Binding redesigned 20201012 by Örjan Backsell, regarded to @fwolter
requested changes

Signed-off-by: basse04 [email protected]
Also-by: Christian Schneider <>
Also-by: René Stakemeier <>
Also-by: Christoph Weitkamp <>
Signed-off-by: basse04 <[email protected]>

* Binding redesigned 20201028 by Örjan Backsell, regarded to @cpmeister
requested changes.

Signed-off-by: basse04 [email protected]
Also-by: Christian Schneider <>
Also-by: René Stakemeier <>
Also-by: Christoph Weitkamp <>
Signed-off-by: basse04 <[email protected]>

* Binding redesigned 20201105 by Örjan Backsell

Signed-off-by: basse04 [email protected]
Also-by: Christian Schneider <>
Also-by: René Stakemeier <>
Also-by: Christoph Weitkamp <>
Signed-off-by: basse04 <[email protected]>

* Binding redesigned 20200923 by Örjan Backsell

'
Signed-off-by: basse04 [email protected]
Also-by: Christian Schneider <>
Also-by: René Stakemeier <>
Also-by: Christoph Weitkamp <>
'
Signed-off-by: basse04 <[email protected]>

* Binding redesigned 20201111 by Örjan Backsell

Signed-off-by: basse04 <[email protected]>

* Binding redesigned 20201117 by Örjan Backsell

'
Signed-off-by: basse04 [email protected]
Also-by: Christian Schneider <>
Also-by: René Stakemeier <>
Also-by: Christoph Weitkamp <>


This is the upgraded version of Kostal Inverter extended with
functionality for the Inverter type of Second generation PIKO 10-20
[kostalinverter]
[WIP]
'

Signed-off-by: basse04 <[email protected]>

* Binding redesigned 20201119 by Örjan Backsell

Signed-off-by: basse04 <[email protected]>

* Binding redesigned 20201125 by Örjan Backsell

Signed-off-by: basse04 <[email protected]>

* Binding redesigned 20201130 by Örjan Backsell

Signed-off-by: basse04 <[email protected]>

* Binding redesigned 20201130, 1630 by Örjan Backsell

Signed-off-by: basse04 <[email protected]>

* Binding redesigned 20201202 by Örjan Backsell

Signed-off-by: basse04 <[email protected]>

* Binding redesigned 20201204 by Örjan Backsell

Signed-off-by: basse04 <[email protected]>

* Redesigned 20201204 by Örjan Backsell

Signed-off-by: basse04 <[email protected]>

* Binding redesigned 20201010 by Örjan Backsell

Signed-off-by: basse04 <[email protected]>

* Binding redesigned 20210112 by Örjan Backsell

'
Signed-off-by: basse04 [email protected]
Also-by: Christian Schneider <>
Also-by: René Stakemeier <>
Also-by: Christoph Weitkamp <>

This is the upgraded version of Kostal Inverter extended with
functionality for the Inverter type of Second generation PIKO 10-20
[kostalinverter]
'

Signed-off-by: basse04 <[email protected]>

* Binding redesigned 20210114 by Örjan Backsell

Signed-off-by: basse04 <[email protected]>

* Binding redesigned 20210119 by Örjan Backsell

Signed-off-by: basse04 <[email protected]>

* Binding (KostalInverterFactory.java)redesigned 20210119 by Örjan
Backsell

Signed-off-by: basse04 <[email protected]>

* Binding redesigned 20210125 by Örjan Backsell

* Binding redesigned 20200923 by Örjan Backsell

(KostalInverterFactory.java)

Signed-off-by: basse04 <[email protected]>

* Binding redesigned 20210125 by Örjan Backsell

Signed-off-by: basse04 <[email protected]>
  • Loading branch information
basse04 authored Feb 4, 2021
1 parent 6878384 commit 9498590
Show file tree
Hide file tree
Showing 13 changed files with 1,693 additions and 4 deletions.
195 changes: 194 additions & 1 deletion bundles/org.openhab.binding.kostalinverter/README.md

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.jetty.client.HttpClient;
import org.openhab.binding.kostalinverter.internal.firstgeneration.WebscrapeHandler;
import org.openhab.binding.kostalinverter.internal.secondgeneration.SecondGenerationHandler;
import org.openhab.binding.kostalinverter.internal.thirdgeneration.ThirdGenerationHandler;
import org.openhab.binding.kostalinverter.internal.thirdgeneration.ThirdGenerationInverterTypes;
import org.openhab.core.io.net.http.HttpClientFactory;
Expand All @@ -36,6 +37,7 @@
/**
* @author Christian Schneider - Initial contribution (as WebscrapeHandlerFactory.java)
* @author René Stakemeier - extension for the third generation of KOSTAL inverters
* @author Örjan Backsell - extension for the second generation of KOSTAL inverters
*/
@Component(service = ThingHandlerFactory.class, configurationPid = "binding.kostalinverter")
@NonNullByDefault
Expand Down Expand Up @@ -72,6 +74,8 @@ public class KostalInverterFactory extends BaseThingHandlerFactory {

public static final ThingTypeUID FIRST_GENERATION_INVERTER = new ThingTypeUID("kostalinverter", "kostalinverter");

public static final ThingTypeUID SECOND_GENERATION_INVERTER = new ThingTypeUID("kostalinverter", "piko1020");

private final HttpClient httpClient;

@Activate
Expand All @@ -81,7 +85,7 @@ public KostalInverterFactory(@Reference final HttpClientFactory httpClientFactor

@Override
public boolean supportsThingType(ThingTypeUID thingTypeUID) {
return thingTypeUID.equals(FIRST_GENERATION_INVERTER)
return thingTypeUID.equals(FIRST_GENERATION_INVERTER) || thingTypeUID.equals(SECOND_GENERATION_INVERTER)
|| SUPPORTED_THIRD_GENERATION_THING_TYPES_UIDS.keySet().contains(thingTypeUID);
}

Expand All @@ -91,6 +95,10 @@ public boolean supportsThingType(ThingTypeUID thingTypeUID) {
if (FIRST_GENERATION_INVERTER.equals(thing.getThingTypeUID())) {
return new WebscrapeHandler(thing);
}
// second generation
if (SECOND_GENERATION_INVERTER.equals(thing.getThingTypeUID())) {
return new SecondGenerationHandler(thing, httpClient);
}
// third generation
ThirdGenerationInverterTypes inverterType = SUPPORTED_THIRD_GENERATION_THING_TYPES_UIDS
.get(thing.getThingTypeUID());
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
/**
* Copyright (c) 2010-2021 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.kostalinverter.internal.secondgeneration;

import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.core.thing.ThingTypeUID;

/**
* The {@link SecondGenerationBindingConstants} class defines channel constants, which are
* used in the second generation part of the binding.
*
* @author Örjan Backsell - Initial contribution Piko1020, Piko New Generation
*/

@NonNullByDefault
public class SecondGenerationBindingConstants {

private static final String BINDING_ID = "kostalinverter";

// List of all Thing Type UIDs
public static final ThingTypeUID SECOND_GENERATION_INVERTER = new ThingTypeUID(BINDING_ID, "piko1020");

// List of all Channel ids
public static final String CHANNEL_GRIDOUTPUTPOWER = "gridOutputPower";
public static final String CHANNEL_YIELD_DAY_SECOND_GEN = "yieldDaySecondGen";
public static final String CHANNEL_YIELD_TOTAL_SECOND_GEN = "yieldTotalSecondGen";
public static final String CHANNEL_OPERATING_STATUS = "operatingStatus";
public static final String CHANNEL_GRIDVOLTAGEL1 = "gridVoltageL1";
public static final String CHANNEL_GRIDCURRENTL1 = "gridCurrentL1";
public static final String CHANNEL_GRIDPOWERL1 = "gridPowerL1";
public static final String CHANNEL_GRIDVOLTAGEL2 = "gridVoltageL2";
public static final String CHANNEL_GRIDCURRENTL2 = "gridCurrentL2";
public static final String CHANNEL_GRIDPOWERL2 = "gridPowerL2";
public static final String CHANNEL_GRIDVOLTAGEL3 = "gridVoltageL3";
public static final String CHANNEL_GRIDCURRENTL3 = "gridCurrentL3";
public static final String CHANNEL_GRIDPOWERL3 = "gridPowerL3";
public static final String CHANNEL_DCPOWERPV = "dcPowerPV";
public static final String CHANNEL_DC1VOLTAGE = "dc1Voltage";
public static final String CHANNEL_DC1CURRENT = "dc1Current";
public static final String CHANNEL_DC1POWER = "dc1Power";
public static final String CHANNEL_DC2VOLTAGE = "dc2Voltage";
public static final String CHANNEL_DC2CURRENT = "dc2Current";
public static final String CHANNEL_DC2POWER = "dc2Power";
public static final String CHANNEL_DC3VOLTAGE = "dc3Voltage";
public static final String CHANNEL_DC3CURRENT = "dc3Current";
public static final String CHANNEL_DC3POWER = "dc3Power";

public static final String CHANNEL_AKTHOMECONSUMTIONSOLAR = "aktHomeConsumptionSolar";
public static final String CHANNEL_AKTHOMECONSUMPTIONBAT = "aktHomeConsumptionBat";
public static final String CHANNEL_AKTHOMECONSUMPTIONGRID = "aktHomeConsumptionGrid";
public static final String CHANNEL_PHASESELHOMECONSUMPL1 = "phaseSelHomeConsumpL1";
public static final String CHANNEL_PHASESELHOMECONSUMPL2 = "phaseSelHomeConsumpL2";
public static final String CHANNEL_PHASESELHOMECONSUMPL3 = "phaseSelHomeConsumpL3";
public static final String CHANNEL_GRIDFREQ = "gridFreq";
public static final String CHANNEL_GRIDCOSPHI = "gridCosPhi";
public static final String CHANNEL_HOMECONSUMPTION_DAY = "homeConsumptionDay";
public static final String CHANNEL_OWNCONSUMPTION_DAY = "ownConsumptionDay";
public static final String CHANNEL_OWNCONSRATE_DAY = "ownConsRateDay";
public static final String CHANNEL_AUTONOMYDEGREE_DAY = "autonomyDegreeDay";
public static final String CHANNEL_HOMECONSUMPTION_TOTAL = "homeConsumptionTotal";
public static final String CHANNEL_OWNCONSUMPTION_TOTAL = "ownConsumptionTotal";
public static final String CHANNEL_OPERATINGTIME_TOTAL = "operatingTimeTotal";
public static final String CHANNEL_CURRENT = "current";
public static final String CHANNEL_CURRENTDIR = "currentDir";
public static final String CHANNEL_CHARGECYCLES = "chargeCycles";
public static final String CHANNEL_BATTERYTEMPERATURE = "batteryTemperature";
public static final String CHANNEL_LOGINTERVAL = "loginterval";
public static final String CHANNEL_S0INPULSECNT = "s0InPulseCnt";
public static final String CHANNEL_OWNCONSRATE_TOTAL = "ownConsRateTotal";
public static final String CHANNEL_AUTONOMYDEGREE_TOTAL = "autonomyDegreeTotal";

public static final String CHANNEL_BATTERYVOLTAGE = "batteryVoltage";
public static final String CHANNEL_BATSTATEOFCHARGE = "batStateOfCharge";
public static final String CHANNEL_SELFCONSUMPTION = "selfConsumption";

public static final String CHANNEL_BATTERYUSAGECONSUMPTION = "batteryUsageConsumption";
public static final String CHANNEL_SMARTBATTERYCONTROL = "smartBatteryControl";
public static final String CHANNEL_MAXDEPTHOFDISCHARGE = "maxDepthOfDischarge";
public static final String CHANNEL_SHADOWMANAGEMENT = "shadowManagement";
public static final String CHANNEL_EXTERNALMODULECONTROL = "externalModuleControl";

public static final String CHANNEL_BATTERYUSAGECONSUMPTIONSET = "batteryUsageConsumptionSet";
public static final String CHANNEL_BATTERYUSAGESTRATEGYSET = "batteryUsageStrategySet";
public static final String CHANNEL_SMARTBATTERYCONTROLSET = "smartBatteryControlSet";
public static final String CHANNEL_BATTERYCHARGETIMEFROMSET = "batteryChargeTimeFromSet";
public static final String CHANNEL_BATTERYCHARGETIMETOSET = "batteryChargeTimeToSet";
public static final String CHANNEL_MAXDEPTHOFDISCHARGESET = "maxDepthOfDischargeSet";
public static final String CHANNEL_SHADOWMANAGEMENTSET = "shadowManagementSet";
public static final String CHANNEL_EXTERNALMODULECONTROLSET = "externalModuleControlSet";
}
Loading

0 comments on commit 9498590

Please sign in to comment.