]> git.basschouten.com Git - openhab-addons.git/commitdiff
[kostalinverter] Added new channels frequency and cosphi (#10779)
authorMartin H <14805121+martin-hu@users.noreply.github.com>
Sat, 5 Jun 2021 12:45:00 +0000 (14:45 +0200)
committerGitHub <noreply@github.com>
Sat, 5 Jun 2021 12:45:00 +0000 (14:45 +0200)
new channels frequency and power factor.

Signed-off-by: Martin Hubert <github@martin-hubert.de>
Co-authored-by: Martin Hubert <github@martin-hubert.de>
15 files changed:
bundles/org.openhab.binding.kostalinverter/src/main/java/org/openhab/binding/kostalinverter/internal/thirdgeneration/ThirdGenerationBindingConstants.java
bundles/org.openhab.binding.kostalinverter/src/main/java/org/openhab/binding/kostalinverter/internal/thirdgeneration/ThirdGenerationChannelDatatypes.java
bundles/org.openhab.binding.kostalinverter/src/main/java/org/openhab/binding/kostalinverter/internal/thirdgeneration/ThirdGenerationHandler.java
bundles/org.openhab.binding.kostalinverter/src/main/java/org/openhab/binding/kostalinverter/internal/thirdgeneration/ThirdGenerationMappingInverterToChannel.java
bundles/org.openhab.binding.kostalinverter/src/main/resources/OH-INF/thing/Channels.xml
bundles/org.openhab.binding.kostalinverter/src/main/resources/OH-INF/thing/PLENTICOREPLUS100WITHBATTERY.xml
bundles/org.openhab.binding.kostalinverter/src/main/resources/OH-INF/thing/PLENTICOREPLUS100WITHOUTBATTERY.xml
bundles/org.openhab.binding.kostalinverter/src/main/resources/OH-INF/thing/PLENTICOREPLUS42WITHBATTERY.xml
bundles/org.openhab.binding.kostalinverter/src/main/resources/OH-INF/thing/PLENTICOREPLUS42WITHOUTBATTERY.xml
bundles/org.openhab.binding.kostalinverter/src/main/resources/OH-INF/thing/PLENTICOREPLUS55WITHBATTERY.xml
bundles/org.openhab.binding.kostalinverter/src/main/resources/OH-INF/thing/PLENTICOREPLUS55WITHOUTBATTERY.xml
bundles/org.openhab.binding.kostalinverter/src/main/resources/OH-INF/thing/PLENTICOREPLUS70WITHBATTERY.xml
bundles/org.openhab.binding.kostalinverter/src/main/resources/OH-INF/thing/PLENTICOREPLUS70WITHOUTBATTERY.xml
bundles/org.openhab.binding.kostalinverter/src/main/resources/OH-INF/thing/PLENTICOREPLUS85WITHBATTERY.xml
bundles/org.openhab.binding.kostalinverter/src/main/resources/OH-INF/thing/PLENTICOREPLUS85WITHOUTBATTERY.xml

index d279b706d1effabd3227d94ad3ade06e1baae2a6..48137200d2a32dac5a53ae60215dbe067c610e04 100644 (file)
@@ -80,6 +80,8 @@ public class ThirdGenerationBindingConstants {
     public static final String CHANNEL_DEVICE_LOCAL_LIMIT_EVU_ABSOLUTE = "deviceLocalLimitEVUAbsolute";
     public static final String CHANNEL_DEVICE_LOCAL_LIMIT_EVU_RELATIV = "deviceLocalLimitEVURelativ";
     public static final String CHANNEL_DEVICE_LOCAL_WORKTIME = "deviceLocalWorktime";
+    public static final String CHANNEL_DEVICE_LOCAL_AC_COS_PHI = "deviceLocalACCosPhi";
+    public static final String CHANNEL_DEVICE_LOCAL_AC_FREQUENCY = "deviceLocalACFrequency";
     public static final String CHANNEL_DEVICE_LOCAL_AC_PHASE_1_CURRENT_AMPERAGE = "deviceLocalACPhase1CurrentAmperage";
     public static final String CHANNEL_DEVICE_LOCAL_AC_PHASE_1_CURRENT_POWER = "deviceLocalACPhase1CurrentPower";
     public static final String CHANNEL_DEVICE_LOCAL_AC_PHASE_1_CURRENT_VOLTAGE = "deviceLocalACPhase1CurrentVoltage";
index b4c16e004f9fc02f31f95bdb3b37e16437f5ee82..6104cdd6f50aa7d992fc229a5eb8f0151a567371 100644 (file)
@@ -252,6 +252,10 @@ public class ThirdGenerationHandler extends BaseThingHandler {
                 updateState(channeluid, new QuantityType<>(value, Units.VOLT));
                 break;
             }
+            case HERTZ: {
+                updateState(channeluid, new QuantityType<>(value, Units.HERTZ));
+                break;
+            }
             default: {
                 // unknown datatype
                 logger.debug("{} not known!", dataType);
index 3d61b8a39a46727faf86f0926e1e477ae85014a2..715a0855f94cc94c4fcce0de081db8f34cb9fa3c 100644 (file)
@@ -69,6 +69,10 @@ class ThirdGenerationMappingInverterToChannel {
                 ThirdGenerationChannelDatatypes.PERCEMTAGE);
         addInverterChannel(allInvertersList, CHANNEL_DEVICE_LOCAL_WORKTIME, "devices:local", "WorkTime",
                 ThirdGenerationChannelDatatypes.SECONDS);
+        addInverterChannel(allInvertersList, CHANNEL_DEVICE_LOCAL_AC_COS_PHI, "devices:local:ac", "CosPhi",
+                ThirdGenerationChannelDatatypes.INTEGER);
+        addInverterChannel(allInvertersList, CHANNEL_DEVICE_LOCAL_AC_FREQUENCY, "devices:local:ac", "Frequency",
+                ThirdGenerationChannelDatatypes.HERTZ);
         addInverterChannel(allInvertersList, CHANNEL_DEVICE_LOCAL_AC_PHASE_1_CURRENT_AMPERAGE, "devices:local:ac",
                 "L1_I", ThirdGenerationChannelDatatypes.AMPERE);
         addInverterChannel(allInvertersList, CHANNEL_DEVICE_LOCAL_AC_PHASE_1_CURRENT_POWER, "devices:local:ac", "L1_P",
index 304aa0ebc6644fea36b1c7998b32d700b6bc18fc..1ab775cb73b31fa49a2013c9332ee8d5c42bef72 100644 (file)
                <category>Time</category>
                <state readOnly="true" pattern="%.2f %unit%"/>
        </channel-type>
+       <channel-type id="device-local-ac-cos-phi">
+               <item-type>Number:Dimensionless</item-type>
+               <label>Cos Phi</label>
+               <description>AC Power Factor</description>
+               <state readOnly="true" pattern="%.2f"/>
+       </channel-type>
+       <channel-type id="device-local-ac-frequency">
+               <item-type>Number:Frequency</item-type>
+               <label>AC Frequency</label>
+               <description>AC Frequency</description>
+               <state readOnly="true" pattern="%.2f %unit%"/>
+       </channel-type>
        <channel-type id="device-local-ac-phase-1-current-amperage">
                <item-type>Number:ElectricCurrent</item-type>
                <label>P1 Amperage</label>
index 7cf7c17ce5440570519b9235b591cd8f32dc2079..c5c3e7c2cabdecb3271d7275418e61d7e94a15d0 100644 (file)
@@ -17,6 +17,8 @@
                        <channel id="deviceLocalLimitEVUAbsolute" typeId="device-local-limit-evu-absolute"/>
                        <channel id="deviceLocalLimitEVURelativ" typeId="device-local-limit-evu-relativ"/>
                        <channel id="deviceLocalWorktime" typeId="device-local-worktime"/>
+                       <channel id="deviceLocalACCosPhi" typeId="device-local-ac-cos-phi"/>
+                       <channel id="deviceLocalACFrequency" typeId="device-local-ac-frequency"/>
                        <channel id="deviceLocalACPhase1CurrentAmperage" typeId="device-local-ac-phase-1-current-amperage"/>
                        <channel id="deviceLocalACPhase1CurrentPower" typeId="device-local-ac-phase-1-current-power"/>
                        <channel id="deviceLocalACPhase1CurrentVoltage" typeId="device-local-ac-phase-1-current-voltage"/>
index 8db1d98e5bcba35d19a6924233b2963295b60086..0a322e48ce6bbfcdbfa659058bb901286e63325a 100644 (file)
@@ -16,6 +16,8 @@
                        <channel id="deviceLocalLimitEVUAbsolute" typeId="device-local-limit-evu-absolute"/>
                        <channel id="deviceLocalLimitEVURelativ" typeId="device-local-limit-evu-relativ"/>
                        <channel id="deviceLocalWorktime" typeId="device-local-worktime"/>
+                       <channel id="deviceLocalACCosPhi" typeId="device-local-ac-cos-phi"/>
+                       <channel id="deviceLocalACFrequency" typeId="device-local-ac-frequency"/>
                        <channel id="deviceLocalACPhase1CurrentAmperage" typeId="device-local-ac-phase-1-current-amperage"/>
                        <channel id="deviceLocalACPhase1CurrentPower" typeId="device-local-ac-phase-1-current-power"/>
                        <channel id="deviceLocalACPhase1CurrentVoltage" typeId="device-local-ac-phase-1-current-voltage"/>
index 1f100e851aa74700b48dbf652a98a6bb283f3136..0f1cea8ad73470b55d3ffed0e4b3b1d004ced904 100644 (file)
@@ -17,6 +17,8 @@
                        <channel id="deviceLocalLimitEVUAbsolute" typeId="device-local-limit-evu-absolute"/>
                        <channel id="deviceLocalLimitEVURelativ" typeId="device-local-limit-evu-relativ"/>
                        <channel id="deviceLocalWorktime" typeId="device-local-worktime"/>
+                       <channel id="deviceLocalACCosPhi" typeId="device-local-ac-cos-phi"/>
+                       <channel id="deviceLocalACFrequency" typeId="device-local-ac-frequency"/>
                        <channel id="deviceLocalACPhase1CurrentAmperage" typeId="device-local-ac-phase-1-current-amperage"/>
                        <channel id="deviceLocalACPhase1CurrentPower" typeId="device-local-ac-phase-1-current-power"/>
                        <channel id="deviceLocalACPhase1CurrentVoltage" typeId="device-local-ac-phase-1-current-voltage"/>
index dfcd4d0da62eb3691c2972d63e5a742ea44b7684..728d51974a78b1de99a85c76ab28c511257f267c 100644 (file)
@@ -16,6 +16,8 @@
                        <channel id="deviceLocalLimitEVUAbsolute" typeId="device-local-limit-evu-absolute"/>
                        <channel id="deviceLocalLimitEVURelativ" typeId="device-local-limit-evu-relativ"/>
                        <channel id="deviceLocalWorktime" typeId="device-local-worktime"/>
+                       <channel id="deviceLocalACCosPhi" typeId="device-local-ac-cos-phi"/>
+                       <channel id="deviceLocalACFrequency" typeId="device-local-ac-frequency"/>
                        <channel id="deviceLocalACPhase1CurrentAmperage" typeId="device-local-ac-phase-1-current-amperage"/>
                        <channel id="deviceLocalACPhase1CurrentPower" typeId="device-local-ac-phase-1-current-power"/>
                        <channel id="deviceLocalACPhase1CurrentVoltage" typeId="device-local-ac-phase-1-current-voltage"/>
index 2860434b592bb95e63dec1843eeba4c7c1c482a6..964caeb673be727aa6a42994e1f4aeca1a4695a8 100644 (file)
@@ -17,6 +17,8 @@
                        <channel id="deviceLocalLimitEVUAbsolute" typeId="device-local-limit-evu-absolute"/>
                        <channel id="deviceLocalLimitEVURelativ" typeId="device-local-limit-evu-relativ"/>
                        <channel id="deviceLocalWorktime" typeId="device-local-worktime"/>
+                       <channel id="deviceLocalACCosPhi" typeId="device-local-ac-cos-phi"/>
+                       <channel id="deviceLocalACFrequency" typeId="device-local-ac-frequency"/>
                        <channel id="deviceLocalACPhase1CurrentAmperage" typeId="device-local-ac-phase-1-current-amperage"/>
                        <channel id="deviceLocalACPhase1CurrentPower" typeId="device-local-ac-phase-1-current-power"/>
                        <channel id="deviceLocalACPhase1CurrentVoltage" typeId="device-local-ac-phase-1-current-voltage"/>
index e9208610bea745f6bffb6d45b03de155d87059f9..fe52d83a542ebd2011b2a3b92346a55ba14be403 100644 (file)
@@ -16,6 +16,8 @@
                        <channel id="deviceLocalLimitEVUAbsolute" typeId="device-local-limit-evu-absolute"/>
                        <channel id="deviceLocalLimitEVURelativ" typeId="device-local-limit-evu-relativ"/>
                        <channel id="deviceLocalWorktime" typeId="device-local-worktime"/>
+                       <channel id="deviceLocalACCosPhi" typeId="device-local-ac-cos-phi"/>
+                       <channel id="deviceLocalACFrequency" typeId="device-local-ac-frequency"/>
                        <channel id="deviceLocalACPhase1CurrentAmperage" typeId="device-local-ac-phase-1-current-amperage"/>
                        <channel id="deviceLocalACPhase1CurrentPower" typeId="device-local-ac-phase-1-current-power"/>
                        <channel id="deviceLocalACPhase1CurrentVoltage" typeId="device-local-ac-phase-1-current-voltage"/>
index 4e99f2301611b52a032b80730202133c168086bb..0772a5741b74a1d026cd79cbdbb08053ad88bd31 100644 (file)
@@ -17,6 +17,8 @@
                        <channel id="deviceLocalLimitEVUAbsolute" typeId="device-local-limit-evu-absolute"/>
                        <channel id="deviceLocalLimitEVURelativ" typeId="device-local-limit-evu-relativ"/>
                        <channel id="deviceLocalWorktime" typeId="device-local-worktime"/>
+                       <channel id="deviceLocalACCosPhi" typeId="device-local-ac-cos-phi"/>
+                       <channel id="deviceLocalACFrequency" typeId="device-local-ac-frequency"/>
                        <channel id="deviceLocalACPhase1CurrentAmperage" typeId="device-local-ac-phase-1-current-amperage"/>
                        <channel id="deviceLocalACPhase1CurrentPower" typeId="device-local-ac-phase-1-current-power"/>
                        <channel id="deviceLocalACPhase1CurrentVoltage" typeId="device-local-ac-phase-1-current-voltage"/>
index 524cb7d3850c2c7b5b7e214101748691ac00c0df..5b72df295204d6301d005477f4794069240f893d 100644 (file)
@@ -16,6 +16,8 @@
                        <channel id="deviceLocalLimitEVUAbsolute" typeId="device-local-limit-evu-absolute"/>
                        <channel id="deviceLocalLimitEVURelativ" typeId="device-local-limit-evu-relativ"/>
                        <channel id="deviceLocalWorktime" typeId="device-local-worktime"/>
+                       <channel id="deviceLocalACCosPhi" typeId="device-local-ac-cos-phi"/>
+                       <channel id="deviceLocalACFrequency" typeId="device-local-ac-frequency"/>
                        <channel id="deviceLocalACPhase1CurrentAmperage" typeId="device-local-ac-phase-1-current-amperage"/>
                        <channel id="deviceLocalACPhase1CurrentPower" typeId="device-local-ac-phase-1-current-power"/>
                        <channel id="deviceLocalACPhase1CurrentVoltage" typeId="device-local-ac-phase-1-current-voltage"/>
index c7050564bc19a247c482d83374e3982e9bcbbe1f..66945893b24a067d7de7093c289d8b5d8e534ed1 100644 (file)
@@ -17,6 +17,8 @@
                        <channel id="deviceLocalLimitEVUAbsolute" typeId="device-local-limit-evu-absolute"/>
                        <channel id="deviceLocalLimitEVURelativ" typeId="device-local-limit-evu-relativ"/>
                        <channel id="deviceLocalWorktime" typeId="device-local-worktime"/>
+                       <channel id="deviceLocalACCosPhi" typeId="device-local-ac-cos-phi"/>
+                       <channel id="deviceLocalACFrequency" typeId="device-local-ac-frequency"/>
                        <channel id="deviceLocalACPhase1CurrentAmperage" typeId="device-local-ac-phase-1-current-amperage"/>
                        <channel id="deviceLocalACPhase1CurrentPower" typeId="device-local-ac-phase-1-current-power"/>
                        <channel id="deviceLocalACPhase1CurrentVoltage" typeId="device-local-ac-phase-1-current-voltage"/>
index 9df186e33bd2800123c208477e348139a43111fa..1139334ac2934d2a95f90b67c117af602ee7b351 100644 (file)
@@ -16,6 +16,8 @@
                        <channel id="deviceLocalLimitEVUAbsolute" typeId="device-local-limit-evu-absolute"/>
                        <channel id="deviceLocalLimitEVURelativ" typeId="device-local-limit-evu-relativ"/>
                        <channel id="deviceLocalWorktime" typeId="device-local-worktime"/>
+                       <channel id="deviceLocalACCosPhi" typeId="device-local-ac-cos-phi"/>
+                       <channel id="deviceLocalACFrequency" typeId="device-local-ac-frequency"/>
                        <channel id="deviceLocalACPhase1CurrentAmperage" typeId="device-local-ac-phase-1-current-amperage"/>
                        <channel id="deviceLocalACPhase1CurrentPower" typeId="device-local-ac-phase-1-current-power"/>
                        <channel id="deviceLocalACPhase1CurrentVoltage" typeId="device-local-ac-phase-1-current-voltage"/>