[kostalinverter] Added new channels frequency and cosphi (#10779)

new channels frequency and power factor.

Signed-off-by: Martin Hubert <github@martin-hubert.de>

Co-authored-by: Martin Hubert <github@martin-hubert.de>
This commit is contained in:
Martin H 2021-06-05 14:45:00 +02:00 committed by GitHub
parent d36e1f1018
commit 7c5f60dae2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 44 additions and 1 deletions

View 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";

View File

@ -26,5 +26,6 @@ enum ThirdGenerationChannelDatatypes {
WATT,
AMPERE,
AMPERE_HOUR,
VOLT
VOLT,
HERTZ
}

View 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);

View 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",

View File

@ -70,6 +70,18 @@
<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>

View 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"/>

View 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"/>

View 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"/>

View 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"/>

View 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"/>

View 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"/>

View 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"/>

View 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"/>

View 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"/>

View 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"/>