[ferroamp] Binding for Ferroamp 20241010

This is the binding for local connection to the Ferroamp Energy System

Signed-off-by: Örjan Backsell <orjan.backsell@gmail.com>
This commit is contained in:
Örjan Backsell 2024-10-10 11:51:43 +02:00
parent 6b411899cc
commit b6865030c7
29 changed files with 3703 additions and 14 deletions

View File

@ -114,6 +114,7 @@
/bundles/org.openhab.binding.feed/ @openhab/add-ons-maintainers /bundles/org.openhab.binding.feed/ @openhab/add-ons-maintainers
/bundles/org.openhab.binding.feican/ @Hilbrand /bundles/org.openhab.binding.feican/ @Hilbrand
/bundles/org.openhab.binding.fenecon/ @nixoso /bundles/org.openhab.binding.fenecon/ @nixoso
/bundles/org.openhab.binding.ferroamp/ @basse04
/bundles/org.openhab.binding.fineoffsetweatherstation/ @Andy2003 /bundles/org.openhab.binding.fineoffsetweatherstation/ @Andy2003
/bundles/org.openhab.binding.flicbutton/ @pfink /bundles/org.openhab.binding.flicbutton/ @pfink
/bundles/org.openhab.binding.fmiweather/ @ssalonen /bundles/org.openhab.binding.fmiweather/ @ssalonen

View File

@ -556,6 +556,11 @@
<artifactId>org.openhab.binding.fenecon</artifactId> <artifactId>org.openhab.binding.fenecon</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.ferroamp</artifactId>
<version>${project.version}</version>
</dependency>
<dependency> <dependency>
<groupId>org.openhab.addons.bundles</groupId> <groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.fineoffsetweatherstation</artifactId> <artifactId>org.openhab.binding.fineoffsetweatherstation</artifactId>

View File

@ -0,0 +1,13 @@
This content is produced and maintained by the openHAB project.
* Project home: https://www.openhab.org
== Declared Project Licenses
This program and the accompanying materials are made available under the terms
of the Eclipse Public License 2.0 which is available at
https://www.eclipse.org/legal/epl-2.0/.
== Source Code
https://github.com/openhab/openhab-addons

View File

@ -0,0 +1,239 @@
## Ferroamp Binding
The Ferroamp binding is used to get live data from Ferroamp EnergyHub
The Ferroamp binding is compatible with EnergyHub Wall and EnergyHub XL, and use connection to your local EnergyHub via LAN or similar.
Data and commands are received/sent using MQTT where the user connects to the MQTT broker residing on the EnergyHub.
Contact Ferroamp support to enable MQTT in the EnergyHub and to get the Username and Password:
https://ferroamp.com/om-ferroamp/
## Supported Things
The binding retrieves data from the different parts of the Ferroamp EnergyHub such as:
- `Ehub`: EnergyHub Wall and EnergyHub XL.
- `Sso`: Solar string optimizer.
- `Eso`: Bidirectional DC/DC converter for connection of battery.
- `Esm`: Energy Storage Module.
## Discovery
Discovery is not supported.
## Thing Configuration
The following configuration-parameters are available.
| Name | Type | Description | Default | Required | Advanced |
|-----------------|---------|------------------------------------------|---------|----------|----------|
| hostName | text | Hostname or IP address of the device | N/A | yes | no |
| userName | text | Username to access the device | N/A | yes | no |
| password | text | Password to access the device | N/A | yes | no |
| hasBattery | boolean | Is there a battery connected or not? | N/A | no | yes |
| ssoS0 | boolean | Is there a first SSO unit connected? | N/A | no | no |
| ssoS1 | boolean | Is there a second SSO unit connected? | N/A | no | no |
| ssoS2 | boolean | Is there a third SSO unit connected? | N/A | no | no |
| ssoS3 | boolean | Is there a fourth SSO unit connected? | N/A | no | no |
| The unique serial number is marked on the side of the SSO unit. Ex. PS00990-A04-S20120476
## Channels
| Channel Type ID | Item Type | Read/Write | Label | Description
|----------------------------------------------------------------------------------------------------------------------------------------------
| grid-frequency | Number:Frequency | R | Estimated Grid Frequency | Estimated Grid Frequency |
| ace-current-l1 | Number:ElectricCurrent | R | ACE Current L1 | ACE equalization current set-points in Arms |
| ace-current-l2 | Number:ElectricCurrent | R | ACE Current L2 | ACE equalization current set-points in Arms |
| ace-current-l3 | Number:ElectricCurrent | R | ACE Current L3 | ACE equalization current set-points in Arms |
| external-voltage-l1 | Number:ElectricPotential | R | External Voltage L1 | External voltage |
| external-voltage-l2 | Number:ElectricPotential | R | External Voltage L2 | External voltage |
| external-voltage-l3 | Number:ElectricPotential | R | External Voltage L3 | External voltage |
| inverter-rms-current-l1 | Number:ElectricCurrent | R | Inverter RMS Current L1 | Inverter RMS current |
| inverter-rms-current-l2 | Number:ElectricCurrent | R | Inverter RMS Current L2 | Inverter RMS current |
| inverter-rms-current-l3 | Number:ElectricCurrent | R | Inverter RMS Current L3 | Inverter RMS current |
| inverter-current-reactive-l1 | Number:ElectricCurrent | R | Inverter Current Reactive L1 | Inverter reactive current |
| inverter-current-reactive-l2 | Number:ElectricCurrent | R | Inverter Current Reactive L2 | Inverter reactive current |
| inverter-current-reactive-l3 | Number:ElectricCurrent | R | Inverter Current Reactive L3 | Inverter reactive current |
| inverter-current-active-l1 | Number:ElectricCurrent | R | Inverter Active current L1 | Inverter active current |
| inverter-current-active-l2 | Number:ElectricCurrent | R | Inverter Active current L1 | Inverter active current |
| inverter-current-active-l3 | Number:ElectricCurrent | R | Inverter Active current L1 | Inverter active current |
| grid-current-l1 | Number:ElectricCurrent | R | Grid Current L1 | External/grid RMS current |
| grid-current-l2 | Number:ElectricCurrent | R | Grid Current L2 | External/grid RMS current |
| grid-current-l3 | Number:ElectricCurrent | R | Grid Current L3 | External/grid RMS current |
| grid-current-reactive-l1 | Number:ElectricCurrent | R | Grid Current Reactive L1 | External/grid current reactive |
| grid-current-reactive-l2 | Number:ElectricCurrent | R | Grid Current Reactive L2 | External/grid current reactive |
| grid-current-reactive-l3 | Number:ElectricCurrent | R | Grid Current Reactive L3 | External/grid current reactive |
| grid-current-active-l1 | Number:ElectricCurrent | R | Grid Current Active L1 | External/grid current active |
| grid-current-active-l2 | Number:ElectricCurrent | R | Grid Current Active L2 | External/grid current active |
| grid-current-active-l3 | Number:ElectricCurrent | R | Grid Current Active L3 | External/grid current active |
| inverter-reactive-current-l1 | Number:ElectricCurrent | R | Inverter Reactive Current L1 |
| inverter-reactive-current-l2 | Number:ElectricCurrent | R | Inverter Reactive Current L2 |
| inverter-reactive-current-l3 | Number:ElectricCurrent | R | Inverter Reactive Current L3 |
| inverter-load-l1 | Number:ElectricCurrent | R | Inverter Load L1 |
| inverter-load-l2 | Number:ElectricCurrent | R | Inverter Load L2 |
| inverter-load-l3 | Number:ElectricCurrent | R | Inverter Load L3 |
| apparent-power | Number:Energy | R | Apparent Power | Apparent power
| grid-power-active-l1 | Number:Power | R | Grid Power Active L1 | External/grid power, active |
| grid-power-active-l2 | Number:Power | R | Grid Power Active L2 | External/grid power, active |
| grid-power-active-l3 | Number:Power | R | Grid Power Active L3 | External/grid power, active |
| grid-power-reactive-l1 | Number:Power | R | Grid Power Reactive L1 | External/grid power, reactive |
| grid-power-reactive-l2 | Number:Power | R | Grid Power Reactive L2 | External/grid power, reactive |
| grid-power-reactive-l3 | Number:Power | R | Grid Power Reactive L3 | External/grid power, reactive |
| inverter-power-active-l1 | Number:Power | R | Inverter Power Active L1 | Inverter power, active |
| inverter-power-active-l2 | Number:Power | R | Inverter Power Active L2 | Inverter power, active |
| inverter-power-active-l3 | Number:Power | R | Inverter Power Active L3 | Inverter power, active |
| inverter-power-reactive-l1 | Number:Power | R | Inverter Power Reactive L1 | Inverter power, reactive |
| inverter-power-reactive-l1 | Number:Power | R | Inverter Power Reactive L2 | Inverter power, reactive |
| inverter-power-reactive-l1 | Number:Power | R | Inverter Power Reactive L3 | Inverter power, reactive |
| consumption-power-l1 | Number:Power | R | Consumption Power L1 |
| consumption-power-l2 | Number:Power | R | Consumption Power L2 |
| consumption-power-l3 | Number:Power | R | Consumption Power L3 |
| consumption-power-reactive-l1 | Number:Power | R | Consumption Power Reactive L1 |
| consumption-power-reactive-l2 | Number:Power | R | Consumption Power Reactive L2 |
| consumption-power-reactive-l3 | Number:Power | R | Consumption Power Reactive L3 |
| solar-pv | Number:Power | R | Solar Power | Only sent when system has PV |
| positive-dc-link-voltage | Number:ElectricPotential | R | Positiv DC Link Voltage | Positiv DC link voltage |
| negative-dc-link-voltage | Number:ElectricPotential | R | Negative DC Link Voltage | Negative DC link voltage |
| external-energy-produced-l1 | Number:Energy | R | External Energy Produced L1 |
| external-energy-produced-l2 | Number:Energy | R | External Energy Produced L2 |
| external-energy-produced-l3 | Number:Energy | R | External Energy Produced L3 |
| external-energy-consumed-l1 | Number:Energy | R | External Energy Consumed L1 |
| external-energy-consumed-l2 | Number:Energy | R | External Energy Consumed L2 |
| external-energy-consumed-l3 | Number:Energy | R | External Energy Consumed L3 |
| inverter-energy-produced-l1 | Number:Energy | R | Inverter Energy Produced L1 |
| inverter-energy-produced-l2 | Number:Energy | R | Inverter Energy Produced L2 |
| inverter-energy-produced-l3 | Number:Energy | R | Inverter Energy Produced L3 |
| inverter-energy-consumed-l1 | Number:ElectricCurrent | R | Inverter Energy Consumed L1 |
| inverter-energy-consumed-l2 | Number:ElectricCurrent | R | Inverter Energy Consumed L2 |
| inverter-energy-consumed-l3 | Number:ElectricCurrent | R | Inverter Energy Consumed L3 |
| load-energy-produced-l1 | Number:Energy | R | Load Energy Produced L1 |
| load-energy-produced-l2 | Number:Energy | R | Load Energy Produced L2 |
| load-energy-produced-l3 | Number:Energy | R | Load Energy Produced L3 |
| load-energy-consumed-l1 | Number:Energy | R | Load Energy Consumed L1 |
| load-energy-consumed-l2 | Number:Energy | R | Load Energy Consumed L2 |
| load-energy-consumed-l3 | Number:Energy | R | Load Energy Consumed L3 |
| external-energy-produced-3p | Number:Energy | R | External Energy Produced 3P |
| external-energy-consumed-3p | Number:Energy | R | External Energy Consumed 3P |
| inverter-energy-produced-3p | Number:Energy | R | Inverter Energy Produced 3P |
| inverter-energy-consumed-3p | Number:Energy | R | Inverter Energy Consumed 3P |
| load-energy-produced-3p | Number:Energy | R | Load Energy Produced 3P |
| load-energy-consumed-3p | Number:Energy | R | Load Energy Consumed 3P |
| total-solar-energy | Number:Energy | R | Total Solar Energy | Only sent when system has PV |
| state | String | R | State of the System |
| timestamp | DateTime | R | Time Stamp When Message was Published | Time stamp when message was published |
| battery-energy-produced | Number:Energy | R | Battery Energy Produced | Only sent when system has batteries |
| battery-energy-consumed | Number:Energy | R | Battery Energy Consumed | Only sent when system has batteries |
| soc | Number:Dimensionless | R | System State of Check | State of the system |
| soh | Number:Dimensionless | R | System State of Health |
| power-battery | Number:Power | R | Battery Power | Only sent when system has batteries |
| total-rated-capacity-all-batteries | Number:Energy | R | Total Rated Capacity of All Batteries |
| s0-id | String | R | S0 ID | Unique identifier of SSO-0 |
| s0-measured-voltage-on-pv-string-side | Number:ElectricPotential | R | S0 Measured Voltage on PV String Side | Measured on PV string side |
| s0-measured-current-on-pv-string-side | Number:ElectricCurrent | R | S0 Measured Current on PV String Side | Measured on PV string side |
| s0-total-solar-energy | Number:Energy | R | S0 Total Solar Energy | Total energy produced by SSO-0 |
| s0-relay-status | String | R | S0 Relay Status | 0 = relay closed (i.e running power), 1 = relay open/disconnected, 2 = precharge |
| s0-temperature | Number:Temperature | R | S0 Temperature Measured on PCB | Temperature Measured on PCB |
| s0-fault-code | String | R | S0 FaultCode | 0x00 = OK. For all other values Please contact Ferroamp support |
| s0-dc-link-voltage | Number:ElectricPotential | R | S0 DC Link Voltage | DC link voltage as measured by SSO-0 |
| s0-timestamp | DateTime | R | S0 Time Stamp When Message was Published | Time stamp when message was published |
|
| s1-id | String | R | S1 ID | Unique identifier of SSO-1 |
| s1-measured-voltage-on-pv-string-side | Number:ElectricPotential | R | S1 easured Voltage on PV String Side | Measured on PV string side |
| s1-measured-current-on-pv-string-side | Number:ElectricCurrent | R | S1 Measured Current on PV String Side | Measured on PV string side |
| s1-total-solar-energy | Number:Energy | R | S1 Total Solar Energy | Total energy produced by SSO-1 |
| s1-relay-status | String | R | S1 Relay Status | 0 = relay closed (i.e running power), 1 = relay open/disconnected, 2 = precharge |
| s1-temperature | Number:Temperature | R | S1 Temperature Measured on PCB | Temperature Measured on PCB |
| s1-fault-code | String | R | S1 FaultCode | 0x00 = OK. For all other values Please contact Ferroamp support |
| s1-dc-link-voltage | Number:ElectricPotential | R | S1 DC Link Voltage | DC link voltage as measured by SSO-1 |
| s1-timestamp | DateTime | R | S1 Time Stamp When Message was Published | Time stamp when message was published |
|
| s2-id | String | R | S2 ID | Unique identifier of SSO-2 |
| s2-measured-voltage-on-pv-string-side | Number:ElectricPotential | R | S2 Measured Voltage on PV String Side | Measured on PV string side |
| s2-measured-current-on-pv-string-side | Number:ElectricCurrent | R | S2 Measured Current on PV String Side | Measured on PV string side |
| s2-total-solar-energy | Number:Energy | R | S2 Total Solar Energy | Total energy produced by SSO-2 |
| s2-relay-status | String | R | S2 Relay Status | 0 = relay closed (i.e running power), 1 = relay open/disconnected, 2 = precharge |
| s2-temperature | Number:Temperature | R | S2 Temperature Measured on PCB | Temperature Measured on PCB |
| s2-fault-code | String | R | S2 FaultCode | 0x00 = OK. For all other values Please contact Ferroamp support |
| s2-dc-link-voltage | Number:ElectricPotential | R | S2 DC Link Voltage | DC link voltage as measured by SSO-2 |
| s2-timestamp | DateTime | R | S2 Time Stamp When Message was Published | Time stamp when message was published |
|
| s3-id | String | R | S3 ID | Unique identifier of SSO-3 |
| s3-measured-voltage-on-pv-string-side | Number:ElectricPotential | R | S3 Measured Voltage on PV String Side | Measured on PV string side |
| s3-measured-current-on-pv-string-side | Number:ElectricCurrent | R | S3 Measured Current on PV String Side | Measured on PV string side |
| s3-total-solar-energy | Number:Energy | R | S3 Total Solar Energy | Total energy produced by SSO-3 |
| s3-relay-status | String | R | S3 Relay Status | 0 = relay closed (i.e running power), 1 = relay open/disconnected, 2 = precharge |
| s3-temperature | Number:Temperature | R | S3 Temperature Measured on PCB | Temperature Measured on PCB |
| s3-fault-code | String | R | S3 FaultCode | 0x00 = OK. For all other values Please contact Ferroamp support |
| s3-dc-link-voltage | Number:ElectricPotential | R | S3 DC Link Voltage | DC link voltage as measured by SSO-3 |
| s3-timestamp | DateTime | R | S3 Time Stamp When Message was Published | Time stamp when message was published |
|
| eso-unique-identifier | String | R | Eso Unique Identifier | Unique identifier |
| measured-voltage-battery | Number:ElectricPotential | R | Eso Voltage Measured on Battery Side | Measured on battery side |
| measured-current-battery | Number:ElectricCurrent | R | Eso Current Measured on Battery Side | Measured on battery side |
| eso-battery-energy-produced | Number:Energy | R | Eso Battery Energy Produced | Total energy produced by ESO, i.e total energy charged |
| eso-battery-energy-consumed | Number:Energy | R | Eso Battery Energy Consumed | Total energy consumed by ESO, i.e total energy discharged |
| eso-soc | Number:Dimensionless | R | Eso State of Charge | State of Charge for ESO |
| eso-relay-status | String | R | Eso Relay Status | 0 = relay closed, 1 = relay open |
| eso-temperature | Number:Temperature | R | Eso Temperature Measured on PCB | Measured inside ESO |
| eso-fault-code | String | R | Eso FaultCode | See section 4.1.3.1 in Ferroamp-External-API-specifikation |
| eso-battery-energy-produced | Number:Energy | R | Eso Battery Energy Produced | Total energy produced by ESO, i.e total energy charged |
| eso-dc-link-voltage | Number:ElectricPotential | R | Eso Dc Link Voltage | DC link voltage as measured by ESO |
| eso-timestamp | DateTime | R | Eso Time Stamp When Message was Published| Time stamp when message was published |
| esm-unique-identifier | String | R | Esm Unique Identifier | Unique identifier of battery. If available, this will be the unique id that the battery reports.|
| esm-soh | Number:Dimensionless | R | Esm System State of Health | State of Health for ESM |
| esm-soc | Number:Dimensionless | R | Esm System State of Charge | State of Charge for ESM |
| esm-total-rated-capacity-all-batteries | Number:Energy | R | Esm Rated Capacity | Rated capacity of battery |
| esm-rated-power-battery | Number:Power | R | Esm Rated power of battery | Rated power of battery |
| esm-status | String | R | Esm Status | Dependent on battery manufacturer |
| esm-timestamp | DateTime | R | Esm Time Stamp When Message was Published| Time stamp when message was published |
The following channels are available for `Ferroamp` EnergyHub configuration. Please, see Ferroamp documentation for more details.
| Channel Type ID | Item Type | Read/Write | Description |
|---------------------------------------------------|------------|------------------------------------------|
| request-charge | String | W | Set charge power, value in Watt |
| request-discharge | String | W | Set discharge power, value in Watt |
| request-auto | String | W | Set auto power. Returning control of batteries to system, value as auto.|
# Full Example
## Thing
```java
Thing ferroamp:energyhub:myenergyhub [ hostName="energyhub-ip", userName="myUserName", password="myPassword", hasBattery=false ]
```
## Items
```java
Number:Energy Ferroamp "Load Energy Consumed L1" <energy> { channel="ferroamp:energyhub:myenergyhub:load-energy-consumed-l1" }
String Ferroamp "RequestCharge" <energy> { channel="ferroamp:energyhub:myenergyhub:request-charge" }
```
## Rules
Ex. Set Charging with 5000W with cron trigger:
```yaml
triggers:
id: "1"
configuration:
cronExpression: 0 0/2 * * * ? *
type: timer.GenericCronTrigger
conditions: []
actions:
inputs: {}
id: "2"
configuration:
type: application/vnd.openhab.dsl.rule
script: ChargingWith5000W.sendCommand("5000")
type: script.ScriptAction
```

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.addons.reactor.bundles</artifactId>
<version>4.3.0-SNAPSHOT</version>
</parent>
<artifactId>org.openhab.binding.ferroamp</artifactId>
<name>openHAB Add-ons :: Bundles :: Ferroamp Binding</name>
<dependencies>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.mqtt</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<features name="org.openhab.binding.ferroamp-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.4.0">
<repository>mvn:org.openhab.core.features.karaf/org.openhab.core.features.karaf.openhab-core/${ohc.version}/xml/features</repository>
<feature name="openhab-binding-ferroamp" description="ferroamp Binding" version="${project.version}">
<feature>openhab-runtime-base</feature>
<feature>openhab-transport-mqtt</feature>
<bundle dependency="true">mvn:org.openhab.addons.bundles/org.openhab.binding.mqtt/${project.version}</bundle>
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.binding.mqtt/${project.version}</bundle>
<bundle start-level="81">mvn:org.openhab.addons.bundles/org.openhab.binding.ferroamp/${project.version}</bundle>
</feature>
</features>

View File

@ -0,0 +1,51 @@
/**
* Copyright (c) 2010-2024 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.ferroamp.dto;
/**
* The {@link GetGeneralLx} is responsible for parsing of Lx parts of received MQTT messages.
*
* @author Örjan Backsell - Initial contribution
*
*/
public class GetGeneralLx {
private String L1;
private String L2;
private String L3;
public void setL1(String L1) {
this.L1 = L1;
}
public String getL1() {
return L1;
}
public void setL2(String L2) {
this.L2 = L2;
}
public String getL2() {
return L2;
}
public void setL3(String L3) {
this.L3 = L3;
}
public String getL3() {
return L3;
}
}

View File

@ -0,0 +1,42 @@
/**
* Copyright (c) 2010-2024 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.ferroamp.dto;
/**
* The {@link GetGeneralValLx} is responsible for parsing of value parts of received MQTT messages.
*
* @author Örjan Backsell - Initial contribution
*
*/
public class GetGeneralValues {
private String name;
private String val;
public void setName(String name) {
this.name = name;
}
public void setVal(String val) {
this.val = val;
}
public String getName() {
return name;
}
public String getVal() {
return val;
}
}

View File

@ -0,0 +1,42 @@
/**
* Copyright (c) 2010-2024 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.ferroamp.dto;
/**
* The {@link GetUdc} is responsible for parsing of Udc part of received MQTT messages.
*
* @author Örjan Backsell - Initial contribution
*
*/
public class GetUdc {
private String pos;
private String neg;
public void setPos(String pos) {
this.pos = pos;
}
public String getPos() {
return pos;
}
public void setNeg(String neg) {
this.neg = neg;
}
public String getNeg() {
return neg;
}
}

View File

@ -0,0 +1,80 @@
/**
* Copyright (c) 2010-2024 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.ferroamp.internal;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.jdt.annotation.NonNullByDefault;
/**
* The {@link EhubParameters} is responsible for all parameters regarded to EHUB
*
* @author Örjan Backsell - Initial contribution
*
*/
@NonNullByDefault
public class EhubJsonElements {
public String ehubJsonElements;
public EhubJsonElements(String ehubJsonElements) {
this.ehubJsonElements = ehubJsonElements;
}
public static List<String> getJsonElementsEhub() {
final List<String> jsonElementsEhub = new ArrayList<>();
jsonElementsEhub.add(new String("gridfreq"));
jsonElementsEhub.add(new String("iace"));
jsonElementsEhub.add(new String("ul"));
jsonElementsEhub.add(new String("il"));
jsonElementsEhub.add(new String("ild"));
jsonElementsEhub.add(new String("ilq"));
jsonElementsEhub.add(new String("iext"));
jsonElementsEhub.add(new String("iextd"));
jsonElementsEhub.add(new String("iextq"));
jsonElementsEhub.add(new String("iloadd"));
jsonElementsEhub.add(new String("iloadq"));
jsonElementsEhub.add(new String("sext"));
jsonElementsEhub.add(new String("pext"));
jsonElementsEhub.add(new String("pextreactive"));
jsonElementsEhub.add(new String("pinv"));
jsonElementsEhub.add(new String("pinvreactive"));
jsonElementsEhub.add(new String("pload"));
jsonElementsEhub.add(new String("ploadreactive"));
jsonElementsEhub.add(new String("ppv"));
jsonElementsEhub.add(new String("udc"));
jsonElementsEhub.add(new String("wextprodq"));
jsonElementsEhub.add(new String("wextconsq"));
jsonElementsEhub.add(new String("winvprodq"));
jsonElementsEhub.add(new String("winvconsq"));
jsonElementsEhub.add(new String("wloadprodq"));
jsonElementsEhub.add(new String("wloadconsq"));
jsonElementsEhub.add(new String("wextprodq_3p"));
jsonElementsEhub.add(new String("wextconsq_3p"));
jsonElementsEhub.add(new String("winvprodq_3p"));
jsonElementsEhub.add(new String("winvconsq_3p"));
jsonElementsEhub.add(new String("wloadprodq_3p"));
jsonElementsEhub.add(new String("wloadconsq_3p"));
jsonElementsEhub.add(new String("wpv"));
jsonElementsEhub.add(new String("state"));
jsonElementsEhub.add(new String("ts"));
jsonElementsEhub.add(new String("wbatprod"));
jsonElementsEhub.add(new String("wpbatcons"));
jsonElementsEhub.add(new String("soc"));
jsonElementsEhub.add(new String("soh"));
jsonElementsEhub.add(new String("pbat"));
jsonElementsEhub.add(new String("ratedcap"));
return jsonElementsEhub;
}
}

View File

@ -0,0 +1,63 @@
/**
* Copyright (c) 2010-2024 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.ferroamp.internal;
import java.util.Arrays;
import java.util.List;
import org.eclipse.jdt.annotation.NonNullByDefault;
/**
* The {@link EhubParameters} is responsible for all parameters regarded to EHUB
*
* @author Örjan Backsell - Initial contribution
*
*/
@NonNullByDefault
public class EhubParameters {
public String jsonPostEhub;
public EhubParameters(String jsonPostEhub) {
this.jsonPostEhub = jsonPostEhub;
}
public static List<String> getChannelParametersEhub() {
final List<String> channelParametersEhub = Arrays.asList("grid-frequency", "ace-current-l1", "ace-current-l2",
"ace-current-l3", "external-voltage-l1", "external-voltage-l2", "external-voltage-l3",
"inverter-rms-current-l1", "inverter-rms-current-l2", "inverter-rms-current-l3",
"inverter-current-reactive-l1", "inverter-current-reactive-l2", "inverter-current-reactive-l3",
"inverter-current-active-l1", "inverter-current-active-l2", "inverter-current-active-l3",
"grid-current-l1", "grid-current-l2", "grid-current-l3", "grid-current-reactive-l1",
"grid-current-reactive-l2", "grid-current-reactive-l3", "grid-current-active-l1",
"grid-current-active-l2", "grid-current-active-l3", "inverter-load-l1", "inverter-load-l2",
"inverter-load-l3", "apparent-power", "grid-power-active-l1", "grid-power-active-l2",
"grid-power-active-l3", "grid-power-reactive-l1", "grid-power-reactive-l2", "grid-power-reactive-l3",
"inverter-power-active-l1", "inverter-power-active-l2", "inverter-power-active-l3",
"inverter-power-reactive-l1", "inverter-power-reactive-l2", "inverter-power-reactive-l3",
"consumption-power-l1", "consumption-power-l2", "consumption-power-l3", "consumption-power-reactive-l1",
"consumption-power-reactive-l2", "consumption-power-reactive-l3", "solar-pv",
"positive-dc-link-voltage", "negative-dc-link-voltage", "external-energy-produced-l1",
"external-energy-produced-l2", "external-energy-produced-l3", "external-energy-consumed-l1",
"external-energy-consumed-l2", "external-energy-consumed-l3", "inverter-energy-produced-l1",
"inverter-energy-produced-l2", "inverter-energy-produced-l3", "inverter-energy-consumed-l1",
"inverter-energy-consumed-l2", "inverter-energy-consumed-l3", "load-energy-produced-l1",
"load-energy-produced-l2", "load-energy-produced-l3", "load-energy-consumed-l1",
"load-energy-consumed-l2", "load-energy-consumed-l3", "external-energy-produced-3p",
"external-energy-consumed-3p", "inverter-energy-produced-3p", "inverter-energy-consumed-3p",
"load-energy-produced-3p", "load-energy-consumed-3p", "total-solar-energy", "state", "timestamp",
"battery-energy-produced", "battery-energy-consumed", "soc", "soh", "power-battery",
"total-rated-capacity-all-batteries");
return channelParametersEhub;
}
}

View File

@ -0,0 +1,47 @@
/**
* Copyright (c) 2010-2024 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.ferroamp.internal;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.jdt.annotation.NonNullByDefault;
/**
* The {@link EhubParameters} is responsible for all parameters regarded to EHUB
*
* @author Örjan Backsell - Initial contribution
*
*/
@NonNullByDefault
public class EsmJsonElements {
public String esmJsonElements;
public EsmJsonElements(String esmJsonElements) {
this.esmJsonElements = esmJsonElements;
}
public static List<String> getJsonElementsEsm() {
final List<String> jsonElementsEsm = new ArrayList<>();
jsonElementsEsm.add(new String("id"));
jsonElementsEsm.add(new String("soh"));
jsonElementsEsm.add(new String("soc"));
jsonElementsEsm.add(new String("ratedcapacity"));
jsonElementsEsm.add(new String("ratedpower"));
jsonElementsEsm.add(new String("status"));
jsonElementsEsm.add(new String("ts"));
return jsonElementsEsm;
}
}

View File

@ -0,0 +1,41 @@
/**
* Copyright (c) 2010-2024 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.ferroamp.internal;
import java.util.Arrays;
import java.util.List;
import org.eclipse.jdt.annotation.NonNullByDefault;
/**
* The {@link EsmParameters} is responsible for all parameters regarded to ESM
*
* @author Örjan Backsell - Initial contribution
*
*/
@NonNullByDefault
public class EsmParameters {
public String jsonPostEsm;
public EsmParameters(String jsonPostEsm) {
this.jsonPostEsm = jsonPostEsm;
}
public static List<String> getChannelParametersEsm() {
final List<String> channelParametersEsm = Arrays.asList("esm-unique-identifier", "esm-soh", "esm-soc",
"esm-total-rated-capacity-all-batteries", "esm-rated-power-battery", "esm-status", "esm-timestamp");
return channelParametersEsm;
}
}

View File

@ -0,0 +1,51 @@
/**
* Copyright (c) 2010-2024 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.ferroamp.internal;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.jdt.annotation.NonNullByDefault;
/**
* The {@link EhubParameters} is responsible for all parameters regarded to EHUB
*
* @author Örjan Backsell - Initial contribution
*
*/
@NonNullByDefault
public class EsoJsonElements {
public String esoJsonElements;
public EsoJsonElements(String esoJsonElements) {
this.esoJsonElements = esoJsonElements;
}
public static List<String> getJsonElementsEso() {
final List<String> jsonElementsEso = new ArrayList<>();
jsonElementsEso.add(new String("id"));
jsonElementsEso.add(new String("ubat"));
jsonElementsEso.add(new String("ibat"));
jsonElementsEso.add(new String("wbatprod"));
jsonElementsEso.add(new String("wbatcons"));
jsonElementsEso.add(new String("soc"));
jsonElementsEso.add(new String("relaystatus"));
jsonElementsEso.add(new String("temp"));
jsonElementsEso.add(new String("faultcode"));
jsonElementsEso.add(new String("udc"));
jsonElementsEso.add(new String("ts"));
return jsonElementsEso;
}
}

View File

@ -0,0 +1,42 @@
/**
* Copyright (c) 2010-2024 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.ferroamp.internal;
import java.util.Arrays;
import java.util.List;
import org.eclipse.jdt.annotation.NonNullByDefault;
/**
* The {@link EsoParameters} is responsible for all parameters regarded to ESO
*
* @author Örjan Backsell - Initial contribution
*
*/
@NonNullByDefault
public class EsoParameters {
public String jsonPostEso;
public EsoParameters(String jsonPostEso) {
this.jsonPostEso = jsonPostEso;
}
public static List<String> getChannelParametersEso() {
final List<String> channelParametersEso = Arrays.asList("eso-unique-identifier", "eso-measured-voltage-battery",
"eso-measured-current-battery", "eso-battery-energy-produced", "eso-battery-energy-consumed", "eso-soc",
"eso-relay-status", "eso-temperature", "eso-fault-code", "eso-dc-link-voltage", "eso-timestamp");
return channelParametersEso;
}
}

View File

@ -0,0 +1,208 @@
/**
* Copyright (c) 2010-2024 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.ferroamp.internal;
import java.util.Set;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.core.thing.ThingTypeUID;
/**
* The {@link FerroampBindingConstants} class defines common constants, which are
* used across the whole binding.
*
* @author Örjan Backsell - Initial contribution
*
*/
@NonNullByDefault
public class FerroampBindingConstants {
public static final String BINDING_ID = "ferroamp";
// Broker (energyhub) port number
static final int BROKER_PORT = 1883;
// Broker (energyhub) status
public static final String CONNECTED = "connected";
// Broker (energyhub) topics
public static final String EHUB_TOPIC = "extapi/data/ehub";
public static final String SSO_TOPIC = "extapi/data/sso";
public static final String ESO_TOPIC = "extapi/data/eso";
public static final String ESM_TOPIC = "extapi/data/esm";
public static final String REQUEST_TOPIC = "extapi/control/request";
// Broker (energyhub) QOS level
public static final String QOS = "2";
// List of all Thing Type UIDs
public static final ThingTypeUID THING_TYPE_ENERGYHUB = new ThingTypeUID(BINDING_ID, "energyhub");
// List of EHUB Channel ids
public static final String CHANNEL_GRIDFREQUENCY = "grid-frequency";
public static final String CHANNEL_ACECURRENTL1 = "ace-current-l1";
public static final String CHANNEL_ACECURRENTL2 = "ace-current-l2";
public static final String CHANNEL_ACECURRENTL3 = "ace-current-l3";
public static final String CHANNEL_EXTERNALVOLTAGEL1 = "external-voltage-l1";
public static final String CHANNEL_EXTERNALVOLTAGEL2 = "external-voltage-l2";
public static final String CHANNEL_EXTERNALVOLTAGEL3 = "external-voltage-l3";
public static final String CHANNEL_INVERTERRMSCURRENTL1 = "inverter-rms-current-l1";
public static final String CHANNEL_INVERTERRMSCURRENTL2 = "inverter-rms-current-l2";
public static final String CHANNEL_INVERTERRMSCURRENTL3 = "inverter-rms-current-l3";
public static final String CHANNEL_INVERTERCURRENTREACTIVEL1 = "inverter-current-reactive-l1";
public static final String CHANNEL_INVERTERCURRENTREACTIVEL2 = "inverter-current-reactive-l2";
public static final String CHANNEL_INVERTERCURRENTREACTIVEL3 = "inverter-current-reactive-l3";
public static final String CHANNEL_INVERTERCURRENTACTIVEL1 = "inverter-current-active-l1";
public static final String CHANNEL_INVERTERCURRENTACTIVEL2 = "inverter-current-active-l2";
public static final String CHANNEL_INVERTERCURRENTACTIVEL3 = "inverter-current-active-l3";
public static final String CHANNEL_GRIDCURRENTL1 = "grid-current-l1";
public static final String CHANNEL_GRIDCURRENTL2 = "grid-current-l2";
public static final String CHANNEL_GRIDCURRENTL3 = "grid-current-l3";
public static final String CHANNEL_GRIDCURRENTREACTIVEL1 = "grid-current-reactive-l1";
public static final String CHANNEL_GRIDCURRENTREACTIVEL2 = "grid-current-reactive-l2";
public static final String CHANNEL_GRIDCURRENTREACTIVEL3 = "grid-current-reactive-l3";
public static final String CHANNEL_GRIDCURRENTACTIVEL1 = "grid-current-active-l1";
public static final String CHANNEL_GRIDCURRENTACTIVEL2 = "grid-current-active-l2";
public static final String CHANNEL_GRIDCURRENTACTIVEL3 = "grid-current-active-l3";
public static final String CHANNEL_INVERTERREACTIVECURRENTL1 = "inverter-reactive-current-l1";
public static final String CHANNEL_INVERTERREACTIVECURRENTL2 = "inverter-reactive-current-l2";
public static final String CHANNEL_INVERTERREACTIVECURRENTL3 = "inverter-reactive-current-l3";
public static final String CHANNEL_INVERTERLOADL1 = "inverter-load-l1";
public static final String CHANNEL_INVERTERLOADL2 = "inverter-load-l2";
public static final String CHANNEL_INVERTERLOADL3 = "inverter-load-l3";
public static final String CHANNEL_APPARENTPOWER = "apparent-power";
public static final String CHANNEL_GRIDPOWERACTIVEL1 = "grid-power-active-l1";
public static final String CHANNEL_GRIDPOWERACTIVEL2 = "grid-power-active-l2";
public static final String CHANNEL_GRIDPOWERACTIVEL3 = "grid-power-active-l3";
public static final String CHANNEL_GRIDPOWERREACTIVEL1 = "grid-power-reactive-l1";
public static final String CHANNEL_GRIDPOWERREACTIVEL2 = "grid-power-reactive-l2";
public static final String CHANNEL_GRIDPOWERREACTIVEL3 = "grid-power-reactive-l3";
public static final String CHANNEL_INVERTERPOWERACTIVEL1 = "inverter-power-active-l1";
public static final String CHANNEL_INVERTERPOWERACTIVEL2 = "inverter-power-active-l2";
public static final String CHANNEL_INVERTERPOWERACTIVEL3 = "inverter-power-active-l3";
public static final String CHANNEL_INVERTERPOWERREACTIVEL1 = "inverter-power-reactive-l1";
public static final String CHANNEL_INVERTERPOWERREACTIVEL2 = "inverter-power-reactive-l2";
public static final String CHANNEL_INVERTERPOWERREACTIVEL3 = "inverter-power-reactive-l3";
public static final String CHANNEL_CONSUMPTIONPOWERL1 = "consumption-power-l1";
public static final String CHANNEL_CONSUMPTIONPOWERL2 = "consumption-power-l2";
public static final String CHANNEL_CONSUMPTIONPOWERL3 = "consumption-power-l3";
public static final String CHANNEL_CONSUMPTIONPOWERREACTIVEL1 = "consumption-power-reactive-l1";
public static final String CHANNEL_CONSUMPTIONPOWERREACTIVEL2 = "consumption-power-reactive-l2";
public static final String CHANNEL_CONSUMPTIONPOWERREACTIVEL3 = "consumption-power-reactive-l3";
public static final String CHANNEL_SOLARPV = "solar-pv";
public static final String CHANNEL_POSITIVEDCLINKVOLTAGE = "positive-dc-link-voltage";
public static final String CHANNEL_NEGATIVEDCLINKVOLTAGE = "negative-dc-link-voltage";
public static final String CHANNEL_EXTERNALENERGYPRODUCEDL1 = "external-energy-produced-l1";
public static final String CHANNEL_EXTERNALENERGYPRODUCEDL2 = "external-energy-produced-l2";
public static final String CHANNEL_EXTERNALENERGYPRODUCEDL3 = "external-energy-produced-l3";
public static final String CHANNEL_EXTERNALENERGYCONSUMEDL1 = "external-energy-consumed-l1";
public static final String CHANNEL_EXTERNALENERGYCONSUMEDL2 = "external-energy-consumed-l2";
public static final String CHANNEL_EXTERNALENERGYCONSUMEDL3 = "external-energy-consumed-l3";
public static final String CHANNEL_INVERTERENERGYPRODUCEDL1 = "inverter-energy-produced-l1";
public static final String CHANNEL_INVERTERENERGYPRODUCEDL2 = "inverter-energy-produced-l2";
public static final String CHANNEL_INVERTERENERGYPRODUCEDL3 = "inverter-energy-produced-l3";
public static final String CHANNEL_INVERTERENERGYCONSUMEDL1 = "inverter-energy-consumed-l1";
public static final String CHANNEL_INVERTERENERGYCONSUMEDL2 = "inverter-energy-consumed-l2";
public static final String CHANNEL_INVERTERENERGYCONSUMEDL3 = "inverter-energy-consumed-l3";
public static final String CHANNEL_LOADENERGYPRODUCEDL1 = "load-energy-produced-l1";
public static final String CHANNEL_LOADENERGYPRODUCEDL2 = "load-energy-produced-l2";
public static final String CHANNEL_LOADENERGYPRODUCEDL3 = "load-energy-produced-l3";
public static final String CHANNEL_LOADENERGYCONSUMEDL1 = "load-energy-consumed-l1";
public static final String CHANNEL_LOADENERGYCONSUMEDL2 = "load-energy-consumed-l2";
public static final String CHANNEL_LOADENERGYCONSUMEDL3 = "load-energy-consumed-l3";
public static final String CHANNEL_EXTERNALENERGYPRODUCED3P = "external-energy-produced-3p";
public static final String CHANNEL_EXTERNALENERGYCONSUMED3P = "external-energy-consumed-3p";
public static final String CHANNEL_INVERTERENERGYPRODUCED3P = "inverter-energy-produced-3p";
public static final String CHANNEL_INVERTERENERGYCONSUMED3P = "inverter-energy-consumed-3p";
public static final String CHANNEL_LOADENERGYPRODUCED3P = "load-energy-produced-3p";
public static final String CHANNEL_LOADENERGYCONSUMED3P = "load-energy-consumed-3p";
public static final String CHANNEL_TOTALSOLARENERGY = "total-solar-energy";
public static final String CHANNEL_STATE = "state";
public static final String CHANNEL_TIMESTAMP = "timestamp";
// List of battery setup Channel ids
public static final String CHANNEL_BATTERYENERGYPRODUCED = "battery-energy-produced";
public static final String CHANNEL_BATTERYENERGYCONSUMED = "battery-energy-consumed";
public static final String CHANNEL_SOC = "soc";
public static final String CHANNEL_SOH = "soh";
public static final String CHANNEL_POWERBATTERY = "power-battery";
public static final String CHANNEL_TOTALRATEDCAPACITYALLBATTERIES = "total-rated-capacity-all-batteries";
// List of SSO Channel ids
public static final String CHANNEL_S0ID = "s0-id";
public static final String CHANNEL_S0MEASUREDVOLTAGEPVSTRING = "s0-measured-voltage-pv-string";
public static final String CHANNEL_S0MEASUREDCURRENTPVSTRING = "s0-measured-current-pv-string";
public static final String CHANNEL_S0TOTALSOLARENERGY = "s0-total-solar-energy";
public static final String CHANNEL_S0RELAYSTATUS = "s0-relay-status";
public static final String CHANNEL_S0TEMPERATURE = "s0-temperature";
public static final String CHANNEL_S0FAULTCODE = "s0-fault-code";
public static final String CHANNEL_S0DCLINKVOLTAGE = "s0-dc-link-voltage";
public static final String CHANNEL_S0TIMESTAMP = "s0-timestamp";
public static final String CHANNEL_S1ID = "s1-id";
public static final String CHANNEL_S1MEASUREDVOLTAGEPVSTRING = "s1-measured-voltage-pv-string";
public static final String CHANNEL_S1MEASUREDCURRENTPVSTRING = "s1-measured-current-pv-string";
public static final String CHANNEL_S1TOTALSOLARENERGY = "s1-total-solar-energy";
public static final String CHANNEL_S1RELAYSTATUS = "s1-relay-status";
public static final String CHANNEL_S1TEMPERATURE = "s1-temperature";
public static final String CHANNEL_S1FAULTCODE = "s1-fault-code";
public static final String CHANNEL_S1DCLINKVOLTAGE = "s1-dc-link-voltage";
public static final String CHANNEL_S1TIMESTAMP = "s1-timestamp";
public static final String CHANNEL_S2ID = "s2-id";
public static final String CHANNEL_S2MEASUREDVOLTAGEPVSTRING = "s2-measured-voltage-pv-string";
public static final String CHANNEL_S2MEASUREDCURRENTPVSTRING = "s2-measured-current-pv-string";
public static final String CHANNEL_S2TOTALSOLARENERGY = "s2-total-solar-energy";
public static final String CHANNEL_S2RELAYSTATUS = "s2-relay-status";
public static final String CHANNEL_S2TEMPERATURE = "s2-temperature";
public static final String CHANNEL_S2FAULTCODE = "s2-fault-code";
public static final String CHANNEL_S2DCLINKVOLTAGE = "s2-dc-link-voltage";
public static final String CHANNEL_S2TIMESTAMP = "s2-timestamp";
public static final String CHANNEL_S3ID = "s3-id";
public static final String CHANNEL_S3MEASUREDVOLTAGEPVSTRING = "s3-measured-voltage-pv-string";
public static final String CHANNEL_S3MEASUREDCURRENTPVSTRING = "s3-measured-current-pv-string";
public static final String CHANNEL_S3TOTALSOLARENERGY = "s3-total-solar-energy";
public static final String CHANNEL_S3RELAYSTATUS = "s3-relay-status";
public static final String CHANNEL_S3TEMPERATURE = "s3-temperature";
public static final String CHANNEL_S3FAULTCODE = "s3-fault-code";
public static final String CHANNEL_S3DCLINKVOLTAGE = "s3-dc-link-voltage";
public static final String CHANNEL_S3TIMESTAMP = "s3-timestamp";
// List of ESO Channel ids
public static final String CHANNEL_ESOUNIQUEIDENTIFIER = "eso-unique-identifier";
public static final String CHANNEL_ESOMEASUREDVOLTAGEBATTERY = "eso-measured-voltage-battery";
public static final String CHANNEL_ESOMEASUREDCURRENTBATTERY = "eso-measured-current-battery";
public static final String CHANNEL_ESOBATTERYENERGYPRODUCED = "eso-battery-energy-produced";
public static final String CHANNEL_ESOBATTERYENERGYCONSUMED = "eso-battery-energy-consumed";
public static final String CHANNEL_ESOSOC = "eso-soc";
public static final String CHANNEL_ESORELAYSTATUS = "eso-relay-status";
public static final String CHANNEL_ESOTEMPERATURE = "eso-temperature";
public static final String CHANNEL_ESOFAULTCODE = "eso-fault-code";
public static final String CHANNEL_ESODCLINKVOLTAGE = "eso-dc-link-voltage";
public static final String CHANNEL_ESOTIMESTAMP = "eso-timestamp";
// List of ESM Channel ids
public static final String CHANNEL_ESMUNIQUEIDENTIFIER = "esm-unique-identifier";
public static final String CHANNEL_ESMSOH = "esm-soh";
public static final String CHANNEL_ESMSOC = "esm-soc";
public static final String CHANNEL_ESMTOTALRATEDCAPACITYALLBATTERIES = "esm-total-rated-capacity-all-batteries";
public static final String CHANNEL_ESMRATEDPOWERBATTERY = "esm-rated-power-battery";
public static final String CHANNEL_ESMSTATUS = "esm-status";
public static final String CHANNEL_ESMTIMESTAMP = "esm-timestamp";
// List of all Channel ids for configuration
public static final String CHANNEL_REQUESTCHARGE = "request-charge";
public static final String CHANNEL_REQUESTDISCHARGE = "request-discharge";
public static final String CHANNEL_AUTO = "request-auto";
public static final String CHANNEL_REQUESTEXTAPIVERSION = "request-extapi-version";
public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Set.of(THING_TYPE_ENERGYHUB);
}

View File

@ -0,0 +1,367 @@
/**
* Copyright (c) 2010-2024 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.ferroamp.internal;
import java.util.ArrayList;
import java.util.List;
import javax.measure.Unit;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.core.library.unit.Units;
/**
* The {@link FerroampChannelConfiguration} class defines methods, which set up channel configuration for the binding.
*
* @author Örjan Backsell - Initial contribution
*
*/
@NonNullByDefault
public class FerroampChannelConfiguration {
public String id;
public Unit<?> unit;
public FerroampChannelConfiguration(String id, Unit<?> unit) {
this.id = id;
this.unit = unit;
}
public static List<FerroampChannelConfiguration> getChannelConfigurationEhub() {
final List<FerroampChannelConfiguration> channelConfigurationEhub = new ArrayList<>();
channelConfigurationEhub
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_GRIDFREQUENCY, Units.HERTZ));
channelConfigurationEhub
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_ACECURRENTL1, Units.AMPERE));
channelConfigurationEhub
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_ACECURRENTL2, Units.AMPERE));
channelConfigurationEhub
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_ACECURRENTL3, Units.AMPERE));
channelConfigurationEhub
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_EXTERNALVOLTAGEL1, Units.VOLT));
channelConfigurationEhub
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_EXTERNALVOLTAGEL2, Units.VOLT));
channelConfigurationEhub
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_EXTERNALVOLTAGEL3, Units.VOLT));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_INVERTERRMSCURRENTL1, Units.AMPERE));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_INVERTERRMSCURRENTL2, Units.AMPERE));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_INVERTERRMSCURRENTL3, Units.AMPERE));
channelConfigurationEhub.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_INVERTERCURRENTREACTIVEL1, Units.AMPERE));
channelConfigurationEhub.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_INVERTERCURRENTREACTIVEL2, Units.AMPERE));
channelConfigurationEhub.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_INVERTERCURRENTREACTIVEL3, Units.AMPERE));
channelConfigurationEhub.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_INVERTERCURRENTACTIVEL1, Units.AMPERE));
channelConfigurationEhub.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_INVERTERCURRENTACTIVEL2, Units.AMPERE));
channelConfigurationEhub.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_INVERTERCURRENTACTIVEL3, Units.AMPERE));
channelConfigurationEhub
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_GRIDCURRENTL1, Units.AMPERE));
channelConfigurationEhub
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_GRIDCURRENTL2, Units.AMPERE));
channelConfigurationEhub
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_GRIDCURRENTL3, Units.AMPERE));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_GRIDCURRENTREACTIVEL1, Units.AMPERE));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_GRIDCURRENTREACTIVEL2, Units.AMPERE));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_GRIDCURRENTREACTIVEL3, Units.AMPERE));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_GRIDCURRENTACTIVEL1, Units.AMPERE));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_GRIDCURRENTACTIVEL2, Units.AMPERE));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_GRIDCURRENTACTIVEL3, Units.AMPERE));
channelConfigurationEhub.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_INVERTERREACTIVECURRENTL1, Units.AMPERE));
channelConfigurationEhub.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_INVERTERREACTIVECURRENTL2, Units.AMPERE));
channelConfigurationEhub.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_INVERTERREACTIVECURRENTL3, Units.AMPERE));
channelConfigurationEhub
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_INVERTERLOADL1, Units.AMPERE));
channelConfigurationEhub
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_INVERTERLOADL2, Units.AMPERE));
channelConfigurationEhub
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_INVERTERLOADL3, Units.AMPERE));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_APPARENTPOWER, Units.VOLT_AMPERE));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_GRIDPOWERACTIVEL1, Units.AMPERE));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_GRIDPOWERACTIVEL2, Units.AMPERE));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_GRIDPOWERACTIVEL3, Units.AMPERE));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_GRIDPOWERREACTIVEL1, Units.WATT));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_GRIDPOWERREACTIVEL2, Units.WATT));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_GRIDPOWERREACTIVEL3, Units.WATT));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_INVERTERPOWERACTIVEL1, Units.VOLT));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_INVERTERPOWERACTIVEL2, Units.VOLT));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_INVERTERPOWERACTIVEL3, Units.VOLT));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_INVERTERPOWERREACTIVEL1, Units.VOLT));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_INVERTERPOWERREACTIVEL2, Units.VOLT));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_INVERTERPOWERREACTIVEL3, Units.VOLT));
channelConfigurationEhub
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_CONSUMPTIONPOWERL1, Units.WATT));
channelConfigurationEhub
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_CONSUMPTIONPOWERL2, Units.WATT));
channelConfigurationEhub
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_CONSUMPTIONPOWERL3, Units.WATT));
channelConfigurationEhub.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_CONSUMPTIONPOWERREACTIVEL1, Units.WATT));
channelConfigurationEhub.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_CONSUMPTIONPOWERREACTIVEL2, Units.WATT));
channelConfigurationEhub.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_CONSUMPTIONPOWERREACTIVEL3, Units.WATT));
channelConfigurationEhub
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_SOLARPV, Units.WATT));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_POSITIVEDCLINKVOLTAGE, Units.VOLT));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_NEGATIVEDCLINKVOLTAGE, Units.VOLT));
channelConfigurationEhub.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_EXTERNALENERGYPRODUCEDL1, Units.WATT));
channelConfigurationEhub.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_EXTERNALENERGYPRODUCEDL2, Units.WATT));
channelConfigurationEhub.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_EXTERNALENERGYPRODUCEDL3, Units.WATT));
channelConfigurationEhub.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_EXTERNALENERGYCONSUMEDL1, Units.WATT));
channelConfigurationEhub.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_EXTERNALENERGYCONSUMEDL2, Units.WATT));
channelConfigurationEhub.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_EXTERNALENERGYCONSUMEDL3, Units.WATT));
channelConfigurationEhub.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_INVERTERENERGYPRODUCEDL1, Units.WATT));
channelConfigurationEhub.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_INVERTERENERGYPRODUCEDL2, Units.WATT));
channelConfigurationEhub.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_INVERTERENERGYPRODUCEDL3, Units.WATT));
channelConfigurationEhub.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_INVERTERENERGYCONSUMEDL1, Units.WATT));
channelConfigurationEhub.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_INVERTERENERGYCONSUMEDL2, Units.WATT));
channelConfigurationEhub.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_INVERTERENERGYCONSUMEDL3, Units.WATT));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_LOADENERGYPRODUCEDL1, Units.WATT));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_LOADENERGYPRODUCEDL2, Units.WATT));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_LOADENERGYPRODUCEDL3, Units.WATT));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_LOADENERGYCONSUMEDL1, Units.WATT));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_LOADENERGYCONSUMEDL2, Units.WATT));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_LOADENERGYCONSUMEDL3, Units.WATT));
channelConfigurationEhub.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_EXTERNALENERGYPRODUCED3P, Units.WATT));
channelConfigurationEhub.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_EXTERNALENERGYCONSUMED3P, Units.WATT));
channelConfigurationEhub.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_INVERTERENERGYPRODUCED3P, Units.WATT));
channelConfigurationEhub.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_INVERTERENERGYCONSUMED3P, Units.WATT));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_LOADENERGYPRODUCED3P, Units.WATT));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_LOADENERGYCONSUMED3P, Units.WATT));
channelConfigurationEhub
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_TOTALSOLARENERGY, Units.WATT));
channelConfigurationEhub
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_STATE, Units.ONE));
channelConfigurationEhub
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_TIMESTAMP, Units.ONE));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_BATTERYENERGYPRODUCED, Units.WATT));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_BATTERYENERGYCONSUMED, Units.WATT));
channelConfigurationEhub
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_SOC, Units.PERCENT));
channelConfigurationEhub
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_SOH, Units.PERCENT));
channelConfigurationEhub
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_POWERBATTERY, Units.WATT));
channelConfigurationEhub.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_TOTALRATEDCAPACITYALLBATTERIES, Units.WATT_HOUR));
return channelConfigurationEhub;
}
public static List<FerroampChannelConfiguration> getChannelConfigurationSsoS0() {
final List<FerroampChannelConfiguration> channelConfigurationSsoS0 = new ArrayList<>();
channelConfigurationSsoS0
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_S0ID, Units.ONE));
channelConfigurationSsoS0.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_S0MEASUREDVOLTAGEPVSTRING, Units.VOLT));
channelConfigurationSsoS0.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_S0MEASUREDCURRENTPVSTRING, Units.AMPERE));
channelConfigurationSsoS0
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_S0TOTALSOLARENERGY, Units.WATT));
channelConfigurationSsoS0
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_S0RELAYSTATUS, Units.ONE));
channelConfigurationSsoS0
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_S0TEMPERATURE, Units.ONE));
channelConfigurationSsoS0
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_S0FAULTCODE, Units.ONE));
channelConfigurationSsoS0
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_S0DCLINKVOLTAGE, Units.VOLT));
channelConfigurationSsoS0
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_S0TIMESTAMP, Units.ONE));
return channelConfigurationSsoS0;
}
public static List<FerroampChannelConfiguration> getChannelConfigurationSsoS1() {
final List<FerroampChannelConfiguration> channelConfigurationSsoS1 = new ArrayList<>();
channelConfigurationSsoS1
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_S1ID, Units.ONE));
channelConfigurationSsoS1.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_S1MEASUREDVOLTAGEPVSTRING, Units.VOLT));
channelConfigurationSsoS1.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_S1MEASUREDCURRENTPVSTRING, Units.AMPERE));
channelConfigurationSsoS1
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_S1TOTALSOLARENERGY, Units.WATT));
channelConfigurationSsoS1
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_S1RELAYSTATUS, Units.ONE));
channelConfigurationSsoS1
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_S1TEMPERATURE, Units.ONE));
channelConfigurationSsoS1
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_S1FAULTCODE, Units.ONE));
channelConfigurationSsoS1
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_S1DCLINKVOLTAGE, Units.VOLT));
channelConfigurationSsoS1
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_S1TIMESTAMP, Units.ONE));
return channelConfigurationSsoS1;
}
public static List<FerroampChannelConfiguration> getChannelConfigurationSsoS2() {
final List<FerroampChannelConfiguration> channelConfigurationSsoS2 = new ArrayList<>();
channelConfigurationSsoS2
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_S2ID, Units.ONE));
channelConfigurationSsoS2.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_S2MEASUREDVOLTAGEPVSTRING, Units.VOLT));
channelConfigurationSsoS2.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_S2MEASUREDCURRENTPVSTRING, Units.AMPERE));
channelConfigurationSsoS2
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_S2TOTALSOLARENERGY, Units.WATT));
channelConfigurationSsoS2
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_S2RELAYSTATUS, Units.ONE));
channelConfigurationSsoS2
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_S2TEMPERATURE, Units.ONE));
channelConfigurationSsoS2
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_S2FAULTCODE, Units.ONE));
channelConfigurationSsoS2
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_S2DCLINKVOLTAGE, Units.VOLT));
channelConfigurationSsoS2
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_S2TIMESTAMP, Units.ONE));
return channelConfigurationSsoS2;
}
public static List<FerroampChannelConfiguration> getChannelConfigurationSsoS3() {
final List<FerroampChannelConfiguration> channelConfigurationSsoS3 = new ArrayList<>();
channelConfigurationSsoS3
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_S3ID, Units.ONE));
channelConfigurationSsoS3.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_S3MEASUREDVOLTAGEPVSTRING, Units.VOLT));
channelConfigurationSsoS3.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_S3MEASUREDCURRENTPVSTRING, Units.AMPERE));
channelConfigurationSsoS3
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_S3TOTALSOLARENERGY, Units.WATT));
channelConfigurationSsoS3
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_S3RELAYSTATUS, Units.ONE));
channelConfigurationSsoS3
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_S3TEMPERATURE, Units.ONE));
channelConfigurationSsoS3
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_S3FAULTCODE, Units.ONE));
channelConfigurationSsoS3
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_S3DCLINKVOLTAGE, Units.VOLT));
channelConfigurationSsoS3
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_S3TIMESTAMP, Units.ONE));
return channelConfigurationSsoS3;
}
public static List<FerroampChannelConfiguration> getChannelConfigurationEso() {
final List<FerroampChannelConfiguration> channelConfigurationEso = new ArrayList<>();
channelConfigurationEso
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_ESOUNIQUEIDENTIFIER, Units.ONE));
channelConfigurationEso.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_ESOMEASUREDVOLTAGEBATTERY, Units.VOLT));
channelConfigurationEso.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_ESOMEASUREDCURRENTBATTERY, Units.AMPERE));
channelConfigurationEso.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_ESOBATTERYENERGYPRODUCED, Units.WATT));
channelConfigurationEso.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_ESOBATTERYENERGYCONSUMED, Units.WATT));
channelConfigurationEso
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_ESOSOC, Units.PERCENT));
channelConfigurationEso
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_ESORELAYSTATUS, Units.ONE));
channelConfigurationEso
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_ESOTEMPERATURE, Units.ONE));
channelConfigurationEso
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_ESOFAULTCODE, Units.ONE));
channelConfigurationEso
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_ESODCLINKVOLTAGE, Units.VOLT));
channelConfigurationEso
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_ESOTIMESTAMP, Units.ONE));
return channelConfigurationEso;
}
public static List<FerroampChannelConfiguration> getChannelConfigurationEsm() {
final List<FerroampChannelConfiguration> channelConfigurationEsm = new ArrayList<>();
channelConfigurationEsm
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_ESMUNIQUEIDENTIFIER, Units.ONE));
channelConfigurationEsm
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_ESMSOH, Units.PERCENT));
channelConfigurationEsm
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_ESMSOC, Units.PERCENT));
channelConfigurationEsm.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_ESMTOTALRATEDCAPACITYALLBATTERIES, Units.WATT_HOUR));
channelConfigurationEsm.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_ESMRATEDPOWERBATTERY, Units.WATT));
channelConfigurationEsm
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_ESMSTATUS, Units.ONE));
channelConfigurationEsm
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_ESMTIMESTAMP, Units.ONE));
return channelConfigurationEsm;
}
public static List<FerroampChannelConfiguration> getChannelConfigurationRequest() {
final List<FerroampChannelConfiguration> channelConfigurationRequest = new ArrayList<>();
channelConfigurationRequest
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_REQUESTCHARGE, Units.ONE));
channelConfigurationRequest
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_REQUESTDISCHARGE, Units.ONE));
channelConfigurationRequest
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_AUTO, Units.ONE));
channelConfigurationRequest.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_REQUESTEXTAPIVERSION, Units.ONE));
return channelConfigurationRequest;
}
}

View File

@ -0,0 +1,36 @@
/**
* Copyright (c) 2010-2024 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.ferroamp.internal;
import org.eclipse.jdt.annotation.NonNullByDefault;
/**
* The {@link FerroampConfiguration} class contains fields mapping thing configuration parameters.
*
* @author Örjan Backsell - Initial contribution
*
*/
@NonNullByDefault
public class FerroampConfiguration {
public String hostName = "";
public String userName = "";
public String password = "";
public boolean hasBattery;
public boolean ssoS0;
public boolean ssoS1;
public boolean ssoS2;
public boolean ssoS3;
public boolean eso;
public boolean esm;
}

View File

@ -0,0 +1,278 @@
/**
* Copyright (c) 2010-2024 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.ferroamp.internal;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.TimeUnit;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
import org.openhab.core.io.transport.mqtt.MqttBrokerConnection;
import org.openhab.core.io.transport.mqtt.MqttMessageSubscriber;
import org.openhab.core.library.types.StringType;
import org.openhab.core.thing.ChannelUID;
import org.openhab.core.thing.Thing;
import org.openhab.core.thing.ThingStatus;
import org.openhab.core.thing.ThingStatusDetail;
import org.openhab.core.thing.binding.BaseThingHandler;
import org.openhab.core.types.Command;
import org.openhab.core.types.State;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* The {@link FerroampHandler} is responsible for handling of the values sent to and from the binding.
*
* @author Örjan Backsell - Initial contribution
*
*/
@NonNullByDefault
public class FerroampHandler extends BaseThingHandler implements MqttMessageSubscriber {
private final static Logger logger = LoggerFactory.getLogger(FerroampHandler.class);
private static @Nullable FerroampConfiguration ferroampConfig;
private @Nullable static MqttBrokerConnection ferroampConnection;
FerroampMqttCommunication ferroampMqttCommunication = new FerroampMqttCommunication(thing);
private List<FerroampChannelConfiguration> channelConfigEhub = new ArrayList<>();
private static List<FerroampChannelConfiguration> channelConfigSsoS0 = new ArrayList<>();
private static List<FerroampChannelConfiguration> channelConfigSsoS1 = new ArrayList<>();
private static List<FerroampChannelConfiguration> channelConfigSsoS2 = new ArrayList<>();
private static List<FerroampChannelConfiguration> channelConfigSsoS3 = new ArrayList<>();
private static List<FerroampChannelConfiguration> channelConfigEso = new ArrayList<>();
private static List<FerroampChannelConfiguration> channelConfigEsm = new ArrayList<>();
long refreshInterval = 30;
static boolean isEsoAvailable = false;
static boolean isEsmAvailable = false;
public FerroampHandler(Thing thing) {
super(thing);
}
@Override
public void handleCommand(ChannelUID channelUID, Command command) {
String transId = UUID.randomUUID().toString();
String valueConfiguration = command.toString();
if (FerroampBindingConstants.CHANNEL_REQUESTCHARGE.equals(channelUID.getId())) {
String requestCmdJsonCharge = "{\"" + "transId" + "\":\"" + transId
+ "\",\"cmd\":{\"name\":\"charge\",\"arg\":\"" + valueConfiguration + "\"}}";
sendMQTT(requestCmdJsonCharge);
}
if (FerroampBindingConstants.CHANNEL_REQUESTDISCHARGE.equals(channelUID.getId())) {
String requestCmdJsonDisCharge = "{\"" + "transId" + "\":\"" + transId
+ "\",\"cmd\":{\"name\":\"discharge\",\"arg\":\"" + valueConfiguration + "\"}}";
sendMQTT(requestCmdJsonDisCharge);
}
if (FerroampBindingConstants.CHANNEL_AUTO.equals(channelUID.getId())) {
String requestCmdJsonAuto = "{\"" + "transId" + "\":\"" + transId + "\",\"cmd\":{\"name\":\"auto\"}}";
sendMQTT(requestCmdJsonAuto);
}
}
@Override
public void initialize() {
// Set channel configuration parameters
channelConfigEhub = FerroampChannelConfiguration.getChannelConfigurationEhub();
channelConfigSsoS0 = FerroampChannelConfiguration.getChannelConfigurationSsoS0();
channelConfigSsoS1 = FerroampChannelConfiguration.getChannelConfigurationSsoS1();
channelConfigSsoS2 = FerroampChannelConfiguration.getChannelConfigurationSsoS2();
channelConfigSsoS3 = FerroampChannelConfiguration.getChannelConfigurationSsoS3();
channelConfigEso = FerroampChannelConfiguration.getChannelConfigurationEso();
channelConfigEsm = FerroampChannelConfiguration.getChannelConfigurationEsm();
ferroampConfig = getConfigAs(FerroampConfiguration.class);
@SuppressWarnings("null")
final MqttBrokerConnection ferroampConnection = new MqttBrokerConnection(ferroampConfig.hostName,
FerroampBindingConstants.BROKER_PORT, false, false, ferroampConfig.userName);
updateStatus(ThingStatus.UNKNOWN);
scheduler.execute(() -> {
boolean thingReachable = true;
if (thingReachable) {
updateStatus(ThingStatus.ONLINE);
try {
startMqttConnection();
} catch (InterruptedException e) {
logger.debug("Connection to MqttBroker disturbed during configuration");
}
} else {
updateStatus(ThingStatus.OFFLINE);
}
});
// Start channel-update as configured
scheduler.scheduleWithFixedDelay(() -> {
try {
channelUpdate();
} catch (RuntimeException scheduleWithFixedDelayException) {
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR,
scheduleWithFixedDelayException.getClass().getName() + ":"
+ scheduleWithFixedDelayException.getMessage());
}
}, 60, refreshInterval, TimeUnit.SECONDS);
this.setFerroampConnection(ferroampConnection);
}
private void startMqttConnection() throws InterruptedException {
try {
TimeUnit.SECONDS.sleep(10);
} catch (InterruptedException e) {
logger.debug("Connection to MqttBroker disturbed during startup of MqttConnection");
}
ferroampMqttCommunication.getMQTT("ehubTopic", ferroampConfig);
ferroampMqttCommunication.getMQTT("ssoTopic", ferroampConfig);
ferroampMqttCommunication.getMQTT("esoTopic", ferroampConfig);
ferroampMqttCommunication.getMQTT("esmTopic", ferroampConfig);
}
@SuppressWarnings("null")
private void channelUpdate() {
String[] ehubUpdateChannels;
ehubUpdateChannels = FerroampMqttCommunication.getEhubChannelUpdateValues();
int channelValuesCounterEhub = 0;
for (FerroampChannelConfiguration cConfig : channelConfigEhub) {
String ehubChannel = cConfig.id;
State ehubState = StringType.valueOf(ehubUpdateChannels[channelValuesCounterEhub]);
updateState(ehubChannel, ehubState);
channelValuesCounterEhub++;
}
if (ferroampConfig.ssoS0 == true) {
String[] ssoS0UpdateChannels = new String[9];
ssoS0UpdateChannels = FerroampMqttCommunication.getSsoS0ChannelUpdateValues();
int channelValuesCounterSsoS0 = 0;
if (ssoS0UpdateChannels.length <= 9) {
for (FerroampChannelConfiguration cConfig : channelConfigSsoS0) {
String ssoS0Channel = cConfig.id;
State ssoS0State = StringType.valueOf(ssoS0UpdateChannels[channelValuesCounterSsoS0]);
updateState(ssoS0Channel, ssoS0State);
channelValuesCounterSsoS0++;
}
}
}
if (ferroampConfig.ssoS1 == true) {
String[] ssoS1UpdateChannels = new String[9];
ssoS1UpdateChannels = FerroampMqttCommunication.getSsoS1ChannelUpdateValues();
int channelValuesCounterSsoS1 = 0;
if (ssoS1UpdateChannels.length <= 9) {
for (FerroampChannelConfiguration cConfig : channelConfigSsoS1) {
String ssoS1Channel = cConfig.id;
State ssoS1State = StringType.valueOf(ssoS1UpdateChannels[channelValuesCounterSsoS1]);
updateState(ssoS1Channel, ssoS1State);
channelValuesCounterSsoS1++;
}
}
}
if (ferroampConfig.ssoS2 == true) {
String[] ssoS2UpdateChannels = new String[9];
ssoS2UpdateChannels = FerroampMqttCommunication.getSsoS2ChannelUpdateValues();
int channelValuesCounterSsoS2 = 0;
if (ssoS2UpdateChannels.length <= 9) {
for (FerroampChannelConfiguration cConfig : channelConfigSsoS2) {
String ssoS2Channel = cConfig.id;
State ssoS2State = StringType.valueOf(ssoS2UpdateChannels[channelValuesCounterSsoS2]);
updateState(ssoS2Channel, ssoS2State);
channelValuesCounterSsoS2++;
}
}
}
if (ferroampConfig.ssoS3 == true) {
String[] ssoS3UpdateChannels = new String[9];
ssoS3UpdateChannels = FerroampMqttCommunication.getSsoS3ChannelUpdateValues();
int channelValuesCounterSsoS3 = 0;
if (ssoS3UpdateChannels.length <= 9) {
for (FerroampChannelConfiguration cConfig : channelConfigSsoS3) {
String ssoS3Channel = cConfig.id;
State ssoS3State = StringType.valueOf(ssoS3UpdateChannels[channelValuesCounterSsoS3]);
updateState(ssoS3Channel, ssoS3State);
channelValuesCounterSsoS3++;
}
}
}
if (ferroampConfig.eso == true) {
String[] esoUpdateChannels;
esoUpdateChannels = FerroampMqttCommunication.getEsoChannelUpdateValues();
int channelValuesCounterEso = 0;
for (FerroampChannelConfiguration cConfig : channelConfigEso) {
String esoChannel = cConfig.id;
State esoState = StringType.valueOf(esoUpdateChannels[channelValuesCounterEso]);
updateState(esoChannel, esoState);
channelValuesCounterEso++;
}
}
if (ferroampConfig.esm == true) {
String[] esmUpdateChannels;
esmUpdateChannels = FerroampMqttCommunication.getEsmChannelUpdateValues();
int channelValuesCounterEsm = 0;
for (FerroampChannelConfiguration cConfig : channelConfigEsm) {
String esmChannel = cConfig.id;
State esmState = StringType.valueOf(esmUpdateChannels[channelValuesCounterEsm]);
updateState(esmChannel, esmState);
channelValuesCounterEsm++;
}
}
}
// Handles request topic
@SuppressWarnings("null")
private void sendMQTT(String payload) {
MqttBrokerConnection localConfigurationConnection = getFerroampConnection();
localConfigurationConnection.start();
localConfigurationConnection.setCredentials(ferroampConfig.userName, ferroampConfig.password);
if (localConfigurationConnection != null) {
localConfigurationConnection.publish(FerroampBindingConstants.REQUEST_TOPIC, payload.getBytes(), 1, false);
}
}
// Capture actual Json-topic message
@Override
public void processMessage(String topic, byte[] payload) {
}
public @Nullable static MqttBrokerConnection getFerroampConnection() {
try {
return ferroampConnection;
} catch (Exception e) {
logger.debug("Connection to MqttBroker disturbed during startup of MqttConnection");
}
return ferroampConnection;
}
public void setFerroampConnection(@Nullable MqttBrokerConnection ferroampConnection) {
FerroampHandler.ferroampConnection = ferroampConnection;
}
@SuppressWarnings({ "null" })
public static boolean gethasBattery() {
try {
return ferroampConfig.hasBattery;
} catch (Exception e) {
logger.debug("Failed at check of configuration-parameter, hasBattery");
}
return ferroampConfig.hasBattery;
}
}

View File

@ -0,0 +1,57 @@
/**
/**
* Copyright (c) 2010-2024 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.ferroamp.internal;
import static org.openhab.binding.ferroamp.internal.FerroampBindingConstants.THING_TYPE_ENERGYHUB;
import java.util.Set;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
import org.openhab.core.thing.Thing;
import org.openhab.core.thing.ThingTypeUID;
import org.openhab.core.thing.binding.BaseThingHandlerFactory;
import org.openhab.core.thing.binding.ThingHandler;
import org.openhab.core.thing.binding.ThingHandlerFactory;
import org.osgi.service.component.annotations.Component;
/**
* The {@link FerroampHandlerFactory} is responsible for creating things and thing
* handlers.
*
* @author Örjan Backsell - Initial contribution
*
*/
@NonNullByDefault
@Component(configurationPid = "binding.ferroamp", service = ThingHandlerFactory.class)
public class FerroampHandlerFactory extends BaseThingHandlerFactory {
private static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Set.of(THING_TYPE_ENERGYHUB);
@Override
public boolean supportsThingType(ThingTypeUID thingTypeUID) {
return SUPPORTED_THING_TYPES_UIDS.contains(thingTypeUID);
}
@Override
protected @Nullable ThingHandler createHandler(Thing thing) {
ThingTypeUID thingTypeUID = thing.getThingTypeUID();
if (THING_TYPE_ENERGYHUB.equals(thingTypeUID)) {
return new FerroampHandler(thing);
}
return null;
}
}

View File

@ -0,0 +1,821 @@
/**
* Copyright (c) 2010-2024 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.ferroamp.internal;
import java.nio.charset.StandardCharsets;
import java.util.concurrent.TimeUnit;
import org.eclipse.jdt.annotation.Nullable;
import org.openhab.binding.ferroamp.dto.GetGeneralLx;
import org.openhab.binding.ferroamp.dto.GetGeneralValues;
import org.openhab.binding.ferroamp.dto.GetUdc;
import org.openhab.core.io.transport.mqtt.MqttBrokerConnection;
import org.openhab.core.io.transport.mqtt.MqttMessageSubscriber;
import org.openhab.core.thing.Thing;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
/**
* The {@link FerroampMqttCommunication} is responsible for communication with the Ferroamp-systems Mqtt-broker.
*
* @author Örjan Backsell - Initial contribution
*
*/
public class FerroampMqttCommunication implements MqttMessageSubscriber {
private @Nullable FerroampConfiguration ferroampConfig;
private @Nullable static MqttBrokerConnection ferroampConnection;
static String[] ehubChannelsUpdateValues;
static String[] ssoS0ChannelsUpdateValues;
static String[] ssoS1ChannelsUpdateValues;
static String[] ssoS2ChannelsUpdateValues;
static String[] ssoS3ChannelsUpdateValues;
static String[] esoChannelsUpdateValues;
static String[] esmChannelsUpdateValues;
static boolean isSsoChecked = false;
static String ssoS0IdCheck = "";
static String ssoS1IdCheck = "";
static String ssoS2IdCheck = "";
static String ssoS3IdCheck = "";
static boolean isEsoAvailable = false;
static boolean isEsmAvailable = false;
private final static Logger logger = LoggerFactory.getLogger(FerroampMqttCommunication.class);
public FerroampMqttCommunication(Thing thing) {
super();
}
// Handles request topic
@SuppressWarnings("null")
void sendMQTT(String payload) {
MqttBrokerConnection localConfigurationConnection = ferroampConnection;
if (FerroampHandler.getFerroampConnection() == null) {
try {
TimeUnit.SECONDS.sleep(10);
} catch (InterruptedException e) {
logger.debug("Failed during waiting for connection to setup");
}
}
localConfigurationConnection.start();
localConfigurationConnection.setCredentials(ferroampConfig.userName, ferroampConfig.password);
if (localConfigurationConnection != null) {
localConfigurationConnection.publish(FerroampBindingConstants.REQUEST_TOPIC, payload.getBytes(), 1, false);
}
}
// Handles respective topic type
@SuppressWarnings("null")
void getMQTT(String topic, FerroampConfiguration ferroampConfig) throws InterruptedException {
MqttBrokerConnection localSubscribeConnection = FerroampHandler.getFerroampConnection();
localSubscribeConnection.start();
localSubscribeConnection.setCredentials(ferroampConfig.userName, ferroampConfig.password);
if ("ehubTopic".equals(topic)) {
localSubscribeConnection.subscribe(FerroampBindingConstants.EHUB_TOPIC, this);
}
if ("ssoTopic".equals(topic)) {
localSubscribeConnection.subscribe(FerroampBindingConstants.SSO_TOPIC, this);
}
if ("esoTopic".equals(topic)) {
localSubscribeConnection.subscribe(FerroampBindingConstants.ESO_TOPIC, this);
}
if ("esmTopic".equals(topic)) {
localSubscribeConnection.subscribe(FerroampBindingConstants.ESM_TOPIC, this);
}
}
// Capture actual Json-topic message
@Override
public void processMessage(String topic, byte[] payload) {
if ("extapi/data/ehub".equals(topic)) {
processIncomingJsonMessageEhub(topic, new String(payload, StandardCharsets.UTF_8));
}
if ("extapi/data/sso".equals(topic)) {
processIncomingJsonMessageSso(topic, new String(payload, StandardCharsets.UTF_8));
}
}
@SuppressWarnings("null")
// Prepare actual Json-topic Ehub-message and update values for channels
void processIncomingJsonMessageEhub(String topic, String messageJsonEhub) {
String[] ehubChannelPostsValue = new String[86]; // Array for EHUB (Energy Hub) Posts
JsonObject jsonElementsObject = new Gson().fromJson(new Gson().fromJson(messageJsonEhub, JsonObject.class),
JsonObject.class);
String jsonElementsStringTemp = "";
Gson gson = new Gson();
// gridfreq
jsonElementsStringTemp = jsonElementsObject.get(EhubJsonElements.getJsonElementsEhub().get(0)).toString();
GetGeneralValues gridfreq = gson.fromJson(jsonElementsStringTemp, GetGeneralValues.class);
ehubChannelPostsValue[0] = gridfreq.getVal();
// iace
jsonElementsStringTemp = jsonElementsObject.get(EhubJsonElements.getJsonElementsEhub().get(1)).toString();
GetGeneralLx iace = gson.fromJson(jsonElementsStringTemp, GetGeneralLx.class);
ehubChannelPostsValue[1] = iace.getL1();
ehubChannelPostsValue[2] = iace.getL2();
ehubChannelPostsValue[3] = iace.getL3();
// ul
jsonElementsStringTemp = jsonElementsObject.get(EhubJsonElements.getJsonElementsEhub().get(2)).toString();
GetGeneralLx ul = gson.fromJson(jsonElementsStringTemp, GetGeneralLx.class);
ehubChannelPostsValue[4] = ul.getL1();
ehubChannelPostsValue[5] = ul.getL2();
ehubChannelPostsValue[6] = ul.getL3();
// il
jsonElementsStringTemp = jsonElementsObject.get(EhubJsonElements.getJsonElementsEhub().get(3)).toString();
GetGeneralLx il = gson.fromJson(jsonElementsStringTemp, GetGeneralLx.class);
ehubChannelPostsValue[7] = il.getL1();
ehubChannelPostsValue[8] = il.getL2();
ehubChannelPostsValue[9] = il.getL3();
// ild
jsonElementsStringTemp = jsonElementsObject.get(EhubJsonElements.getJsonElementsEhub().get(4)).toString();
GetGeneralLx ild = gson.fromJson(jsonElementsStringTemp, GetGeneralLx.class);
ehubChannelPostsValue[10] = ild.getL1();
ehubChannelPostsValue[11] = ild.getL2();
ehubChannelPostsValue[12] = ild.getL3();
// ilq
jsonElementsStringTemp = jsonElementsObject.get(EhubJsonElements.getJsonElementsEhub().get(5)).toString();
GetGeneralLx ilq = gson.fromJson(jsonElementsStringTemp, GetGeneralLx.class);
ehubChannelPostsValue[13] = ilq.getL1();
ehubChannelPostsValue[14] = ilq.getL2();
ehubChannelPostsValue[15] = ilq.getL3();
// iext
jsonElementsStringTemp = jsonElementsObject.get(EhubJsonElements.getJsonElementsEhub().get(6)).toString();
GetGeneralLx iext = gson.fromJson(jsonElementsStringTemp, GetGeneralLx.class);
ehubChannelPostsValue[16] = iext.getL1();
ehubChannelPostsValue[17] = iext.getL2();
ehubChannelPostsValue[18] = iext.getL3();
// iextd
jsonElementsStringTemp = jsonElementsObject.get(EhubJsonElements.getJsonElementsEhub().get(7)).toString();
GetGeneralLx iextd = gson.fromJson(jsonElementsStringTemp, GetGeneralLx.class);
ehubChannelPostsValue[19] = iextd.getL1();
ehubChannelPostsValue[20] = iextd.getL2();
ehubChannelPostsValue[21] = iextd.getL3();
// iextq
jsonElementsStringTemp = jsonElementsObject.get(EhubJsonElements.getJsonElementsEhub().get(8)).toString();
GetGeneralLx iextq = gson.fromJson(jsonElementsStringTemp, GetGeneralLx.class);
ehubChannelPostsValue[22] = iextq.getL1();
ehubChannelPostsValue[23] = iextq.getL2();
ehubChannelPostsValue[24] = iextq.getL3();
// iloadd
jsonElementsStringTemp = jsonElementsObject.get(EhubJsonElements.getJsonElementsEhub().get(9)).toString();
GetGeneralLx iloadd = gson.fromJson(jsonElementsStringTemp, GetGeneralLx.class);
ehubChannelPostsValue[25] = iloadd.getL1();
ehubChannelPostsValue[26] = iloadd.getL2();
ehubChannelPostsValue[27] = iloadd.getL3();
// iloadq
jsonElementsStringTemp = jsonElementsObject.get(EhubJsonElements.getJsonElementsEhub().get(10)).toString();
GetGeneralLx iloadq = gson.fromJson(jsonElementsStringTemp, GetGeneralLx.class);
ehubChannelPostsValue[28] = iloadq.getL1();
ehubChannelPostsValue[29] = iloadq.getL2();
ehubChannelPostsValue[30] = iloadq.getL3();
// sext
jsonElementsStringTemp = jsonElementsObject.get(EhubJsonElements.getJsonElementsEhub().get(11)).toString();
GetGeneralValues sext = gson.fromJson(jsonElementsStringTemp, GetGeneralValues.class);
ehubChannelPostsValue[31] = sext.getVal();
// pext
jsonElementsStringTemp = jsonElementsObject.get(EhubJsonElements.getJsonElementsEhub().get(12)).toString();
GetGeneralLx pext = gson.fromJson(jsonElementsStringTemp, GetGeneralLx.class);
ehubChannelPostsValue[32] = pext.getL1();
ehubChannelPostsValue[33] = pext.getL2();
ehubChannelPostsValue[34] = pext.getL3();
// pextreactive
jsonElementsStringTemp = jsonElementsObject.get(EhubJsonElements.getJsonElementsEhub().get(13)).toString();
GetGeneralLx pextreactive = gson.fromJson(jsonElementsStringTemp, GetGeneralLx.class);
ehubChannelPostsValue[35] = pextreactive.getL1();
ehubChannelPostsValue[36] = pextreactive.getL2();
ehubChannelPostsValue[37] = pextreactive.getL3();
// pinv
jsonElementsStringTemp = jsonElementsObject.get(EhubJsonElements.getJsonElementsEhub().get(14)).toString();
GetGeneralLx pinv = gson.fromJson(jsonElementsStringTemp, GetGeneralLx.class);
ehubChannelPostsValue[38] = pinv.getL1();
ehubChannelPostsValue[39] = pinv.getL2();
ehubChannelPostsValue[40] = pinv.getL3();
// pinvreactive
jsonElementsStringTemp = jsonElementsObject.get(EhubJsonElements.getJsonElementsEhub().get(15)).toString();
GetGeneralLx pinvreactive = gson.fromJson(jsonElementsStringTemp, GetGeneralLx.class);
ehubChannelPostsValue[41] = pinvreactive.getL1();
ehubChannelPostsValue[42] = pinvreactive.getL2();
ehubChannelPostsValue[43] = pinvreactive.getL3();
// pload
jsonElementsStringTemp = jsonElementsObject.get(EhubJsonElements.getJsonElementsEhub().get(16)).toString();
GetGeneralLx pload = gson.fromJson(jsonElementsStringTemp, GetGeneralLx.class);
ehubChannelPostsValue[44] = pload.getL1();
ehubChannelPostsValue[45] = pload.getL2();
ehubChannelPostsValue[46] = pload.getL3();
// ploadreactive
jsonElementsStringTemp = jsonElementsObject.get(EhubJsonElements.getJsonElementsEhub().get(17)).toString();
GetGeneralLx ploadreactive = gson.fromJson(jsonElementsStringTemp, GetGeneralLx.class);
ehubChannelPostsValue[47] = ploadreactive.getL1();
ehubChannelPostsValue[48] = ploadreactive.getL2();
ehubChannelPostsValue[49] = ploadreactive.getL3();
// ppv
jsonElementsStringTemp = jsonElementsObject.get(EhubJsonElements.getJsonElementsEhub().get(18)).toString();
GetGeneralValues ppv = gson.fromJson(jsonElementsStringTemp, GetGeneralValues.class);
jsonElementsStringTemp = jsonElementsObject.get(EhubJsonElements.getJsonElementsEhub().get(19)).toString();
GetUdc udc = gson.fromJson(jsonElementsStringTemp, GetUdc.class);
ehubChannelPostsValue[50] = ppv.getVal();
ehubChannelPostsValue[51] = udc.getPos();
ehubChannelPostsValue[52] = udc.getNeg();
// wextprodq
jsonElementsStringTemp = jsonElementsObject.get(EhubJsonElements.getJsonElementsEhub().get(20)).toString();
GetGeneralLx wextprodq = gson.fromJson(jsonElementsStringTemp, GetGeneralLx.class);
ehubChannelPostsValue[53] = mJTokWh(jsonStripEhub(wextprodq.getL1()));
ehubChannelPostsValue[54] = mJTokWh(jsonStripEhub(wextprodq.getL2()));
ehubChannelPostsValue[55] = mJTokWh(jsonStripEhub(wextprodq.getL3()));
// wextconsq
jsonElementsStringTemp = jsonElementsObject.get(EhubJsonElements.getJsonElementsEhub().get(21)).toString();
GetGeneralLx wextconsq = gson.fromJson(jsonElementsStringTemp, GetGeneralLx.class);
ehubChannelPostsValue[56] = mJTokWh(jsonStripEhub(wextconsq.getL1()));
ehubChannelPostsValue[57] = mJTokWh(jsonStripEhub(wextconsq.getL2()));
ehubChannelPostsValue[58] = mJTokWh(jsonStripEhub(wextconsq.getL3()));
// winvprodq
jsonElementsStringTemp = jsonElementsObject.get(EhubJsonElements.getJsonElementsEhub().get(22)).toString();
GetGeneralLx winvprodq = gson.fromJson(jsonElementsStringTemp, GetGeneralLx.class);
ehubChannelPostsValue[59] = mJTokWh(jsonStripEhub(winvprodq.getL1()));
ehubChannelPostsValue[60] = mJTokWh(jsonStripEhub(winvprodq.getL2()));
ehubChannelPostsValue[61] = mJTokWh(jsonStripEhub(winvprodq.getL3()));
// winvconsq
jsonElementsStringTemp = jsonElementsObject.get(EhubJsonElements.getJsonElementsEhub().get(23)).toString();
GetGeneralLx winvconsq = gson.fromJson(jsonElementsStringTemp, GetGeneralLx.class);
ehubChannelPostsValue[62] = mJTokWh(jsonStripEhub(winvconsq.getL1()));
ehubChannelPostsValue[63] = mJTokWh(jsonStripEhub(winvconsq.getL2()));
ehubChannelPostsValue[64] = mJTokWh(jsonStripEhub(winvconsq.getL3()));
// wloadprodq
jsonElementsStringTemp = jsonElementsObject.get(EhubJsonElements.getJsonElementsEhub().get(24)).toString();
GetGeneralLx wloadprodq = gson.fromJson(jsonElementsStringTemp, GetGeneralLx.class);
ehubChannelPostsValue[65] = mJTokWh(jsonStripEhub(wloadprodq.getL1()));
ehubChannelPostsValue[66] = mJTokWh(jsonStripEhub(wloadprodq.getL2()));
ehubChannelPostsValue[67] = mJTokWh(jsonStripEhub(wloadprodq.getL3()));
// wloadconsq
jsonElementsStringTemp = jsonElementsObject.get(EhubJsonElements.getJsonElementsEhub().get(25)).toString();
GetGeneralLx wloadconsq = gson.fromJson(jsonElementsStringTemp, GetGeneralLx.class);
ehubChannelPostsValue[68] = mJTokWh(jsonStripEhub(wloadconsq.getL1()));
ehubChannelPostsValue[69] = mJTokWh(jsonStripEhub(wloadconsq.getL2()));
ehubChannelPostsValue[70] = mJTokWh(jsonStripEhub(wloadconsq.getL3()));
// wextprodq_3p
jsonElementsStringTemp = jsonElementsObject.get(EhubJsonElements.getJsonElementsEhub().get(26)).toString();
GetGeneralValues wextprodq_3p = gson.fromJson(jsonElementsStringTemp, GetGeneralValues.class);
ehubChannelPostsValue[71] = mJTokWh(jsonStripOneLiners(wextprodq_3p.getVal()));
// wextconsq_3p
jsonElementsStringTemp = jsonElementsObject.get(EhubJsonElements.getJsonElementsEhub().get(27)).toString();
GetGeneralValues wextconsq3p = gson.fromJson(jsonElementsStringTemp, GetGeneralValues.class);
ehubChannelPostsValue[72] = mJTokWh(jsonStripOneLiners(wextconsq3p.getVal()));
// winvprodq_3p
jsonElementsStringTemp = jsonElementsObject.get(EhubJsonElements.getJsonElementsEhub().get(28)).toString();
GetGeneralValues winvprodq3p = gson.fromJson(jsonElementsStringTemp, GetGeneralValues.class);
ehubChannelPostsValue[73] = mJTokWh(jsonStripOneLiners(winvprodq3p.getVal()));
// winvconsq_3p
jsonElementsStringTemp = jsonElementsObject.get(EhubJsonElements.getJsonElementsEhub().get(29)).toString();
GetGeneralValues winvconsq3p = gson.fromJson(jsonElementsStringTemp, GetGeneralValues.class);
ehubChannelPostsValue[74] = mJTokWh(jsonStripOneLiners(winvconsq3p.getVal()));
// wloadprodq_3p
jsonElementsStringTemp = jsonElementsObject.get(EhubJsonElements.getJsonElementsEhub().get(30)).toString();
GetGeneralValues wloadprodq3p = gson.fromJson(jsonElementsStringTemp, GetGeneralValues.class);
ehubChannelPostsValue[75] = mJTokWh(jsonStripOneLiners(wloadprodq3p.getVal()));
// wloadconsq_3p
jsonElementsStringTemp = jsonElementsObject.get(EhubJsonElements.getJsonElementsEhub().get(31)).toString();
GetGeneralValues wloadconsq3p = gson.fromJson(jsonElementsStringTemp, GetGeneralValues.class);
ehubChannelPostsValue[76] = mJTokWh(jsonStripOneLiners(wloadconsq3p.getVal()));
// wpv
jsonElementsStringTemp = jsonElementsObject.get(EhubJsonElements.getJsonElementsEhub().get(32)).toString();
GetGeneralValues wpv = gson.fromJson(jsonElementsStringTemp, GetGeneralValues.class);
ehubChannelPostsValue[77] = mJTokWh(jsonStripOneLiners(wpv.getVal()));
// state
jsonElementsStringTemp = jsonElementsObject.get(EhubJsonElements.getJsonElementsEhub().get(33)).toString();
GetGeneralValues state = gson.fromJson(jsonElementsStringTemp, GetGeneralValues.class);
ehubChannelPostsValue[78] = jsonStripOneLiners(state.getVal());
// ts
jsonElementsStringTemp = jsonElementsObject.get(EhubJsonElements.getJsonElementsEhub().get(34)).toString();
GetGeneralValues ts = gson.fromJson(jsonElementsStringTemp, GetGeneralValues.class);
ehubChannelPostsValue[79] = ts.getVal();
ehubChannelsUpdateValues = ehubChannelPostsValue;
}
// Prepare actual Json-topic Sso-messages and update values for channels
@SuppressWarnings("null")
void processIncomingJsonMessageSso(String topic, String messageJsonSso) {
String[] ssoS0ChannelPostsValue = new String[9]; // Array for SSOS0 ( Solar String Optimizer ) Posts
String[] ssoS1ChannelPostsValue = new String[9]; // Array for SSOS1 ( Solar String Optimizer ) Posts
String[] ssoS2ChannelPostsValue = new String[9]; // Array for SSOS2 ( Solar String Optimizer ) Posts
String[] ssoS3ChannelPostsValue = new String[9]; // Array for SSOS3 ( Solar String Optimizer ) Posts
String jsonElementsStringTempS0 = "";
String jsonElementsStringTempS1 = "";
String jsonElementsStringTempS2 = "";
String jsonElementsStringTempS3 = "";
Gson gson = new Gson();
JsonObject jsonElementsObjectSsoS0 = new Gson().fromJson(new Gson().fromJson(messageJsonSso, JsonObject.class),
JsonObject.class);
jsonElementsStringTempS0 = jsonElementsObjectSsoS0.get(SsoJsonElements.getJsonElementsSso().get(0)).toString();
GetGeneralValues idS0 = gson.fromJson(jsonElementsStringTempS0, GetGeneralValues.class);
GetGeneralValues idSso = gson.fromJson(jsonElementsStringTempS0, GetGeneralValues.class);
if (isSsoChecked == false) {
if (ssoS0IdCheck.isEmpty() && ssoS1IdCheck.isEmpty() && ssoS2IdCheck.isEmpty() && ssoS3IdCheck.isEmpty()) {
ssoS0IdCheck = idSso.getVal();
} else {
if (!ssoS0IdCheck.isEmpty() && ssoS1IdCheck.isEmpty() && ssoS2IdCheck.isEmpty()
&& ssoS3IdCheck.isEmpty()) {
ssoS1IdCheck = idSso.getVal();
// isSsoChecked = true;
} else {
if (!ssoS0IdCheck.isEmpty() && !ssoS1IdCheck.isEmpty() && ssoS2IdCheck.isEmpty()
&& ssoS3IdCheck.isEmpty()) {
ssoS2IdCheck = idSso.getVal();
} else {
if (!ssoS0IdCheck.isEmpty() && !ssoS1IdCheck.isEmpty() && !ssoS2IdCheck.isEmpty()
&& ssoS3IdCheck.isEmpty()) {
ssoS3IdCheck = idSso.getVal();
isSsoChecked = true;
}
}
}
}
}
if (idS0.getVal().equals(ssoS0IdCheck)) {
// id
jsonElementsStringTempS0 = jsonElementsObjectSsoS0.get(SsoJsonElements.getJsonElementsSso().get(0))
.toString();
idS0 = gson.fromJson(jsonElementsStringTempS0, GetGeneralValues.class);
ssoS0ChannelPostsValue[0] = idS0.getVal();
// upv
jsonElementsStringTempS0 = jsonElementsObjectSsoS0.get(SsoJsonElements.getJsonElementsSso().get(1))
.toString();
GetGeneralValues upvS0 = gson.fromJson(jsonElementsStringTempS0, GetGeneralValues.class);
ssoS0ChannelPostsValue[1] = upvS0.getVal();
// ipv
jsonElementsStringTempS0 = jsonElementsObjectSsoS0.get(SsoJsonElements.getJsonElementsSso().get(2))
.toString();
GetGeneralValues ipvS0 = gson.fromJson(jsonElementsStringTempS0, GetGeneralValues.class);
ssoS0ChannelPostsValue[2] = ipvS0.getVal();
// wpv
jsonElementsStringTempS0 = jsonElementsObjectSsoS0.get(SsoJsonElements.getJsonElementsSso().get(3))
.toString();
GetGeneralValues wpvS0 = gson.fromJson(jsonElementsStringTempS0, GetGeneralValues.class);
ssoS0ChannelPostsValue[3] = mJTokWh(jsonStripOneLiners(wpvS0.getVal()));
// relaystatus
jsonElementsStringTempS0 = jsonElementsObjectSsoS0.get(SsoJsonElements.getJsonElementsSso().get(4))
.toString();
GetGeneralValues relaystatusS0 = gson.fromJson(jsonElementsStringTempS0, GetGeneralValues.class);
ssoS0ChannelPostsValue[4] = relaystatusS0.getVal();
// temp
jsonElementsStringTempS0 = jsonElementsObjectSsoS0.get(SsoJsonElements.getJsonElementsSso().get(5))
.toString();
GetGeneralValues tempS0 = gson.fromJson(jsonElementsStringTempS0, GetGeneralValues.class);
ssoS0ChannelPostsValue[5] = tempS0.getVal();
// faultcode
jsonElementsStringTempS0 = jsonElementsObjectSsoS0.get(SsoJsonElements.getJsonElementsSso().get(6))
.toString();
GetGeneralValues faultcodeS0 = gson.fromJson(jsonElementsStringTempS0, GetGeneralValues.class);
ssoS0ChannelPostsValue[6] = faultcodeS0.getVal();
// udc
jsonElementsStringTempS0 = jsonElementsObjectSsoS0.get(SsoJsonElements.getJsonElementsSso().get(7))
.toString();
GetGeneralValues udcS0 = gson.fromJson(jsonElementsStringTempS0, GetGeneralValues.class);
ssoS0ChannelPostsValue[7] = udcS0.getVal();
// ts
jsonElementsStringTempS0 = jsonElementsObjectSsoS0.get(SsoJsonElements.getJsonElementsSso().get(8))
.toString();
GetGeneralValues tsS0 = gson.fromJson(jsonElementsStringTempS0, GetGeneralValues.class);
ssoS0ChannelPostsValue[8] = tsS0.getVal();
ssoS0ChannelsUpdateValues = ssoS0ChannelPostsValue;
}
JsonObject jsonElementsObjectSsoS1 = new Gson().fromJson(new Gson().fromJson(messageJsonSso, JsonObject.class),
JsonObject.class);
jsonElementsStringTempS1 = jsonElementsObjectSsoS1.get(SsoJsonElements.getJsonElementsSso().get(0)).toString();
GetGeneralValues idS1 = gson.fromJson(jsonElementsStringTempS1, GetGeneralValues.class);
if (idS1.getVal().equals(ssoS1IdCheck)) {
// id
jsonElementsStringTempS1 = jsonElementsObjectSsoS1.get(SsoJsonElements.getJsonElementsSso().get(0))
.toString();
idS1 = gson.fromJson(jsonElementsStringTempS1, GetGeneralValues.class);
ssoS1ChannelPostsValue[0] = idS1.getVal();
// upv
jsonElementsStringTempS1 = jsonElementsObjectSsoS1.get(SsoJsonElements.getJsonElementsSso().get(1))
.toString();
GetGeneralValues upvS1 = gson.fromJson(jsonElementsStringTempS1, GetGeneralValues.class);
ssoS1ChannelPostsValue[1] = upvS1.getVal();
// ipv
jsonElementsStringTempS1 = jsonElementsObjectSsoS1.get(SsoJsonElements.getJsonElementsSso().get(2))
.toString();
GetGeneralValues ipvS1 = gson.fromJson(jsonElementsStringTempS1, GetGeneralValues.class);
ssoS1ChannelPostsValue[2] = ipvS1.getVal();
// wpv
jsonElementsStringTempS1 = jsonElementsObjectSsoS1.get(SsoJsonElements.getJsonElementsSso().get(3))
.toString();
GetGeneralValues wpvS1 = gson.fromJson(jsonElementsStringTempS1, GetGeneralValues.class);
ssoS1ChannelPostsValue[3] = mJTokWh(jsonStripOneLiners(wpvS1.getVal()));
// relaystatus
jsonElementsStringTempS1 = jsonElementsObjectSsoS1.get(SsoJsonElements.getJsonElementsSso().get(4))
.toString();
GetGeneralValues relaystatusS1 = gson.fromJson(jsonElementsStringTempS1, GetGeneralValues.class);
ssoS1ChannelPostsValue[4] = relaystatusS1.getVal();
// temp
jsonElementsStringTempS1 = jsonElementsObjectSsoS1.get(SsoJsonElements.getJsonElementsSso().get(5))
.toString();
GetGeneralValues tempS1 = gson.fromJson(jsonElementsStringTempS1, GetGeneralValues.class);
ssoS1ChannelPostsValue[5] = tempS1.getVal();
// faultcode
jsonElementsStringTempS1 = jsonElementsObjectSsoS1.get(SsoJsonElements.getJsonElementsSso().get(6))
.toString();
GetGeneralValues faultcodeS1 = gson.fromJson(jsonElementsStringTempS1, GetGeneralValues.class);
ssoS1ChannelPostsValue[6] = faultcodeS1.getVal();
// udc
jsonElementsStringTempS1 = jsonElementsObjectSsoS1.get(SsoJsonElements.getJsonElementsSso().get(7))
.toString();
GetGeneralValues udc = gson.fromJson(jsonElementsStringTempS1, GetGeneralValues.class);
ssoS1ChannelPostsValue[7] = udc.getVal();
// ts
jsonElementsStringTempS1 = jsonElementsObjectSsoS1.get(SsoJsonElements.getJsonElementsSso().get(8))
.toString();
GetGeneralValues tsS1 = gson.fromJson(jsonElementsStringTempS1, GetGeneralValues.class);
ssoS1ChannelPostsValue[8] = tsS1.getVal();
ssoS1ChannelsUpdateValues = ssoS1ChannelPostsValue;
}
JsonObject jsonElementsObjectSsoS2 = new Gson().fromJson(new Gson().fromJson(messageJsonSso, JsonObject.class),
JsonObject.class);
jsonElementsStringTempS2 = jsonElementsObjectSsoS2.get(SsoJsonElements.getJsonElementsSso().get(0)).toString();
GetGeneralValues idS2 = gson.fromJson(jsonElementsStringTempS2, GetGeneralValues.class);
if (idS2.getVal().equals(ssoS2IdCheck)) {
// id
jsonElementsStringTempS2 = jsonElementsObjectSsoS2.get(SsoJsonElements.getJsonElementsSso().get(0))
.toString();
idS2 = gson.fromJson(jsonElementsStringTempS2, GetGeneralValues.class);
ssoS2ChannelPostsValue[0] = idS2.getVal();
// upv
jsonElementsStringTempS2 = jsonElementsObjectSsoS2.get(SsoJsonElements.getJsonElementsSso().get(1))
.toString();
GetGeneralValues upvS2 = gson.fromJson(jsonElementsStringTempS2, GetGeneralValues.class);
ssoS2ChannelPostsValue[1] = upvS2.getVal();
// ipv
jsonElementsStringTempS2 = jsonElementsObjectSsoS2.get(SsoJsonElements.getJsonElementsSso().get(2))
.toString();
GetGeneralValues ipvS2 = gson.fromJson(jsonElementsStringTempS2, GetGeneralValues.class);
ssoS2ChannelPostsValue[2] = ipvS2.getVal();
// wpv
jsonElementsStringTempS2 = jsonElementsObjectSsoS2.get(SsoJsonElements.getJsonElementsSso().get(3))
.toString();
GetGeneralValues wpvS2 = gson.fromJson(jsonElementsStringTempS2, GetGeneralValues.class);
ssoS2ChannelPostsValue[3] = mJTokWh(jsonStripOneLiners(wpvS2.getVal()));
// relaystatus
jsonElementsStringTempS2 = jsonElementsObjectSsoS2.get(SsoJsonElements.getJsonElementsSso().get(4))
.toString();
GetGeneralValues relaystatusS2 = gson.fromJson(jsonElementsStringTempS2, GetGeneralValues.class);
ssoS2ChannelPostsValue[4] = relaystatusS2.getVal();
// temp
jsonElementsStringTempS2 = jsonElementsObjectSsoS2.get(SsoJsonElements.getJsonElementsSso().get(5))
.toString();
GetGeneralValues tempS2 = gson.fromJson(jsonElementsStringTempS2, GetGeneralValues.class);
ssoS2ChannelPostsValue[5] = tempS2.getVal();
// faultcode
jsonElementsStringTempS2 = jsonElementsObjectSsoS2.get(SsoJsonElements.getJsonElementsSso().get(6))
.toString();
GetGeneralValues faultcodeS2 = gson.fromJson(jsonElementsStringTempS2, GetGeneralValues.class);
ssoS2ChannelPostsValue[6] = faultcodeS2.getVal();
// udc
jsonElementsStringTempS2 = jsonElementsObjectSsoS2.get(SsoJsonElements.getJsonElementsSso().get(7))
.toString();
GetGeneralValues udcS2 = gson.fromJson(jsonElementsStringTempS2, GetGeneralValues.class);
ssoS2ChannelPostsValue[7] = udcS2.getVal();
// ts
jsonElementsStringTempS2 = jsonElementsObjectSsoS2.get(SsoJsonElements.getJsonElementsSso().get(8))
.toString();
GetGeneralValues tsS2 = gson.fromJson(jsonElementsStringTempS2, GetGeneralValues.class);
ssoS2ChannelPostsValue[8] = tsS2.getVal();
ssoS2ChannelsUpdateValues = ssoS2ChannelPostsValue;
}
JsonObject jsonElementsObjectSsoS3 = new Gson().fromJson(new Gson().fromJson(messageJsonSso, JsonObject.class),
JsonObject.class);
jsonElementsStringTempS3 = jsonElementsObjectSsoS3.get(SsoJsonElements.getJsonElementsSso().get(0)).toString();
GetGeneralValues idS3 = gson.fromJson(jsonElementsStringTempS3, GetGeneralValues.class);
if (idS3.getVal().equals(ssoS3IdCheck)) {
// id
jsonElementsStringTempS3 = jsonElementsObjectSsoS3.get(SsoJsonElements.getJsonElementsSso().get(0))
.toString();
idS3 = gson.fromJson(jsonElementsStringTempS3, GetGeneralValues.class);
ssoS3ChannelPostsValue[0] = idS3.getVal();
// upv
jsonElementsStringTempS3 = jsonElementsObjectSsoS3.get(SsoJsonElements.getJsonElementsSso().get(1))
.toString();
GetGeneralValues upvS3 = gson.fromJson(jsonElementsStringTempS3, GetGeneralValues.class);
ssoS3ChannelPostsValue[1] = upvS3.getVal();
// ipv
jsonElementsStringTempS3 = jsonElementsObjectSsoS3.get(SsoJsonElements.getJsonElementsSso().get(2))
.toString();
GetGeneralValues ipvS3 = gson.fromJson(jsonElementsStringTempS3, GetGeneralValues.class);
ssoS3ChannelPostsValue[2] = ipvS3.getVal();
// wpv
jsonElementsStringTempS3 = jsonElementsObjectSsoS3.get(SsoJsonElements.getJsonElementsSso().get(3))
.toString();
GetGeneralValues wpvS3 = gson.fromJson(jsonElementsStringTempS3, GetGeneralValues.class);
ssoS3ChannelPostsValue[3] = mJTokWh(jsonStripOneLiners(wpvS3.getVal()));
// relaystatus
jsonElementsStringTempS3 = jsonElementsObjectSsoS3.get(SsoJsonElements.getJsonElementsSso().get(4))
.toString();
GetGeneralValues relaystatusS3 = gson.fromJson(jsonElementsStringTempS3, GetGeneralValues.class);
ssoS3ChannelPostsValue[4] = relaystatusS3.getVal();
// temp
jsonElementsStringTempS3 = jsonElementsObjectSsoS3.get(SsoJsonElements.getJsonElementsSso().get(5))
.toString();
GetGeneralValues tempS3 = gson.fromJson(jsonElementsStringTempS3, GetGeneralValues.class);
ssoS3ChannelPostsValue[5] = tempS3.getVal();
// faultcode
jsonElementsStringTempS3 = jsonElementsObjectSsoS3.get(SsoJsonElements.getJsonElementsSso().get(6))
.toString();
GetGeneralValues faultcode = gson.fromJson(jsonElementsStringTempS3, GetGeneralValues.class);
ssoS3ChannelPostsValue[6] = faultcode.getVal();
// udc
jsonElementsStringTempS3 = jsonElementsObjectSsoS3.get(SsoJsonElements.getJsonElementsSso().get(7))
.toString();
GetGeneralValues udcS3 = gson.fromJson(jsonElementsStringTempS3, GetGeneralValues.class);
ssoS3ChannelPostsValue[7] = udcS3.getVal();
// ts
jsonElementsStringTempS3 = jsonElementsObjectSsoS3.get(SsoJsonElements.getJsonElementsSso().get(8))
.toString();
GetGeneralValues tsS3 = gson.fromJson(jsonElementsStringTempS3, GetGeneralValues.class);
ssoS3ChannelPostsValue[8] = tsS3.getVal();
ssoS3ChannelsUpdateValues = ssoS3ChannelPostsValue;
}
if ("extapi/data/eso".equals(topic)) {
String[] esoChannelPostsValue = new String[10]; // Array for ESO, Energy Storage Optimizer ) Posts
JsonObject jsonElementsObject = new Gson().fromJson(new Gson().fromJson(messageJsonSso, JsonObject.class),
JsonObject.class);
String jsonElementsStringTemp = "";
// faultcode
jsonElementsStringTemp = jsonElementsObject.get(EsoJsonElements.getJsonElementsEso().get(0)).toString();
GetGeneralValues faultcode = gson.fromJson(jsonElementsStringTemp, GetGeneralValues.class);
esoChannelPostsValue[0] = faultcode.getVal();
// id
jsonElementsStringTemp = jsonElementsObject.get(EsoJsonElements.getJsonElementsEso().get(1)).toString();
GetGeneralValues id = gson.fromJson(jsonElementsStringTemp, GetGeneralValues.class);
esoChannelPostsValue[1] = id.getVal();
// ibat
jsonElementsStringTemp = jsonElementsObject.get(EsoJsonElements.getJsonElementsEso().get(2)).toString();
GetGeneralValues ibat = gson.fromJson(jsonElementsStringTemp, GetGeneralValues.class);
esoChannelPostsValue[2] = ibat.getVal();
// ubat
jsonElementsStringTemp = jsonElementsObject.get(EsoJsonElements.getJsonElementsEso().get(3)).toString();
GetGeneralValues ubat = gson.fromJson(jsonElementsStringTemp, GetGeneralValues.class);
esoChannelPostsValue[3] = ubat.getVal();
// relaystatus
jsonElementsStringTemp = jsonElementsObject.get(EsoJsonElements.getJsonElementsEso().get(4)).toString();
GetGeneralValues relaystatus = gson.fromJson(jsonElementsStringTemp, GetGeneralValues.class);
esoChannelPostsValue[4] = relaystatus.getVal();
// soc
jsonElementsStringTemp = jsonElementsObject.get(EsoJsonElements.getJsonElementsEso().get(5)).toString();
GetGeneralValues soc = gson.fromJson(jsonElementsStringTemp, GetGeneralValues.class);
esoChannelPostsValue[5] = soc.getVal();
// temp
jsonElementsStringTemp = jsonElementsObject.get(EsoJsonElements.getJsonElementsEso().get(6)).toString();
GetGeneralValues temp = gson.fromJson(jsonElementsStringTemp, GetGeneralValues.class);
esoChannelPostsValue[6] = temp.getVal();
// wbatprod
jsonElementsStringTemp = jsonElementsObject.get(EsoJsonElements.getJsonElementsEso().get(7)).toString();
GetGeneralValues wbatprod = gson.fromJson(jsonElementsStringTemp, GetGeneralValues.class);
esoChannelPostsValue[7] = mJTokWh(jsonStripOneLiners(wbatprod.getVal()));
// udc
jsonElementsStringTemp = jsonElementsObject.get(EsoJsonElements.getJsonElementsEso().get(8)).toString();
GetGeneralValues udc = gson.fromJson(jsonElementsStringTemp, GetGeneralValues.class);
esoChannelPostsValue[8] = udc.getVal();
// ts
jsonElementsStringTemp = jsonElementsObject.get(EsoJsonElements.getJsonElementsEso().get(9)).toString();
GetGeneralValues ts = gson.fromJson(jsonElementsStringTemp, GetGeneralValues.class);
esoChannelPostsValue[9] = ts.getVal();
esoChannelsUpdateValues = esoChannelPostsValue;
}
if ("extapi/data/esm".equals(topic)) {
String[] esmChannelPostsValue = new String[7]; // Array for ESM, Energy Storage Module ) Posts
JsonObject jsonElementsObject = new Gson().fromJson(new Gson().fromJson(messageJsonSso, JsonObject.class),
JsonObject.class);
String jsonElementsStringTemp = "";
// soc
jsonElementsStringTemp = jsonElementsObject.get(EsmJsonElements.getJsonElementsEsm().get(0)).toString();
GetGeneralValues soc = gson.fromJson(jsonElementsStringTemp, GetGeneralValues.class);
esmChannelPostsValue[0] = soc.getVal();
// soh
jsonElementsStringTemp = jsonElementsObject.get(EsmJsonElements.getJsonElementsEsm().get(1)).toString();
GetGeneralValues soh = gson.fromJson(jsonElementsStringTemp, GetGeneralValues.class);
esmChannelPostsValue[1] = soh.getVal();
// ratedcapacity
jsonElementsStringTemp = jsonElementsObject.get(EsmJsonElements.getJsonElementsEsm().get(2)).toString();
GetGeneralValues ratedcapacity = gson.fromJson(jsonElementsStringTemp, GetGeneralValues.class);
esmChannelPostsValue[2] = ratedcapacity.getVal();
// id
jsonElementsStringTemp = jsonElementsObject.get(EsmJsonElements.getJsonElementsEsm().get(3)).toString();
GetGeneralValues id = gson.fromJson(jsonElementsStringTemp, GetGeneralValues.class);
esmChannelPostsValue[3] = id.getVal();
// ratedpower
jsonElementsStringTemp = jsonElementsObject.get(EsmJsonElements.getJsonElementsEsm().get(4)).toString();
GetGeneralValues ratedpower = gson.fromJson(jsonElementsStringTemp, GetGeneralValues.class);
esmChannelPostsValue[4] = ratedpower.getVal();
// status
jsonElementsStringTemp = jsonElementsObject.get(EsmJsonElements.getJsonElementsEsm().get(5)).toString();
GetGeneralValues status = gson.fromJson(jsonElementsStringTemp, GetGeneralValues.class);
esmChannelPostsValue[5] = status.getVal();
// ts
jsonElementsStringTemp = jsonElementsObject.get(EsmJsonElements.getJsonElementsEsm().get(6)).toString();
GetGeneralValues ts = gson.fromJson(jsonElementsStringTemp, GetGeneralValues.class);
esmChannelPostsValue[6] = ts.getVal();
esmChannelsUpdateValues = esmChannelPostsValue;
}
}
public @Nullable static String[] getEhubChannelUpdateValues() {
try {
return ehubChannelsUpdateValues;
} catch (Exception e) {
logger.debug("Failed at update of Ehub channel values");
}
return ehubChannelsUpdateValues;
}
public @Nullable static String[] getSsoS0ChannelUpdateValues() {
try {
return ssoS0ChannelsUpdateValues;
} catch (Exception e) {
logger.debug("Failed at update of SsoS0 channel values");
}
return ssoS0ChannelsUpdateValues;
}
public @Nullable static String[] getSsoS1ChannelUpdateValues() {
try {
return ssoS1ChannelsUpdateValues;
} catch (Exception e) {
logger.debug("Failed at update of SsoS1 channel values");
}
return ssoS1ChannelsUpdateValues;
}
public @Nullable static String[] getSsoS2ChannelUpdateValues() {
try {
return ssoS2ChannelsUpdateValues;
} catch (Exception e) {
logger.debug("Failed at update of SsoS2 channel values");
}
return ssoS2ChannelsUpdateValues;
}
public @Nullable static String[] getSsoS3ChannelUpdateValues() {
try {
return ssoS3ChannelsUpdateValues;
} catch (Exception e) {
logger.debug("Failed at update of SsoS3 channel values");
}
return ssoS3ChannelsUpdateValues;
}
public @Nullable static String[] getEsoChannelUpdateValues() {
try {
return esoChannelsUpdateValues;
} catch (Exception e) {
logger.debug("Failed at update of Eso channel values");
}
return esoChannelsUpdateValues;
}
public @Nullable static String[] getEsmChannelUpdateValues() {
try {
return esmChannelsUpdateValues;
} catch (Exception e) {
logger.debug("Failed at update of Esm channel values");
}
return esmChannelsUpdateValues;
}
public String jsonStripEhub(String jsonStringEhub) {
return jsonStringEhub.replaceAll("\"", "");
}
public String jsonStripOneLiners(String jsonStringOneLiners) {
return jsonStringOneLiners.replace("{", "").replace("\"", "").replace("val", "").replace(":", "").replace("}",
"");
}
public String mJTokWh(String actualmJ) {
Double actualkWhD = (Double.parseDouble(actualmJ) / 3600000000.0);
return actualkWhD.toString();
}
}

View File

@ -0,0 +1,49 @@
/**
* Copyright (c) 2010-2024 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.ferroamp.internal;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.jdt.annotation.NonNullByDefault;
/**
* The {@link EhubParameters} is responsible for all parameters regarded to EHUB
*
* @author Örjan Backsell - Initial contribution
*
*/
@NonNullByDefault
public class SsoJsonElements {
public String ssoJsonElements;
public SsoJsonElements(String ssoJsonElements) {
this.ssoJsonElements = ssoJsonElements;
}
public static List<String> getJsonElementsSso() {
final List<String> jsonElementsSso = new ArrayList<>();
jsonElementsSso.add(new String("id"));
jsonElementsSso.add(new String("upv"));
jsonElementsSso.add(new String("ipv"));
jsonElementsSso.add(new String("wpv"));
jsonElementsSso.add(new String("relaystatus"));
jsonElementsSso.add(new String("temp"));
jsonElementsSso.add(new String("faultcode"));
jsonElementsSso.add(new String("udc"));
jsonElementsSso.add(new String("ts"));
return jsonElementsSso;
}
}

View File

@ -0,0 +1,49 @@
/**
* Copyright (c) 2010-2024 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
*/
/**
* Copyright (c) 2010-2024 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.ferroamp.internal;
import java.util.Arrays;
import java.util.List;
import org.eclipse.jdt.annotation.NonNullByDefault;
/**
* The {@link SsoParameters} is responsible for all parameters regarded to SSO
*
* @author Örjan Backsell - Initial contribution
*
*/
@NonNullByDefault
public class SsoParameters {
public static List<String> getChannelParametersSso() {
final List<String> channelParametersSs0 = Arrays.asList("id", "measured-voltage-pv-string",
"measured-current-pv-string", "total-solar-energy", "relay-status", "temperature", "fault-code",
"dc-link-voltage", "timestamp");
return channelParametersSs0;
}
}

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon:addon id="ferroamp" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:addon="https://openhab.org/schemas/addon/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/addon/v1.0.0 https://openhab.org/schemas/addon-1.0.0.xsd">
<type>binding</type>
<name>Ferroamp Binding</name>
<description>This is the binding for Ferroamp EnergyHub.</description>
<connection>local</connection>
</addon:addon>

View File

@ -0,0 +1,459 @@
# add-on
addon.ferroamp.name = Ferroamp Binding
addon.ferroamp.description = This is the binding for Ferroamp EnergyHub.
# thing types
thing-type.ferroamp.energyhub.label = Ferroamp EnergyHub
thing-type.ferroamp.energyhub.description = Represents the Ferroamp EnergyHub
thing-type.ferroamp.energyhub.channel.ace-current-l1.label = ACE Current L1
thing-type.ferroamp.energyhub.channel.ace-current-l2.label = ACE Current L2
thing-type.ferroamp.energyhub.channel.ace-current-l3.label = ACE Current L3
thing-type.ferroamp.energyhub.channel.apparent-power.label = Apparent Power
thing-type.ferroamp.energyhub.channel.battery-energy-consumed.label = Battery Energy Consumed
thing-type.ferroamp.energyhub.channel.battery-energy-produced.label = Battery Energy Produced
thing-type.ferroamp.energyhub.channel.consumption-power-l1.label = Consumption Power L1
thing-type.ferroamp.energyhub.channel.consumption-power-l2.label = Consumption Power L2
thing-type.ferroamp.energyhub.channel.consumption-power-l3.label = Consumption Power L3
thing-type.ferroamp.energyhub.channel.consumption-power-reactive-l1.label = Consumption Power Reactive L1
thing-type.ferroamp.energyhub.channel.consumption-power-reactive-l2.label = Consumption Power Reactive L2
thing-type.ferroamp.energyhub.channel.consumption-power-reactive-l3.label = Consumption Power Reactive L3
thing-type.ferroamp.energyhub.channel.esm-rated-power-battery.label = Esm Rated Power of Battery
thing-type.ferroamp.energyhub.channel.esm-soc.label = Esm System State of Charge
thing-type.ferroamp.energyhub.channel.esm-soh.label = Esm System State of Health
thing-type.ferroamp.energyhub.channel.esm-status.label = Esm Status
thing-type.ferroamp.energyhub.channel.esm-timestamp.label = Esm Time Stamp When Message was Published
thing-type.ferroamp.energyhub.channel.esm-total-rated-capacity-all-batteries.label = Esm Rated Capacity
thing-type.ferroamp.energyhub.channel.esm-unique-identifier.label = Esm Unique Identifier
thing-type.ferroamp.energyhub.channel.eso-battery-energy-consumed.label = Eso Battery Energy Consumed
thing-type.ferroamp.energyhub.channel.eso-battery-energy-produced.label = Eso Battery Energy Produced
thing-type.ferroamp.energyhub.channel.eso-dc-link-voltage.label = Eso DC Link Voltage
thing-type.ferroamp.energyhub.channel.eso-fault-code.label = Eso FaultCode
thing-type.ferroamp.energyhub.channel.eso-relay-status.label = Eso RelayStatus
thing-type.ferroamp.energyhub.channel.eso-soc.label = Eso State of Charge
thing-type.ferroamp.energyhub.channel.eso-temperature.label = ESO Temperature Measured on PCB
thing-type.ferroamp.energyhub.channel.eso-timestamp.label = Eso Time Stamp When Message was Published
thing-type.ferroamp.energyhub.channel.eso-unique-identifier.label = Eso Unique Identifier
thing-type.ferroamp.energyhub.channel.external-energy-consumed-3p.label = External Energy Consumed 3p
thing-type.ferroamp.energyhub.channel.external-energy-consumed-l1.label = External Energy Consumed L1
thing-type.ferroamp.energyhub.channel.external-energy-consumed-l2.label = External Energy Consumed L2
thing-type.ferroamp.energyhub.channel.external-energy-consumed-l3.label = External Energy Consumed L3
thing-type.ferroamp.energyhub.channel.external-energy-produced-3p.label = External Energy Produced 3p
thing-type.ferroamp.energyhub.channel.external-energy-produced-l1.label = External Energy Produced L1
thing-type.ferroamp.energyhub.channel.external-energy-produced-l2.label = External Energy Produced L2
thing-type.ferroamp.energyhub.channel.external-energy-produced-l3.label = External Energy Produced L3
thing-type.ferroamp.energyhub.channel.external-voltage-l1.label = External Voltage L1
thing-type.ferroamp.energyhub.channel.external-voltage-l2.label = External Voltage L2
thing-type.ferroamp.energyhub.channel.external-voltage-l3.label = External Voltage L3
thing-type.ferroamp.energyhub.channel.grid-current-active-l1.label = Grid Current Active L1
thing-type.ferroamp.energyhub.channel.grid-current-active-l2.label = Grid Current Active L2
thing-type.ferroamp.energyhub.channel.grid-current-active-l3.label = Grid Current Active L3
thing-type.ferroamp.energyhub.channel.grid-current-l1.label = Grid Current L1
thing-type.ferroamp.energyhub.channel.grid-current-l2.label = Grid Current L2
thing-type.ferroamp.energyhub.channel.grid-current-l3.label = Grid Current L3
thing-type.ferroamp.energyhub.channel.grid-current-reactive-l1.label = Grid Reactive Current L1
thing-type.ferroamp.energyhub.channel.grid-current-reactive-l2.label = Grid Reactive Current L2
thing-type.ferroamp.energyhub.channel.grid-current-reactive-l3.label = Grid Reactive Current L3
thing-type.ferroamp.energyhub.channel.grid-frequency.label = Estimated Grid Frequency
thing-type.ferroamp.energyhub.channel.grid-power-active-l1.label = Grid Power Active L1
thing-type.ferroamp.energyhub.channel.grid-power-active-l2.label = Grid Power Active L2
thing-type.ferroamp.energyhub.channel.grid-power-active-l3.label = Grid Power Active L3
thing-type.ferroamp.energyhub.channel.grid-power-reactive-l1.label = Grid Power Reactive L1
thing-type.ferroamp.energyhub.channel.grid-power-reactive-l2.label = Grid Power Reactive L2
thing-type.ferroamp.energyhub.channel.grid-power-reactive-l3.label = Grid Power Reactive L3
thing-type.ferroamp.energyhub.channel.inverter-current-active-l1.label = Inverter Active Current L1
thing-type.ferroamp.energyhub.channel.inverter-current-active-l2.label = Inverter Active Current L2
thing-type.ferroamp.energyhub.channel.inverter-current-active-l3.label = Inverter Active Current L3
thing-type.ferroamp.energyhub.channel.inverter-current-reactive-l1.label = Inverter Reactive Current L1
thing-type.ferroamp.energyhub.channel.inverter-current-reactive-l2.label = Inverter Reactive Current L2
thing-type.ferroamp.energyhub.channel.inverter-current-reactive-l3.label = Inverter Reactive Current L3
thing-type.ferroamp.energyhub.channel.inverter-energy-consumed-3p.label = Inverter Energy Consumed 3p
thing-type.ferroamp.energyhub.channel.inverter-energy-consumed-l1.label = Inverter Energy Consumed L1
thing-type.ferroamp.energyhub.channel.inverter-energy-consumed-l2.label = Inverter Energy Consumed L2
thing-type.ferroamp.energyhub.channel.inverter-energy-consumed-l3.label = Inverter Energy Consumed L3
thing-type.ferroamp.energyhub.channel.inverter-energy-produced-3p.label = Inverter Energy Produced 3p
thing-type.ferroamp.energyhub.channel.inverter-energy-produced-l1.label = Inverter Energy Produced L1
thing-type.ferroamp.energyhub.channel.inverter-energy-produced-l2.label = Inverter Energy Produced L2
thing-type.ferroamp.energyhub.channel.inverter-energy-produced-l3.label = Inverter Energy Produced L3
thing-type.ferroamp.energyhub.channel.inverter-load-l1.label = Inverter Load L1
thing-type.ferroamp.energyhub.channel.inverter-load-l2.label = Inverter Load L2
thing-type.ferroamp.energyhub.channel.inverter-load-l3.label = Inverter Load L3
thing-type.ferroamp.energyhub.channel.inverter-power-active-l1.label = Inverter Power Active L1
thing-type.ferroamp.energyhub.channel.inverter-power-active-l2.label = Inverter Power Active L2
thing-type.ferroamp.energyhub.channel.inverter-power-active-l3.label = Inverter Power Active L3
thing-type.ferroamp.energyhub.channel.inverter-power-reactive-l1.label = Inverter Power Reactive L1
thing-type.ferroamp.energyhub.channel.inverter-power-reactive-l2.label = Inverter Power Reactive L2
thing-type.ferroamp.energyhub.channel.inverter-power-reactive-l3.label = Inverter Power Reactive L3
thing-type.ferroamp.energyhub.channel.inverter-reactive-current-l1.label = Inverter Reactive Current L1
thing-type.ferroamp.energyhub.channel.inverter-reactive-current-l2.label = Inverter Reactive Current L2
thing-type.ferroamp.energyhub.channel.inverter-reactive-current-l3.label = Inverter Reactive Current L3
thing-type.ferroamp.energyhub.channel.inverter-rms-current-l1.label = Inverter RMS Current L1
thing-type.ferroamp.energyhub.channel.inverter-rms-current-l2.label = Inverter RMS Current L2
thing-type.ferroamp.energyhub.channel.inverter-rms-current-l3.label = Inverter RMS Current L3
thing-type.ferroamp.energyhub.channel.load-energy-consumed-3p.label = Load Energy Consumed 3p
thing-type.ferroamp.energyhub.channel.load-energy-consumed-l1.label = Load Energy Consumed L1
thing-type.ferroamp.energyhub.channel.load-energy-consumed-l2.label = Load Energy Consumed L2
thing-type.ferroamp.energyhub.channel.load-energy-consumed-l3.label = Load Energy Consumed L3
thing-type.ferroamp.energyhub.channel.load-energy-produced-3p.label = Load Energy Produced 3p
thing-type.ferroamp.energyhub.channel.load-energy-produced-l1.label = Load Energy Produced L1
thing-type.ferroamp.energyhub.channel.load-energy-produced-l2.label = Load Energy Produced L2
thing-type.ferroamp.energyhub.channel.load-energy-produced-l3.label = Load Energy Produced L3
thing-type.ferroamp.energyhub.channel.measured-current-battery.label = Eso Current Measured on Battery Side
thing-type.ferroamp.energyhub.channel.measured-voltage-battery.label = Eso Voltage Measured on Battery Side
thing-type.ferroamp.energyhub.channel.negative-dc-link-voltage.label = Negative DC Link Voltage
thing-type.ferroamp.energyhub.channel.positive-dc-link-voltage.label = Positive DC Link Voltage
thing-type.ferroamp.energyhub.channel.power-battery.label = Battery Power
thing-type.ferroamp.energyhub.channel.request-auto.label = RequestAuto
thing-type.ferroamp.energyhub.channel.request-charge.label = RequestCharge
thing-type.ferroamp.energyhub.channel.request-discharge.label = RequestDischarge
thing-type.ferroamp.energyhub.channel.request-extapi-version.label = RequestExtapiVersion
thing-type.ferroamp.energyhub.channel.s0-dc-link-voltage.label = S0 DC Link Voltage
thing-type.ferroamp.energyhub.channel.s0-fault-code.label = S0 FaultCode
thing-type.ferroamp.energyhub.channel.s0-id.label = S0 ID
thing-type.ferroamp.energyhub.channel.s0-measured-current-pv-string.label = S0 Measured Current on PV String Side
thing-type.ferroamp.energyhub.channel.s0-measured-voltage-pv-string.label = S0 Measured Voltage on PV String Side
thing-type.ferroamp.energyhub.channel.s0-relay-status.label = S0 RelayStatus
thing-type.ferroamp.energyhub.channel.s0-temperature.label = S0 Temperature Measured on PCB
thing-type.ferroamp.energyhub.channel.s0-timestamp.label = S0 Time Stamp When Message was Published
thing-type.ferroamp.energyhub.channel.s0-total-solar-energy.label = S0 Total Solar Energy
thing-type.ferroamp.energyhub.channel.s1-dc-link-voltage.label = S1 DC Link Voltage
thing-type.ferroamp.energyhub.channel.s1-fault-code.label = S1 FaultCode
thing-type.ferroamp.energyhub.channel.s1-id.label = S1 ID
thing-type.ferroamp.energyhub.channel.s1-measured-current-pv-string.label = S1 Measured Current on PV String Side
thing-type.ferroamp.energyhub.channel.s1-measured-voltage-pv-string.label = S1 Measured Voltage on PV String Side
thing-type.ferroamp.energyhub.channel.s1-relay-status.label = S1 RelayStatus
thing-type.ferroamp.energyhub.channel.s1-temperature.label = S1 Temperature Measured on PCB
thing-type.ferroamp.energyhub.channel.s1-timestamp.label = S1 Time Stamp When Message was Published
thing-type.ferroamp.energyhub.channel.s1-total-solar-energy.label = S1 Total Solar Energy
thing-type.ferroamp.energyhub.channel.s2-dc-link-voltage.label = S2 DC Link Voltage
thing-type.ferroamp.energyhub.channel.s2-fault-code.label = S2 FaultCode
thing-type.ferroamp.energyhub.channel.s2-id.label = S2 ID
thing-type.ferroamp.energyhub.channel.s2-measured-current-pv-string.label = S2 Measured Current on PV String Side
thing-type.ferroamp.energyhub.channel.s2-measured-voltage-pv-string.label = S2 Measured Voltage on PV String Side
thing-type.ferroamp.energyhub.channel.s2-relay-status.label = S2 RelayStatus
thing-type.ferroamp.energyhub.channel.s2-temperature.label = S2 Temperature Measured on PCB
thing-type.ferroamp.energyhub.channel.s2-timestamp.label = S2 Time Stamp When Message was Published
thing-type.ferroamp.energyhub.channel.s2-total-solar-energy.label = S2 Total Solar Energy
thing-type.ferroamp.energyhub.channel.s3-dc-link-voltage.label = S3 DC Link Voltage
thing-type.ferroamp.energyhub.channel.s3-fault-code.label = S3 FaultCode
thing-type.ferroamp.energyhub.channel.s3-id.label = S3 ID
thing-type.ferroamp.energyhub.channel.s3-measured-current-pv-string.label = S3 Measured Current on PV String Side
thing-type.ferroamp.energyhub.channel.s3-measured-voltage-pv-string.label = S3 Measured Voltage on PV String Side
thing-type.ferroamp.energyhub.channel.s3-relay-status.label = S3 RelayStatus
thing-type.ferroamp.energyhub.channel.s3-temperature.label = S3 Temperature Measured on PCB
thing-type.ferroamp.energyhub.channel.s3-timestamp.label = S3 Time Stamp When Message was Published
thing-type.ferroamp.energyhub.channel.s3-total-solar-energy.label = S3 Total Solar Energy
thing-type.ferroamp.energyhub.channel.soc.label = System State of Charge
thing-type.ferroamp.energyhub.channel.soh.label = System State of Health
thing-type.ferroamp.energyhub.channel.solar-pv.label = Solar Power
thing-type.ferroamp.energyhub.channel.state.label = State of the System
thing-type.ferroamp.energyhub.channel.timestamp.label = Time Stamp When Message was Published
thing-type.ferroamp.energyhub.channel.total-rated-capacity-all-batteries.label = Total Rated Capacity of All Batteries
thing-type.ferroamp.energyhub.channel.total-solar-energy.label = Total Solar Energy
thing-type.ferroamp.energyhub.label = Ferroamp Binding Thing
thing-type.ferroamp.energyhub.description = Thing for Ferroamp Binding
# thing types config
thing-type.config.ferroamp.energyhub.esm.label = ESM Module Available
thing-type.config.ferroamp.energyhub.esm.description = ESM Module Available
thing-type.config.ferroamp.energyhub.eso.label = ESO Module Available
thing-type.config.ferroamp.energyhub.eso.description = ESO Module Available
thing-type.config.ferroamp.energyhub.hasBattery.label = Battery Capable
thing-type.config.ferroamp.energyhub.hasBattery.description = Ehub type, with/without battery
thing-type.config.ferroamp.energyhub.hostName.label = Hostname
thing-type.config.ferroamp.energyhub.hostName.description = Hostname or IP address of the device
thing-type.config.ferroamp.energyhub.password.label = Password
thing-type.config.ferroamp.energyhub.password.description = Password to access the device
thing-type.config.ferroamp.energyhub.ssoS0.label = SSO String S0 Available
thing-type.config.ferroamp.energyhub.ssoS0.description = First SSO Unit Available
thing-type.config.ferroamp.energyhub.ssoS1.label = SSO String S1 Available
thing-type.config.ferroamp.energyhub.ssoS1.description = Second SSO Unit Available
thing-type.config.ferroamp.energyhub.ssoS2.label = SSO String S2 Available
thing-type.config.ferroamp.energyhub.ssoS2.description = Third SSO Unit Available
thing-type.config.ferroamp.energyhub.ssoS3.label = SSO String S3 Available
thing-type.config.ferroamp.energyhub.ssoS3.description = Fourth SSO Unit Available
thing-type.config.ferroamp.energyhub.userName.label = Username
thing-type.config.ferroamp.energyhub.userName.description = Username to access the device
# channel group types
channel-group-type.ferroamp.date-time.label = Date Time
channel-group-type.ferroamp.dimensionless.label = Dimensionless
channel-group-type.ferroamp.electric-current.label = Electric Current
channel-group-type.ferroamp.electric-potential.label = Electrical Potential
channel-group-type.ferroamp.energy.label = Energy
channel-group-type.ferroamp.frequency.label = Frequency
channel-group-type.ferroamp.power.label = Power
channel-group-type.ferroamp.string.label = String
channel-group-type.ferroamp.temperature.label = Temperature
# channel types
channel-type.ferroamp.date-time.label = Date Time
channel-type.ferroamp.dimensionless.label = Dimensionless
channel-type.ferroamp.electric-current.label = Electric Current
channel-type.ferroamp.electric-potential.label = Electrical Potential
channel-type.ferroamp.energy.label = Energy
channel-type.ferroamp.frequency.label = Frequency
channel-type.ferroamp.power.label = Power
channel-type.ferroamp.request-extapiversion.label = Request-ExtapiVersion
channel-type.ferroamp.request-extapiversion.description = Returns Extapi Version
channel-type.ferroamp.request.label = String
channel-type.ferroamp.request.description = Used for control of system
channel-type.ferroamp.string.label = String
channel-type.ferroamp.temperature.label = Temperature
# channel types
channel-type.ferroamp.ehub-gridfreq.label = EHUB, Estimated Grid Frequency
channel-type.ferroamp.ehub-gridfreq.description = Estimated grid frequency
channel-type.ferroamp.ehub-iace-l1.label = EHUB, ACE Equalization L1
channel-type.ferroamp.ehub-iace-l1.description = ACE equalization l1
channel-type.ferroamp.ehub-iace-l2.label = EHUB, ACE Equalization L2
channel-type.ferroamp.ehub-iace-l2.description = ACE equalization l2
channel-type.ferroamp.ehub-iace-l3.label = EHUB, ACE Equalization L3
channel-type.ferroamp.ehub-iace-l3.description = ACE equalization l3
channel-type.ferroamp.ehub-iext-l1.label = EHUB, External/Grid RMS Current L1
channel-type.ferroamp.ehub-iext-l1.description = External/Grid rms current l1
channel-type.ferroamp.ehub-iext-l2.label = EHUB, External/Grid RMS Current L2
channel-type.ferroamp.ehub-iext-l2.description = External/Grid rms current l2
channel-type.ferroamp.ehub-iext-l3.label = EHUB, External/Grid RMS Current L3
channel-type.ferroamp.ehub-iext-l3.description = External/Grid rms current l3
channel-type.ferroamp.ehub-iextd-l1.label = EHUB, External/Grid Reactive Current L1
channel-type.ferroamp.ehub-iextd-l1.description = External/Grid reactive current l1
channel-type.ferroamp.ehub-iextd-l2.label = EHUB, External/Grid Reactive Current L2
channel-type.ferroamp.ehub-iextd-l2.description = External/Grid reactive current l2
channel-type.ferroamp.ehub-iextd-l3.label = EHUB, External/Grid Reactive Current L3
channel-type.ferroamp.ehub-iextd-l3.description = External/Grid reactive current l3
channel-type.ferroamp.ehub-iextq-l1.label = EHUB, External/Grid Active Current L1
channel-type.ferroamp.ehub-iextq-l1.description = External/Grid active current l1
channel-type.ferroamp.ehub-iextq-l2.label = EHUB, External/Grid Active Current L2
channel-type.ferroamp.ehub-iextq-l2.description = External/Grid active current l2
channel-type.ferroamp.ehub-iextq-l3.label = EHUB, External/Grid Active Current L3
channel-type.ferroamp.ehub-iextq-l3.description = External/Grid active current l3
channel-type.ferroamp.ehub-il-l1.label = EHUB, Inverter RMS Current L1
channel-type.ferroamp.ehub-il-l1.description = Inverter rms current l1
channel-type.ferroamp.ehub-il-l2.label = EHUB, Inverter RMS Current L2
channel-type.ferroamp.ehub-il-l2.description = Inverter rms current l2
channel-type.ferroamp.ehub-il-l3.label = EHUB, Inverter RMS Current L3
channel-type.ferroamp.ehub-il-l3.description = Inverter rms current l3
channel-type.ferroamp.ehub-ild-l1.label = EHUB, Inverter Reactive Current L1
channel-type.ferroamp.ehub-ild-l1.description = Inverter reactive current l1
channel-type.ferroamp.ehub-ild-l2.label = EHUB, Inverter Reactive Current L2
channel-type.ferroamp.ehub-ild-l2.description = Inverter reactive current l2
channel-type.ferroamp.ehub-ild-l3.label = EHUB, Inverter Reactive Current L3
channel-type.ferroamp.ehub-ild-l3.description = Inverter reactive current l3
channel-type.ferroamp.ehub-iloadd-l1.label = EHUB, ILoadd L1
channel-type.ferroamp.ehub-iloadd-l2.label = EHUB, ILoadd L2
channel-type.ferroamp.ehub-iloadd-l3.label = EHUB, ILoadd L3
channel-type.ferroamp.ehub-iloadq-l1.label = EHUB, ILoadq L1
channel-type.ferroamp.ehub-iloadq-l2.label = EHUB, ILoadq L2
channel-type.ferroamp.ehub-iloadq-l3.label = EHUB, ILoadq L3
channel-type.ferroamp.ehub-ilq-l1.label = EHUB, Inverter Active Current L1
channel-type.ferroamp.ehub-ilq-l1.description = Inverter active current l1
channel-type.ferroamp.ehub-ilq-l2.label = EHUB, Inverter Active Current L2
channel-type.ferroamp.ehub-ilq-l2.description = Inverter active current l2
channel-type.ferroamp.ehub-ilq-l3.label = EHUB, Inverter Active Current L3
channel-type.ferroamp.ehub-ilq-l3.description = Inverter active current l3
channel-type.ferroamp.ehub-pbat.label = EHUB, Power Batteries
channel-type.ferroamp.ehub-pbat.description = Only sent when system has batteries
channel-type.ferroamp.ehub-pext-l1.label = EHUB, External/Grid Power, Active L1
channel-type.ferroamp.ehub-pext-l1.description = External/Grid power, active l1
channel-type.ferroamp.ehub-pext-l2.label = EHUB, External/Grid Power, Active L2
channel-type.ferroamp.ehub-pext-l2.description = External/Grid power, active l2
channel-type.ferroamp.ehub-pext-l3.label = EHUB, External/Grid Power, Active L3
channel-type.ferroamp.ehub-pext-l3.description = External/Grid power, active l3
channel-type.ferroamp.ehub-pextreactive-l1.label = EHUB, External/Grid Power, Reactive L1
channel-type.ferroamp.ehub-pextreactive-l1.description = External/Grid power, reactive l1
channel-type.ferroamp.ehub-pextreactive-l2.label = EHUB, External/Grid Power, Reactive L2
channel-type.ferroamp.ehub-pextreactive-l2.description = External/Grid power, reactive l2
channel-type.ferroamp.ehub-pextreactive-l3.label = EHUB, External/Grid Power, Reactive L3
channel-type.ferroamp.ehub-pextreactive-l3.description = External/Grid power, reactive l3
channel-type.ferroamp.ehub-pinv-l1.label = EHUB, Inverter Power, Active L1
channel-type.ferroamp.ehub-pinv-l1.description = Inverter power, active l1
channel-type.ferroamp.ehub-pinv-l2.label = EHUB, Inverter Power, Active L2
channel-type.ferroamp.ehub-pinv-l2.description = Inverter power, active l2
channel-type.ferroamp.ehub-pinv-l3.label = EHUB, Inverter Power, Active L3
channel-type.ferroamp.ehub-pinv-l3.description = Inverter power, active l3
channel-type.ferroamp.ehub-pinvreactive-l1.label = EHUB, Inverter Power, Reactive L1
channel-type.ferroamp.ehub-pinvreactive-l1.description = Inverter power, reactive l1
channel-type.ferroamp.ehub-pinvreactive-l2.label = EHUB, Inverter Power, Reactive L2
channel-type.ferroamp.ehub-pinvreactive-l2.description = Inverter power, reactive l2
channel-type.ferroamp.ehub-pinvreactive-l3.label = EHUB, Inverter Power, Reactive L3
channel-type.ferroamp.ehub-pinvreactive-l3.description = Inverter power, reactive l3
channel-type.ferroamp.ehub-pload-l1.label = EHUB, PLoad L1
channel-type.ferroamp.ehub-pload-l2.label = EHUB, PLoad L2
channel-type.ferroamp.ehub-pload-l3.label = EHUB, PLoad L3
channel-type.ferroamp.ehub-ploadreactive-l1.label = EHUB, PLoadReactive L1
channel-type.ferroamp.ehub-ploadreactive-l2.label = EHUB, PLoadReactive L2
channel-type.ferroamp.ehub-ploadreactive-l3.label = EHUB, PLoadReactive L3
channel-type.ferroamp.ehub-ppv.label = EHUB, Power PV
channel-type.ferroamp.ehub-ppv.description = Only sent when system has pv
channel-type.ferroamp.ehub-ratedcap.label = EHUB, Total Rated Capacity Batteries
channel-type.ferroamp.ehub-ratedcap.description = Total rated capacity of all batteries in the system
channel-type.ferroamp.ehub-sext.label = EHUB, Apparent Power
channel-type.ferroamp.ehub-sext.description = Apparent power
channel-type.ferroamp.ehub-soc.label = EHUB, Soc
channel-type.ferroamp.ehub-soc.description = State of charge for the EHUB
channel-type.ferroamp.ehub-soh.label = EHUB, Soh
channel-type.ferroamp.ehub-soh.description = State of health for the EHUB
channel-type.ferroamp.ehub-state.label = EHUB, State Of The System
channel-type.ferroamp.ehub-state.description = State of the system
channel-type.ferroamp.ehub-ts.label = EHUB, Time Stamp
channel-type.ferroamp.ehub-ts.description = Time stamp when message was published
channel-type.ferroamp.ehub-udcneg.label = EHUB, Negativ DC Link Voltage
channel-type.ferroamp.ehub-udcneg.description = Negativ dc link voltage
channel-type.ferroamp.ehub-udcpos.label = EHUB, Positiv DC Link Voltage
channel-type.ferroamp.ehub-udcpos.description = Positiv dc link voltage
channel-type.ferroamp.ehub-ul-l1.label = EHUB, External Voltage L1
channel-type.ferroamp.ehub-ul-l1.description = External voltage l1
channel-type.ferroamp.ehub-ul-l2.label = EHUB, External Voltage L2
channel-type.ferroamp.ehub-ul-l2.description = External voltage l2
channel-type.ferroamp.ehub-ul-l3.label = EHUB, External Voltage L3
channel-type.ferroamp.ehub-ul-l3.description = External voltage l3
channel-type.ferroamp.ehub-wbatprod.label = EHUB, Produced Power Batteries
channel-type.ferroamp.ehub-wbatprod.description = Only sent when system has batteries
channel-type.ferroamp.ehub-wextconsq-l1.label = EHUB, WExtConsq L1
channel-type.ferroamp.ehub-wextconsq-l2.label = EHUB, WExtConsq L2
channel-type.ferroamp.ehub-wextconsq-l3.label = EHUB, WExtConsq L3
channel-type.ferroamp.ehub-wextconsq_3p.label = EHUB, WExtConsq_3p
channel-type.ferroamp.ehub-wextprodq-l1.label = EHUB, WExtProdq L1
channel-type.ferroamp.ehub-wextprodq-l2.label = EHUB, WExtProdq L2
channel-type.ferroamp.ehub-wextprodq-l3.label = EHUB, WExtProdq L3
channel-type.ferroamp.ehub-wextprodq_3p.label = EHUB, WExtProdq_3p
channel-type.ferroamp.ehub-winvconsq-l1.label = EHUB, WInvConsq L1
channel-type.ferroamp.ehub-winvconsq-l2.label = EHUB, WInvConsq L2
channel-type.ferroamp.ehub-winvconsq-l3.label = EHUB, WInvConsq L3
channel-type.ferroamp.ehub-winvconsq_3p.label = EHUB, WInvConsq_3p
channel-type.ferroamp.ehub-winvprodq-l1.label = EHUB, WInvProdq L1
channel-type.ferroamp.ehub-winvprodq-l2.label = EHUB, WInvProdq L2
channel-type.ferroamp.ehub-winvprodq-l3.label = EHUB, WInvProdq L3
channel-type.ferroamp.ehub-winvprodq_3p.label = EHUB, WInvProdq_3p
channel-type.ferroamp.ehub-wloadconsq-l1.label = EHUB, WLoadConsq L1
channel-type.ferroamp.ehub-wloadconsq-l2.label = EHUB, WLoadConsq L2
channel-type.ferroamp.ehub-wloadconsq-l3.label = EHUB, WLoadConsq L3
channel-type.ferroamp.ehub-wloadconsq_3p.label = EHUB, WLoadConsq_3p
channel-type.ferroamp.ehub-wloadprodq-l1.label = EHUB, WLoadProdq L1
channel-type.ferroamp.ehub-wloadprodq-l2.label = EHUB, WLoadProdq L2
channel-type.ferroamp.ehub-wloadprodq-l3.label = EHUB, WLoadProdq L3
channel-type.ferroamp.ehub-wloadprodq_3p.label = EHUB, WLoadProdq_3p
channel-type.ferroamp.ehub-wpbatcons.label = EHUB, Consumed Power Batteries
channel-type.ferroamp.ehub-wpbatcons.description = Only sent when system has batteries
channel-type.ferroamp.ehub-wpv.label = EHUB, PV Power
channel-type.ferroamp.ehub-wpv.description = Only sent when system has pv
channel-type.ferroamp.esm-id.label = ESM, Unique Identifier Of Battery.
channel-type.ferroamp.esm-id.description = Unique identifier of battery. If available, this will be the unique id that the battery reports.
channel-type.ferroamp.esm-rated-capacity.label = ESM, Rated Capacity Of Battery
channel-type.ferroamp.esm-rated-capacity.description = Rated capacity of battery
channel-type.ferroamp.esm-rated-power.label = ESM, Rated Power Of Battery
channel-type.ferroamp.esm-rated-power.description = Rated power of battery
channel-type.ferroamp.esm-soc.label = ESM, Soc
channel-type.ferroamp.esm-soc.description = State of charge for the ESM
channel-type.ferroamp.esm-soh.label = ESM, Soh
channel-type.ferroamp.esm-soh.description = State of health for the ESM
channel-type.ferroamp.esm-status.label = ESM, Battery Status
channel-type.ferroamp.esm-status.description = Dependent on battery manufacturer
channel-type.ferroamp.esm-ts.label = ESM, Time Stamp
channel-type.ferroamp.esm-ts.description = Time stamp when message was published
channel-type.ferroamp.eso-faultcode.label = ESO, Fault Code
channel-type.ferroamp.eso-faultcode.description = See section 4.1.3.1 below for further explanation of fault codes
channel-type.ferroamp.eso-ibat.label = ESO, Current On Battery Side
channel-type.ferroamp.eso-ibat.description = Measured on battery side
channel-type.ferroamp.eso-id.label = ESO, Unique Identifier
channel-type.ferroamp.eso-id.description = Unique identifier
channel-type.ferroamp.eso-relaystatus.label = ESO, Relay Status
channel-type.ferroamp.eso-relaystatus.description = 0 = relay closed, 1 = relay open
channel-type.ferroamp.eso-soc.label = ESO, Soc
channel-type.ferroamp.eso-soc.description = State of charge for ESO
channel-type.ferroamp.eso-temp.label = ESO, Temperature
channel-type.ferroamp.eso-temp.description = Temperature measured inside ESO
channel-type.ferroamp.eso-ts.label = ESO, Time stamp
channel-type.ferroamp.eso-ts.description = Time stamp when message was published
channel-type.ferroamp.eso-ubat.label = ESO, Voltage On Battery Side
channel-type.ferroamp.eso-ubat.description = Measured on battery side
channel-type.ferroamp.eso-udc.label = ESO, DC Link Voltage
channel-type.ferroamp.eso-udc.description = Dc link voltage as measured by ESO
channel-type.ferroamp.eso-wbatprod.label = ESO, Total Energy Produced
channel-type.ferroamp.eso-wbatprod.description = Total energy produced by ESO, i.e total energy discharged
channel-type.ferroamp.eso-wpbatcons.label = ESO, Total Energy Consumed
channel-type.ferroamp.eso-wpbatcons.description = Total energy consumed by ESO, i.e total energy charged
channel-type.ferroamp.request-auto.label = Configure Auto Power
channel-type.ferroamp.request-auto.description = Set auto power
channel-type.ferroamp.request-charge.label = Configure Charge Power
channel-type.ferroamp.request-charge.description = Charge power in watt
channel-type.ferroamp.request-discharge.label = Configure Discharge Power
channel-type.ferroamp.request-discharge.description = Discharge power in watt
channel-type.ferroamp.ssos0-faultcode.label = SSO, String-0, Fault Code
channel-type.ferroamp.ssos0-faultcode.description = 0x00 = OK, For all other values please contact Ferroamp support
channel-type.ferroamp.ssos0-id.label = SSO, String-0, Unique Identifier
channel-type.ferroamp.ssos0-id.description = Unique identifier of SSO
channel-type.ferroamp.ssos0-ipv.label = SSO, String-0, Current On PV String Side
channel-type.ferroamp.ssos0-ipv.description = Measured on pv string side
channel-type.ferroamp.ssos0-relaystatus.label = SSO, String-0, Relay Status
channel-type.ferroamp.ssos0-relaystatus.description = 0 = relay closed (i.e running power), 1 = relay open/disconnected, 2 = precharge
channel-type.ferroamp.ssos0-temp.label = SSO, String-0, Temperature
channel-type.ferroamp.ssos0-temp.description = Temperature measured on pcb of SSO
channel-type.ferroamp.ssos0-ts.label = SSO, String-0, Time Stamp
channel-type.ferroamp.ssos0-ts.description = Time stamp when message was published
channel-type.ferroamp.ssos0-udc.label = SSO, String-0, DC Link Voltage
channel-type.ferroamp.ssos0-udc.description = Dc link voltage as measured by SSO
channel-type.ferroamp.ssos0-upv.label = SSO, String-0, Voltage On PV String Side
channel-type.ferroamp.ssos0-upv.description = Measured on pv string side
channel-type.ferroamp.ssos0-wpv.label = SSO, String-0, Total Energy Produced
channel-type.ferroamp.ssos0-wpv.description = Total energy produced by SSO
channel-type.ferroamp.ssos1-faultcode.label = SSO, String-1, Fault Code
channel-type.ferroamp.ssos1-faultcode.description = 0x00 = OK, For all other values please contact Ferroamp support
channel-type.ferroamp.ssos1-id.label = SSO, String-1, Unique Identifier
channel-type.ferroamp.ssos1-id.description = Unique identifier of SSO
channel-type.ferroamp.ssos1-ipv.label = SSO, String-1, Current On PV String Side
channel-type.ferroamp.ssos1-ipv.description = Measured on pv string side
channel-type.ferroamp.ssos1-relaystatus.label = SSO, String-1, Relay Status
channel-type.ferroamp.ssos1-relaystatus.description = 0 = relay closed (i.e running power), 1 = relay open/disconnected, 2 = precharge
channel-type.ferroamp.ssos1-temp.label = SSO, String-1, Temperature
channel-type.ferroamp.ssos1-temp.description = Temperature measured on pcb of SSO
channel-type.ferroamp.ssos1-ts.label = SSO, String-1, Time Stamp
channel-type.ferroamp.ssos1-ts.description = Time stamp when message was published
channel-type.ferroamp.ssos1-udc.label = SSO, String-1, DC Link Voltage
channel-type.ferroamp.ssos1-udc.description = Dc link voltage as measured by SSO
channel-type.ferroamp.ssos1-upv.label = SSO, String-1, Voltage On PV String Side
channel-type.ferroamp.ssos1-upv.description = Measured on pv string side
channel-type.ferroamp.ssos1-wpv.label = SSO, String-1, Total Energy Produced
channel-type.ferroamp.ssos1-wpv.description = Total energy produced by SSO
channel-type.ferroamp.ssos2-faultcode.label = SSO, String-2, Fault Code
channel-type.ferroamp.ssos2-faultcode.description = 0x00 = OK, For all other values please contact Ferroamp support
channel-type.ferroamp.ssos2-id.label = SSO, String-2, Unique Identifier
channel-type.ferroamp.ssos2-id.description = Unique identifier of SSO
channel-type.ferroamp.ssos2-ipv.label = SSO, String-2, Current On PV String Side
channel-type.ferroamp.ssos2-ipv.description = Measured on pv string side
channel-type.ferroamp.ssos2-relaystatus.label = SSO, String-2, Relay Status
channel-type.ferroamp.ssos2-relaystatus.description = 0 = relay closed (i.e running power), 1 = relay open/disconnected, 2 = precharge
channel-type.ferroamp.ssos2-temp.label = SSO, String-2, Temperature
channel-type.ferroamp.ssos2-temp.description = Temperature measured on pcb of SSO
channel-type.ferroamp.ssos2-ts.label = SSO, String-2, Time Stamp
channel-type.ferroamp.ssos2-ts.description = Time stamp when message was published
channel-type.ferroamp.ssos2-udc.label = SSO, String-2, DC Link Voltage
channel-type.ferroamp.ssos2-udc.description = Dc link voltage as measured by SSO
channel-type.ferroamp.ssos2-upv.label = SSO, String-2, Voltage On PV String Side
channel-type.ferroamp.ssos2-upv.description = Measured on pv string side
channel-type.ferroamp.ssos2-wpv.label = SSO, String-2, Total Energy Produced
channel-type.ferroamp.ssos2-wpv.description = Total energy produced by SSO
channel-type.ferroamp.ssos3-faultcode.label = SSO, String-3, Fault Code
channel-type.ferroamp.ssos3-faultcode.description = 0x00 = OK, For all other values please contact Ferroamp support
channel-type.ferroamp.ssos3-id.label = SSO, String-3, Unique Identifier
channel-type.ferroamp.ssos3-id.description = Unique identifier of SSO
channel-type.ferroamp.ssos3-ipv.label = SSO, String-3, Current On PV String Side
channel-type.ferroamp.ssos3-ipv.description = Measured on pv string side
channel-type.ferroamp.ssos3-relaystatus.label = SSO, String-3, Relay Status
channel-type.ferroamp.ssos3-relaystatus.description = 0 = relay closed (i.e running power), 1 = relay open/disconnected, 2 = precharge
channel-type.ferroamp.ssos3-temp.label = SSO, String-3, Temperature
channel-type.ferroamp.ssos3-temp.description = Temperature measured on pcb of SSO
channel-type.ferroamp.ssos3-ts.label = SSO, String-3, Time Stamp
channel-type.ferroamp.ssos3-ts.description = Time stamp when message was published
channel-type.ferroamp.ssos3-udc.label = SSO, String-3, DC Link Voltage
channel-type.ferroamp.ssos3-udc.description = Dc link voltage as measured by SSO
channel-type.ferroamp.ssos3-upv.label = SSO, String-3, Voltage On PV String Side
channel-type.ferroamp.ssos3-upv.description = Measured on pv string side
channel-type.ferroamp.ssos3-wpv.label = SSO, String-3, Total Energy Produced
channel-type.ferroamp.ssos3-wpv.description = Total energy produced by SSO

View File

@ -0,0 +1,101 @@
<?xml version="1.0" encoding="UTF-8"?>
<thing:thing-descriptions bindingId="ferroamp"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:thing="https://openhab.org/schemas/thing-description/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/thing-description/v1.0.0 https://openhab.org/schemas/thing-description-1.0.0.xsd">
<channel-type id="energy">
<item-type>Number:Energy</item-type>
<label>Energy</label>
<category>Energy</category>
<state readOnly="true" pattern="%.2f %unit%"/>
</channel-type>
<channel-group-type id="energy">
<label>Energy</label>
</channel-group-type>
<channel-type id="electric-current">
<item-type>Number:ElectricCurrent</item-type>
<label>Electric Current</label>
<category>Energy</category>
<state readOnly="true" pattern="%.2f %unit%"/>
</channel-type>
<channel-group-type id="electric-current">
<label>Electric Current</label>
</channel-group-type>
<channel-type id="power">
<item-type>Number:Power</item-type>
<label>Power</label>
<category>Energy</category>
<state readOnly="true" pattern="%.2f %unit%"/>
</channel-type>
<channel-group-type id="power">
<label>Power</label>
</channel-group-type>
<channel-type id="date-time">
<item-type>DateTime</item-type>
<label>Date Time</label>
<category>Energy</category>
<state readOnly="true" pattern="%.2f %unit%"/>
</channel-type>
<channel-group-type id="date-time">
<label>Date Time</label>
</channel-group-type>
<channel-type id="electric-potential">
<item-type>Number:ElectricPotential</item-type>
<label>Electrical Potential</label>
<category>Energy</category>
<state readOnly="true" pattern="%.2f %unit%"/>
</channel-type>
<channel-group-type id="electric-potential">
<label>Electrical Potential</label>
</channel-group-type>
<channel-type id="frequency">
<item-type>Number:Frequency</item-type>
<label>Frequency</label>
<category>Energy</category>
<state readOnly="true" pattern="%.2f %unit%"/>
</channel-type>
<channel-group-type id="frequency">
<label>Frequency</label>
</channel-group-type>
<channel-type id="dimensionless">
<item-type>Number:Dimensionless</item-type>
<label>Dimensionless</label>
<category>Energy</category>
<state readOnly="true" pattern="%.2f %unit%"/>
</channel-type>
<channel-group-type id="dimensionless">
<label>Dimensionless</label>
</channel-group-type>
<channel-type id="temperature">
<item-type>Number:Temperature</item-type>
<label>Temperature</label>
<category>Energy</category>
<state readOnly="true" pattern="%.2f %unit%"/>
</channel-type>
<channel-group-type id="temperature">
<label>Temperature</label>
</channel-group-type>
<channel-type id="string">
<item-type>String</item-type>
<label>String</label>
<category>Energy</category>
<state readOnly="true"/>
</channel-type>
<channel-group-type id="string">
<label>String</label>
</channel-group-type>
<channel-type id="request">
<item-type>String</item-type>
<label>String</label>
<description>Used for control of system</description>
<category>Energy</category>
<state readOnly="false"/>
</channel-type>
<channel-type id="request-extapiversion">
<item-type>String</item-type>
<label>Request-ExtapiVersion</label>
<description>Returns Extapi Version</description>
<category>Energy</category>
<state readOnly="true"/>
</channel-type>
</thing:thing-descriptions>

View File

@ -0,0 +1,449 @@
<?xml version="1.0" encoding="UTF-8"?>
<thing:thing-descriptions bindingId="ferroamp"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:thing="https://openhab.org/schemas/thing-description/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/thing-description/v1.0.0 https://openhab.org/schemas/thing-description-1.0.0.xsd">
<thing-type id="energyhub">
<label>Ferroamp EnergyHub</label>
<description>Represents the Ferroamp EnergyHub</description>
<category>Energy</category>
<channels>
<channel id="grid-frequency" typeId="frequency">
<label>Estimated Grid Frequency</label>
</channel>
<channel id="ace-current-l1" typeId="electric-current">
<label>ACE Current L1</label>
</channel>
<channel id="ace-current-l2" typeId="electric-current">
<label>ACE Current L2</label>
</channel>
<channel id="ace-current-l3" typeId="electric-current">
<label>ACE Current L3</label>
</channel>
<channel id="external-voltage-l1" typeId="electric-potential">
<label>External Voltage L1</label>
</channel>
<channel id="external-voltage-l2" typeId="electric-potential">
<label>External Voltage L2</label>
</channel>
<channel id="external-voltage-l3" typeId="electric-potential">
<label>External Voltage L3</label>
</channel>
<channel id="inverter-rms-current-l1" typeId="electric-current">
<label>Inverter RMS Current L1</label>
</channel>
<channel id="inverter-rms-current-l2" typeId="electric-current">
<label>Inverter RMS Current L2</label>
</channel>
<channel id="inverter-rms-current-l3" typeId="electric-current">
<label>Inverter RMS Current L3</label>
</channel>
<channel id="inverter-current-reactive-l1" typeId="electric-current">
<label>Inverter Reactive Current L1</label>
</channel>
<channel id="inverter-current-reactive-l2" typeId="electric-current">
<label>Inverter Reactive Current L2</label>
</channel>
<channel id="inverter-current-reactive-l3" typeId="electric-current">
<label>Inverter Reactive Current L3</label>
</channel>
<channel id="inverter-current-active-l1" typeId="electric-current">
<label>Inverter Active Current L1</label>
</channel>
<channel id="inverter-current-active-l2" typeId="electric-current">
<label>Inverter Active Current L2</label>
</channel>
<channel id="inverter-current-active-l3" typeId="electric-current">
<label>Inverter Active Current L3</label>
</channel>
<channel id="grid-current-l1" typeId="electric-current">
<label>Grid Current L1</label>
</channel>
<channel id="grid-current-l2" typeId="electric-current">
<label>Grid Current L2</label>
</channel>
<channel id="grid-current-l3" typeId="electric-current">
<label>Grid Current L3</label>
</channel>
<channel id="grid-current-reactive-l1" typeId="electric-current">
<label>Grid Reactive Current L1</label>
</channel>
<channel id="grid-current-reactive-l2" typeId="electric-current">
<label>Grid Reactive Current L2</label>
</channel>
<channel id="grid-current-reactive-l3" typeId="electric-current">
<label>Grid Reactive Current L3</label>
</channel>
<channel id="grid-current-active-l1" typeId="electric-current">
<label>Grid Current Active L1</label>
</channel>
<channel id="grid-current-active-l2" typeId="electric-current">
<label>Grid Current Active L2</label>
</channel>
<channel id="grid-current-active-l3" typeId="electric-current">
<label>Grid Current Active L3</label>
</channel>
<channel id="inverter-reactive-current-l1" typeId="electric-current">
<label>Inverter Reactive Current L1</label>
</channel>
<channel id="inverter-reactive-current-l2" typeId="electric-current">
<label>Inverter Reactive Current L2</label>
</channel>
<channel id="inverter-reactive-current-l3" typeId="electric-current">
<label>Inverter Reactive Current L3</label>
</channel>
<channel id="inverter-load-l1" typeId="electric-current">
<label>Inverter Load L1</label>
</channel>
<channel id="inverter-load-l2" typeId="electric-current">
<label>Inverter Load L2</label>
</channel>
<channel id="inverter-load-l3" typeId="electric-current">
<label>Inverter Load L3</label>
</channel>
<channel id="apparent-power" typeId="energy">
<label>Apparent Power</label>
</channel>
<channel id="grid-power-active-l1" typeId="power">
<label>Grid Power Active L1</label>
</channel>
<channel id="grid-power-active-l2" typeId="power">
<label>Grid Power Active L2</label>
</channel>
<channel id="grid-power-active-l3" typeId="power">
<label>Grid Power Active L3</label>
</channel>
<channel id="grid-power-reactive-l1" typeId="power">
<label>Grid Power Reactive L1</label>
</channel>
<channel id="grid-power-reactive-l2" typeId="power">
<label>Grid Power Reactive L2</label>
</channel>
<channel id="grid-power-reactive-l3" typeId="power">
<label>Grid Power Reactive L3</label>
</channel>
<channel id="inverter-power-active-l1" typeId="power">
<label>Inverter Power Active L1</label>
</channel>
<channel id="inverter-power-active-l2" typeId="power">
<label>Inverter Power Active L2</label>
</channel>
<channel id="inverter-power-active-l3" typeId="power">
<label>Inverter Power Active L3</label>
</channel>
<channel id="inverter-power-reactive-l1" typeId="power">
<label>Inverter Power Reactive L1</label>
</channel>
<channel id="inverter-power-reactive-l2" typeId="power">
<label>Inverter Power Reactive L2</label>
</channel>
<channel id="inverter-power-reactive-l3" typeId="power">
<label>Inverter Power Reactive L3</label>
</channel>
<channel id="consumption-power-l1" typeId="power">
<label>Consumption Power L1</label>
</channel>
<channel id="consumption-power-l2" typeId="power">
<label>Consumption Power L2</label>
</channel>
<channel id="consumption-power-l3" typeId="power">
<label>Consumption Power L3</label>
</channel>
<channel id="consumption-power-reactive-l1" typeId="power">
<label>Consumption Power Reactive L1</label>
</channel>
<channel id="consumption-power-reactive-l2" typeId="power">
<label>Consumption Power Reactive L2</label>
</channel>
<channel id="consumption-power-reactive-l3" typeId="power">
<label>Consumption Power Reactive L3</label>
</channel>
<channel id="solar-pv" typeId="power">
<label>Solar Power</label>
</channel>
<channel id="positive-dc-link-voltage" typeId="electric-potential">
<label>Positive DC Link Voltage</label>
</channel>
<channel id="negative-dc-link-voltage" typeId="electric-potential">
<label>Negative DC Link Voltage</label>
</channel>
<channel id="external-energy-produced-l1" typeId="energy">
<label>External Energy Produced L1</label>
</channel>
<channel id="external-energy-produced-l2" typeId="energy">
<label>External Energy Produced L2</label>
</channel>
<channel id="external-energy-produced-l3" typeId="energy">
<label>External Energy Produced L3</label>
</channel>
<channel id="external-energy-consumed-l1" typeId="energy">
<label>External Energy Consumed L1</label>
</channel>
<channel id="external-energy-consumed-l2" typeId="energy">
<label>External Energy Consumed L2</label>
</channel>
<channel id="external-energy-consumed-l3" typeId="energy">
<label>External Energy Consumed L3</label>
</channel>
<channel id="inverter-energy-produced-l1" typeId="energy">
<label>Inverter Energy Produced L1</label>
</channel>
<channel id="inverter-energy-produced-l2" typeId="energy">
<label>Inverter Energy Produced L2</label>
</channel>
<channel id="inverter-energy-produced-l3" typeId="energy">
<label>Inverter Energy Produced L3</label>
</channel>
<channel id="inverter-energy-consumed-l1" typeId="energy">
<label>Inverter Energy Consumed L1</label>
</channel>
<channel id="inverter-energy-consumed-l2" typeId="energy">
<label>Inverter Energy Consumed L2</label>
</channel>
<channel id="inverter-energy-consumed-l3" typeId="energy">
<label>Inverter Energy Consumed L3</label>
</channel>
<channel id="load-energy-produced-l1" typeId="energy">
<label>Load Energy Produced L1</label>
</channel>
<channel id="load-energy-produced-l2" typeId="energy">
<label>Load Energy Produced L2</label>
</channel>
<channel id="load-energy-produced-l3" typeId="energy">
<label>Load Energy Produced L3</label>
</channel>
<channel id="load-energy-consumed-l1" typeId="energy">
<label>Load Energy Consumed L1</label>
</channel>
<channel id="load-energy-consumed-l2" typeId="energy">
<label>Load Energy Consumed L2</label>
</channel>
<channel id="load-energy-consumed-l3" typeId="energy">
<label>Load Energy Consumed L3</label>
</channel>
<channel id="external-energy-produced-3p" typeId="energy">
<label>External Energy Produced 3p</label>
</channel>
<channel id="external-energy-consumed-3p" typeId="energy">
<label>External Energy Consumed 3p</label>
</channel>
<channel id="inverter-energy-produced-3p" typeId="energy">
<label>Inverter Energy Produced 3p</label>
</channel>
<channel id="inverter-energy-consumed-3p" typeId="energy">
<label>Inverter Energy Consumed 3p</label>
</channel>
<channel id="load-energy-produced-3p" typeId="energy">
<label>Load Energy Produced 3p</label>
</channel>
<channel id="load-energy-consumed-3p" typeId="energy">
<label>Load Energy Consumed 3p</label>
</channel>
<channel id="total-solar-energy" typeId="power">
<label>Total Solar Energy</label>
</channel>
<channel id="state" typeId="string">
<label>State of the System</label>
</channel>
<channel id="timestamp" typeId="date-time">
<label>Time Stamp When Message was Published</label>
</channel>
<channel id="battery-energy-produced" typeId="energy">
<label>Battery Energy Produced</label>
</channel>
<channel id="battery-energy-consumed" typeId="energy">
<label>Battery Energy Consumed</label>
</channel>
<channel id="soc" typeId="dimensionless">
<label>System State of Charge</label>
</channel>
<channel id="soh" typeId="dimensionless">
<label>System State of Health</label>
</channel>
<channel id="power-battery" typeId="power">
<label>Battery Power</label>
</channel>
<channel id="total-rated-capacity-all-batteries" typeId="energy">
<label>Total Rated Capacity of All Batteries</label>
</channel>
<channel id="s0-id" typeId="string">
<label>S0 ID</label>
</channel>
<channel id="s0-measured-voltage-pv-string" typeId="electric-potential">
<label>S0 Measured Voltage on PV String Side</label>
</channel>
<channel id="s0-measured-current-pv-string" typeId="electric-current">
<label>S0 Measured Current on PV String Side</label>
</channel>
<channel id="s0-total-solar-energy" typeId="energy">
<label>S0 Total Solar Energy</label>
</channel>
<channel id="s0-relay-status" typeId="string">
<label>S0 RelayStatus</label>
</channel>
<channel id="s0-temperature" typeId="temperature">
<label>S0 Temperature Measured on PCB</label>
</channel>
<channel id="s0-fault-code" typeId="string">
<label>S0 FaultCode</label>
</channel>
<channel id="s0-dc-link-voltage" typeId="electric-potential">
<label>S0 DC Link Voltage</label>
</channel>
<channel id="s0-timestamp" typeId="date-time">
<label>S0 Time Stamp When Message was Published</label>
</channel>
<channel id="s1-id" typeId="string">
<label>S1 ID</label>
</channel>
<channel id="s1-measured-voltage-pv-string" typeId="electric-potential">
<label>S1 Measured Voltage on PV String Side</label>
</channel>
<channel id="s1-measured-current-pv-string" typeId="electric-current">
<label>S1 Measured Current on PV String Side</label>
</channel>
<channel id="s1-total-solar-energy" typeId="energy">
<label>S1 Total Solar Energy</label>
</channel>
<channel id="s1-relay-status" typeId="string">
<label>S1 RelayStatus</label>
</channel>
<channel id="s1-temperature" typeId="temperature">
<label>S1 Temperature Measured on PCB</label>
</channel>
<channel id="s1-fault-code" typeId="string">
<label>S1 FaultCode</label>
</channel>
<channel id="s1-dc-link-voltage" typeId="electric-potential">
<label>S1 DC Link Voltage</label>
</channel>
<channel id="s1-timestamp" typeId="date-time">
<label>S1 Time Stamp When Message was Published</label>
</channel>
<channel id="s2-id" typeId="string">
<label>S2 ID</label>
</channel>
<channel id="s2-measured-voltage-pv-string" typeId="electric-potential">
<label>S2 Measured Voltage on PV String Side</label>
</channel>
<channel id="s2-measured-current-pv-string" typeId="electric-current">
<label>S2 Measured Current on PV String Side</label>
</channel>
<channel id="s2-total-solar-energy" typeId="energy">
<label>S2 Total Solar Energy</label>
</channel>
<channel id="s2-relay-status" typeId="string">
<label>S2 RelayStatus</label>
</channel>
<channel id="s2-temperature" typeId="temperature">
<label>S2 Temperature Measured on PCB</label>
</channel>
<channel id="s2-fault-code" typeId="string">
<label>S2 FaultCode</label>
</channel>
<channel id="s2-dc-link-voltage" typeId="electric-potential">
<label>S2 DC Link Voltage</label>
</channel>
<channel id="s2-timestamp" typeId="date-time">
<label>S2 Time Stamp When Message was Published</label>
</channel>
<channel id="s3-id" typeId="string">
<label>S3 ID</label>
</channel>
<channel id="s3-measured-voltage-pv-string" typeId="electric-potential">
<label>S3 Measured Voltage on PV String Side</label>
</channel>
<channel id="s3-measured-current-pv-string" typeId="electric-current">
<label>S3 Measured Current on PV String Side</label>
</channel>
<channel id="s3-total-solar-energy" typeId="energy">
<label>S3 Total Solar Energy</label>
</channel>
<channel id="s3-relay-status" typeId="string">
<label>S3 RelayStatus</label>
</channel>
<channel id="s3-temperature" typeId="temperature">
<label>S3 Temperature Measured on PCB</label>
</channel>
<channel id="s3-fault-code" typeId="string">
<label>S3 FaultCode</label>
</channel>
<channel id="s3-dc-link-voltage" typeId="electric-potential">
<label>S3 DC Link Voltage</label>
</channel>
<channel id="s3-timestamp" typeId="date-time">
<label>S3 Time Stamp When Message was Published</label>
</channel>
<channel id="eso-unique-identifier" typeId="string">
<label>Eso Unique Identifier</label>
</channel>
<channel id="measured-voltage-battery" typeId="electric-potential">
<label>Eso Voltage Measured on Battery Side</label>
</channel>
<channel id="measured-current-battery" typeId="electric-current">
<label>Eso Current Measured on Battery Side</label>
</channel>
<channel id="eso-battery-energy-produced" typeId="energy">
<label>Eso Battery Energy Produced</label>
</channel>
<channel id="eso-battery-energy-consumed" typeId="energy">
<label>Eso Battery Energy Consumed</label>
</channel>
<channel id="eso-soc" typeId="dimensionless">
<label>Eso State of Charge</label>
</channel>
<channel id="eso-relay-status" typeId="string">
<label>Eso RelayStatus</label>
</channel>
<channel id="eso-temperature" typeId="temperature">
<label>ESO Temperature Measured on PCB</label>
</channel>
<channel id="eso-fault-code" typeId="string">
<label>Eso FaultCode</label>
</channel>
<channel id="eso-dc-link-voltage" typeId="electric-potential">
<label>Eso DC Link Voltage</label>
</channel>
<channel id="eso-timestamp" typeId="date-time">
<label>Eso Time Stamp When Message was Published</label>
</channel>
<channel id="esm-unique-identifier" typeId="string">
<label>Esm Unique Identifier</label>
</channel>
<channel id="esm-soh" typeId="dimensionless">
<label>Esm System State of Health</label>
</channel>
<channel id="esm-soc" typeId="dimensionless">
<label>Esm System State of Charge</label>
</channel>
<channel id="esm-total-rated-capacity-all-batteries" typeId="energy">
<label>Esm Rated Capacity</label>
</channel>
<channel id="esm-rated-power-battery" typeId="power">
<label>Esm Rated Power of Battery</label>
</channel>
<channel id="esm-status" typeId="string">
<label>Esm Status</label>
</channel>
<channel id="esm-timestamp" typeId="date-time">
<label>Esm Time Stamp When Message was Published</label>
</channel>
<channel id="request-charge" typeId="request">
<label>RequestCharge</label>
</channel>
<channel id="request-discharge" typeId="request">
<label>RequestDischarge</label>
</channel>
<channel id="request-auto" typeId="request">
<label>RequestAuto</label>
</channel>
<channel id="request-extapi-version" typeId="request-extapiversion">
<label>RequestExtapiVersion</label>
</channel>
</channels>
<properties>
<property name="vendor">Ferroamp</property>
</properties>
<config-description-ref uri="thing-type:ferroamp:energyhub"/>
</thing-type>
</thing:thing-descriptions>

View File

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<thing:thing-descriptions bindingId="ferroamp"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:thing="https://openhab.org/schemas/thing-description/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/thing-description/v1.0.0 https://openhab.org/schemas/thing-description-1.0.0.xsd">
<thing-type id="energyhub">
<label>Ferroamp Binding Thing</label>
<description>Thing for Ferroamp Binding</description>
<config-description>
<parameter name="hostName" type="text" required="true">
<context>network-address</context>
<label>Hostname</label>
<description>Hostname or IP address of the device</description>
</parameter>
<parameter name="userName" type="text" required="true">
<context>username</context>
<label>Username</label>
<description>Username to access the device</description>
</parameter>
<parameter name="password" type="text" required="true">
<context>password</context>
<label>Password</label>
<description>Password to access the device</description>
</parameter>
<parameter name="hasBattery" type="boolean" required="false">
<label>Battery Capable</label>
<description>Ehub type, with/without battery</description>
<default>false</default>
</parameter>
<parameter name="ssoS0" type="boolean" required="false">
<label>SSO String S0 Available</label>
<description>First SSO Unit Available </description>
</parameter>
<parameter name="ssoS1" type="boolean" required="false">
<label>SSO String S1 Available</label>
<description>Second SSO Unit Available</description>
</parameter>
<parameter name="ssoS2" type="boolean" required="false">
<label>SSO String S2 Available</label>
<description>Third SSO Unit Available</description>
</parameter>
<parameter name="ssoS3" type="boolean" required="false">
<label>SSO String S3 Available</label>
<description>Fourth SSO Unit Available</description>
</parameter>
<parameter name="eso" type="boolean" required="false">
<label>ESO Module Available</label>
<description>ESO Module Available</description>
</parameter>
<parameter name="esm" type="boolean" required="false">
<label>ESM Module Available</label>
<description>ESM Module Available</description>
</parameter>
</config-description>
</thing-type>
</thing:thing-descriptions>

View File

@ -1,21 +1,14 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>org.openhab.addons</groupId> <groupId>org.openhab.addons</groupId>
<artifactId>org.openhab.addons.reactor</artifactId> <artifactId>org.openhab.addons.reactor</artifactId>
<version>4.3.0-SNAPSHOT</version> <version>4.3.0-SNAPSHOT</version>
</parent> </parent>
<groupId>org.openhab.addons.bundles</groupId> <groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.addons.reactor.bundles</artifactId> <artifactId>org.openhab.addons.reactor.bundles</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>openHAB Add-ons :: Bundles</name> <name>openHAB Add-ons :: Bundles</name>
<modules> <modules>
<!-- automation --> <!-- automation -->
<module>org.openhab.automation.groovyscripting</module> <module>org.openhab.automation.groovyscripting</module>
@ -147,6 +140,7 @@
<module>org.openhab.binding.feed</module> <module>org.openhab.binding.feed</module>
<module>org.openhab.binding.feican</module> <module>org.openhab.binding.feican</module>
<module>org.openhab.binding.fenecon</module> <module>org.openhab.binding.fenecon</module>
<module>org.openhab.binding.ferroamp</module>
<module>org.openhab.binding.fineoffsetweatherstation</module> <module>org.openhab.binding.fineoffsetweatherstation</module>
<module>org.openhab.binding.flicbutton</module> <module>org.openhab.binding.flicbutton</module>
<module>org.openhab.binding.flume</module> <module>org.openhab.binding.flume</module>
@ -484,12 +478,10 @@
<module>org.openhab.voice.watsonstt</module> <module>org.openhab.voice.watsonstt</module>
<module>org.openhab.voice.whisperstt</module> <module>org.openhab.voice.whisperstt</module>
</modules> </modules>
<properties> <properties>
<m2e.jdt.annotationpath>target/dependency</m2e.jdt.annotationpath> <m2e.jdt.annotationpath>target/dependency</m2e.jdt.annotationpath>
<dep.noembedding/> <dep.noembedding/>
</properties> </properties>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.lastnpe.eea</groupId> <groupId>org.lastnpe.eea</groupId>
@ -545,7 +537,6 @@
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
<pluginManagement> <pluginManagement>
<plugins> <plugins>
@ -615,7 +606,6 @@
</plugin> </plugin>
</plugins> </plugins>
</pluginManagement> </pluginManagement>
<plugins> <plugins>
<plugin> <plugin>
<groupId>biz.aQute.bnd</groupId> <groupId>biz.aQute.bnd</groupId>
@ -681,7 +671,6 @@
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
<profiles> <profiles>
<!-- suppress embedding of dependencies --> <!-- suppress embedding of dependencies -->
<profile> <profile>
@ -707,5 +696,4 @@
</build> </build>
</profile> </profile>
</profiles> </profiles>
</project> </project>