This commit is contained in:
basse04 2025-01-08 20:33:57 +01:00 committed by GitHub
commit 0f2d30ba3c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
27 changed files with 3546 additions and 14 deletions

View File

@ -117,6 +117,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.flume/ @jsjames /bundles/org.openhab.binding.flume/ @jsjames

View File

@ -571,6 +571,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,240 @@
# 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 connects to your local EnergyHub via LAN.
Data and commands are received/sent using MQTT where the user connects to the MQTT broker residing on the EnergyHub.
The communication with the broker might take some minute to establish, so Please just be patient. The Thing will be
in state INITIALIZATION and UNKNOWN during this time and then change to state ONLINE once connection is established.
*note* Contact Ferroamp support to enable MQTT in the EnergyHub and to get the Username and Password:
<https://ferroamp.com/om-ferroamp/>
Every Sso has a unique serial number which is marked on the side of the SSO unit. Ex. PS00990-A04-S20120476.
This number is to identify the respective Sso Pv-string.
## 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 | Has the system a battery connected? | N/A | no | yes |
## Channels
| Channel Type ID | Item Type | Read/Write | Label | Description |
|--------------------------------------------------------------------|------------|------------------------------------------|------------------------------------------------------------------------------------------------------|
| grid-frequency | Number:Frequency | R | Grid Frequency | Grid frequency |
| ace-current-l1 | Number:ElectricCurrent | R | ACE Current L1 | Adaptive Current Equalization (ACE) equalization current set-points in Amps root mean square (Arms) |
| ace-current-l2 | Number:ElectricCurrent | R | ACE Current L2 | Adaptive Current Equalization (ACE) equalization current set-points in Amps root mean square (Arms) |
| ace-current-l3 | Number:ElectricCurrent | R | ACE Current L3 | Adaptive Current Equalization (ACE) equalization current set-points in Amps root mean square (Arms) |
| grid-voltage-l1 | Number:ElectricPotential | R | Grid Voltage L1 | Grid voltage |
| grid-voltage-l2 | Number:ElectricPotential | R | Grid Voltage L2 | Grid voltage |
| grid-voltage-l3 | Number:ElectricPotential | R | Grid Voltage L3 | Grid 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-reactive-current-l1 | Number:ElectricCurrent | R | Inverter Reactive Current L1 | Inverter reactive current |
| inverter-reactive-current-l2 | Number:ElectricCurrent | R | Inverter Reactive Current L2 | Inverter reactive current |
| inverter-reactive-current-l3 | Number:ElectricCurrent | R | Inverter Reactive Current L3 | Inverter reactive current |
| inverter-active-current-l1 | Number:ElectricCurrent | R | Inverter Active current L1 | Inverter active current |
| inverter-active-current-l2 | Number:ElectricCurrent | R | Inverter Active current L2 | Inverter active current |
| inverter-active-current-l3 | Number:ElectricCurrent | R | Inverter Active current L3 | Inverter active current |
| grid-current-l1 | Number:ElectricCurrent | R | Grid Current L1 | Grid RMS current |
| grid-current-l2 | Number:ElectricCurrent | R | Grid Current L2 | Grid RMS current |
| grid-current-l3 | Number:ElectricCurrent | R | Grid Current L3 | Grid RMS current |
| grid-reactive-current-l1 | Number:ElectricCurrent | R | Grid Reactive Current L1 | Grid reactive current |
| grid-reactive-current-l2 | Number:ElectricCurrent | R | Grid Reactive Current L2 | Grid reactive current |
| grid-reactive-current-l3 | Number:ElectricCurrent | R | Grid Reactive Current L3 | Grid reactive current |
| grid-active-current-l1 | Number:ElectricCurrent | R | Grid Active Current L1 | Grid active current |
| grid-active-current-l2 | Number:ElectricCurrent | R | Grid Active Current L2 | Grid active current |
| grid-active-current-l3 | Number:ElectricCurrent | R | Grid Active Current L3 | Grid active current |
| inverter-load-reactive-current-l1 | Number:ElectricCurrent | R | Inverter Load Reactive Current L1 | |
| inverter-load-reactive-current-l2 | Number:ElectricCurrent | R | Inverter Load Reactive Current L2 | |
| inverter-load-reactive-current-l3 | Number:ElectricCurrent | R | Inverter Load Reactive Current L3 | |
| inverter-load-active-current-l1 | Number:ElectricCurrent | R | Inverter Load Active Current L1 | |
| inverter-load-active-current-l2 | Number:ElectricCurrent | R | Inverter Load Active Current L2 | |
| inverter-load-active-current-l3 | Number:ElectricCurrent | R | Inverter Load Active Current L3 | |
| apparent-power | Number:Power | R | Apparent Power | Apparent power |
| grid-power-active-l1 | Number:Power | R | Grid Power Active L1 | Grid power, active |
| grid-power-active-l2 | Number:Power | R | Grid Power Active L2 | Grid power, active |
| grid-power-active-l3 | Number:Power | R | Grid Power Active L3 | Grid power, active |
| grid-power-reactive-l1 | Number:Power | R | Grid Power Reactive L1 | Grid power, reactive |
| grid-power-reactive-l2 | Number:Power | R | Grid Power Reactive L2 | Grid power, reactive |
| grid-power-reactive-l3 | Number:Power | R | Grid Power Reactive L3 | 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 |
| grid-energy-produced-l1 | Number:Energy | R | Grid Energy Produced L1 | |
| grid-energy-produced-l2 | Number:Energy | R | Grid Energy Produced L2 | |
| grid-energy-produced-l3 | Number:Energy | R | Grid Energy Produced L3 | |
| grid-energy-consumed-l1 | Number:Energy | R | Grid Energy Consumed L1 | |
| grid-energy-consumed-l2 | Number:Energy | R | Grid Energy Consumed L2 | |
| grid-energy-consumed-l3 | Number:Energy | R | Grid 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:Energy | R | Inverter Energy Consumed L1 | |
| inverter-energy-consumed-l2 | Number:Energy | R | Inverter Energy Consumed L2 | |
| inverter-energy-consumed-l3 | Number:Energy | 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 | |
| grid-energy-produced-total | Number:Energy | R | Grid Energy Produced Total | |
| grid-energy-consumed-total | Number:Energy | R | Grid Energy Consumed Total | |
| inverter-energy-produced-total | Number:Energy | R | Inverter Energy Produced Total | |
| inverter-energy-consumed-total | Number:Energy | R | Inverter Energy Consumed Total | |
| load-energy-produced-total | Number:Energy | R | Load Energy Produced Total | |
| load-energy-consumed-total | Number:Energy | R | Load Energy Consumed Total | |
| 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 | 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-capacity-batteries | Number:Energy | R | Total Capacity Batteries | Total rated capacity of all batteries |
| s1-id | String | R | S1 ID | Unique identifier of SSO-1 |
| s1-pv-voltage | Number:ElectricPotential | R | S1 Voltage on PV String Side | Measured on PV string side |
| s1-pv-current | Number:ElectricCurrent | R | S1 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 | Contact | R | S1 Relay Status | 0 = relay closed (i.e running power), 1 = relay open/disconnected, 2 = precharge |
| s1-temperature | Number:Temperature | R | S1 Temperature 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 | Time stamp when message was published |
| s2-id | String | R | S2 ID | Unique identifier of SSO-2 |
| s2-pv-voltage | Number:ElectricPotential | R | S2 Voltage on PV String Side | Measured on PV string side |
| s2-pv-current | Number:ElectricCurrent | R | S2 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 | Contact | R | S2 Relay Status | 0 = relay closed (i.e running power), 1 = relay open/disconnected, 2 = precharge |
| s2-temperature | Number:Temperature | R | S2 Temperature 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 | Time stamp when message was published |
| s3-id | String | R | S3 ID | Unique identifier of SSO-3 |
| s3-pv-voltage | Number:ElectricPotential | R | S3 Voltage on PV String Side | Measured on PV string side |
| s3-pv-current | Number:ElectricCurrent | R | S3 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 | Contact | R | S3 Relay Status | 0 = relay closed (i.e running power), 1 = relay open/disconnected, 2 = precharge |
| s3-temperature | Number:Temperature | R | S3 Temperature 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 | Time stamp when message was published |
| s4-id | String | R | S4 ID | Unique identifier of SSO-4 |
| s4-pv-voltage | Number:ElectricPotential | R | S4 Voltage on PV String Side | Measured on PV string side |
| s4-pv-current | Number:ElectricCurrent | R | S4 Current on PV String Side | Measured on PV string side |
| s4-total-solar-energy | Number:Energy | R | S4 Total Solar Energy | Total energy produced by SSO-4 |
| s4-relay-status | Contact | R | S4 Relay Status | 0 = relay closed (i.e running power), 1 = relay open/disconnected, 2 = precharge |
| s4-temperature | Number:Temperature | R | S4 Temperature on PCB | Temperature Measured on PCB |
| s4-fault-code | String | R | S4 FaultCode | 0x00 = OK. For all other values Please contact Ferroamp support |
| s4-dc-link-voltage | Number:ElectricPotential | R | S4 DC Link Voltage | DC link voltage as measured by SSO-4 |
| s4-timestamp | DateTime | R | S4 Time Stamp | Time stamp when message was published |
| eso-id | String | R | Eso Unique Identifier | Unique identifier of ESO |
| eso-voltage-battery | Number:ElectricPotential | R | Eso Voltage on Battery Side | Measured on battery side |
| eso-current-battery | Number:ElectricCurrent | R | Eso Current 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 | Contact | R | Eso Relay Status | 0 = relay closed, 1 = relay open |
| eso-temperature | Number:Temperature | R | Eso Temperature 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 | Time stamp when message was published |
| esm-id | 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-capacity | Number:Energy | R | Esm Rated Capacity | Rated capacity of all batteries |
| esm-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 | 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
## `demo.things` Example
```java
Thing ferroamp:energyhub:myenergyhub [ hostName="energyhub-ip", userName="myUserName", password="myPassword", hasBattery=false ]
```
```java
Thing ferroamp:energyhub:myenergyhub [ hostName="energyhub-ip", userName="myUserName", password="myPassword", hasBattery=true, eso=true ]
```
## `demo.items` Example
```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. Rule name: Set Charge Level.
Set charging level to 5000W when item RequestCharge is updated.
```yaml
configuration: {}
triggers:
- id: "1"
configuration:
itemName: EnergyHub_RequestCharge
type: core.ItemStateUpdateTrigger
conditions: []
actions:
- id: "2"
configuration:
itemName: EnergyHub_RequestCharge
command: "5000"
type: core.ItemCommandAction
```

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>5.0.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,13 @@
<?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 EhubParameters1} 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", "grid-energy-produced-l1",
"grid-energy-produced-l2", "grid-energy-produced-l3", "grid-energy-consumed-l1",
"grid-energy-consumed-l2", "grid-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", "grid-energy-produced-total",
"grid-energy-consumed-total", "inverter-energy-produced-total", "inverter-energy-consumed-total",
"load-energy-produced-3p", "load-energy-consumed-3p", "total-solar-energy", "state", "timestamp",
"battery-energy-produced", "battery-energy-consumed", "soc", "soh", "power-battery",
"total-capacity-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 EhubParameters1} 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-id", "esm-soh", "esm-soc", "esm-total-capacity",
"esm-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 EhubParameters1} 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-id", "eso-voltage-battery", "eso-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,207 @@
/**
* 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_GRIDVOLTAGEL1 = "grid-voltage-l1";
public static final String CHANNEL_GRIDVOLTAGEL2 = "grid-voltage-l2";
public static final String CHANNEL_GRIDVOLTAGEL3 = "grid-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_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_INVERTERACTIVECURRENTL1 = "inverter-active-current-l1";
public static final String CHANNEL_INVERTERACTIVECURRENTL2 = "inverter-active-current-l2";
public static final String CHANNEL_INVERTERACTIVECURRENTL3 = "inverter-active-current-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_GRIDREACTIVECURRENTL1 = "grid-reactive-current-l1";
public static final String CHANNEL_GRIDREACTIVECURRENTL2 = "grid-reactive-current-l2";
public static final String CHANNEL_GRIDREACTIVECURRENTL3 = "grid-reactive-current-l3";
public static final String CHANNEL_GRIDACTIVECURRENTL1 = "grid-active-current-l1";
public static final String CHANNEL_GRIDACTIVECURRENTL2 = "grid-active-current-l2";
public static final String CHANNEL_GRIDACTIVECURRENTL3 = "grid-active-current-l3";
public static final String CHANNEL_INVERTERLOADREACTIVECURRENTL1 = "inverter-load-reactive-current-l1";
public static final String CHANNEL_INVERTERLOADREACTIVECURRENTL2 = "inverter-load-reactive-current-l2";
public static final String CHANNEL_INVERTERLOADREACTIVECURRENTL3 = "inverter-load-reactive-current-l3";
public static final String CHANNEL_INVERTERLOADACTIVECURRENTL1 = "inverter-load-active-current-l1";
public static final String CHANNEL_INVERTERLOADACTIVECURRENTL2 = "inverter-load-active-current-l2";
public static final String CHANNEL_INVERTERLOADACTIVECURRENTL3 = "inverter-load-active-current-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_GRIDENERGYPRODUCEDL1 = "grid-energy-produced-l1";
public static final String CHANNEL_GRIDENERGYPRODUCEDL2 = "grid-energy-produced-l2";
public static final String CHANNEL_GRIDENERGYPRODUCEDL3 = "grid-energy-produced-l3";
public static final String CHANNEL_GRIDENERGYCONSUMEDL1 = "grid-energy-consumed-l1";
public static final String CHANNEL_GRIDENERGYCONSUMEDL2 = "grid-energy-consumed-l2";
public static final String CHANNEL_GRIDENERGYCONSUMEDL3 = "grid-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_GRIDENERGYPRODUCEDTOTAL = "grid-energy-produced-total";
public static final String CHANNEL_GRIDENERGYCONSUMEDTOTAL = "grid-energy-consumed-total";
public static final String CHANNEL_INVERTERENERGYPRODUCEDTOTAL = "inverter-energy-produced-total";
public static final String CHANNEL_INVERTERENERGYCONSUMEDTOTAL = "inverter-energy-consumed-total";
public static final String CHANNEL_LOADENERGYPRODUCEDTOTAL = "load-energy-produced-total";
public static final String CHANNEL_LOADENERGYCONSUMEDTOTAL = "load-energy-consumed-total";
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_TOTALCAPACITYBATTERIES = "total-capacity-batteries";
// List of SSO Channel ids
public static final String CHANNEL_S1ID = "s1-id";
public static final String CHANNEL_S1PVVOLTAGE = "s1-pv-voltage";
public static final String CHANNEL_S1PVCURRENT = "s1-pv-current";
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_S2PVVOLTAGE = "s2-pv-voltage";
public static final String CHANNEL_S2PVCURRENT = "s2-pv-current";
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_S3PVVOLTAGE = "s3-pv-voltage";
public static final String CHANNEL_S3PVCURRENT = "s3-pv-current";
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";
public static final String CHANNEL_S4ID = "s4-id";
public static final String CHANNEL_S4PVVOLTAGE = "s4-pv-voltage";
public static final String CHANNEL_S4PVCURRENT = "s4-pv-current";
public static final String CHANNEL_S4TOTALSOLARENERGY = "s4-total-solar-energy";
public static final String CHANNEL_S4RELAYSTATUS = "s4-relay-status";
public static final String CHANNEL_S4TEMPERATURE = "s4-temperature";
public static final String CHANNEL_S4FAULTCODE = "s4-fault-code";
public static final String CHANNEL_S4DCLINKVOLTAGE = "s4-dc-link-voltage";
public static final String CHANNEL_S4TIMESTAMP = "s4-timestamp";
// List of ESO Channel ids
public static final String CHANNEL_ESOID = "eso-id";
public static final String CHANNEL_ESOVOLTAGEBATTERY = "eso-voltage-battery";
public static final String CHANNEL_ESOCURRENTBATTERY = "eso-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_ESMID = "esm-id";
public static final String CHANNEL_ESMSOH = "esm-soh";
public static final String CHANNEL_ESMSOC = "esm-soc";
public static final String CHANNEL_ESMTOTALCAPACITY = "esm-total-capacity";
public static final String CHANNEL_ESMPOWERBATTERY = "esm-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 Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Set.of(THING_TYPE_ENERGYHUB);
}

View File

@ -0,0 +1,365 @@
/**
* 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_GRIDVOLTAGEL1, Units.VOLT));
channelConfigurationEhub
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_GRIDVOLTAGEL2, Units.VOLT));
channelConfigurationEhub
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_GRIDVOLTAGEL3, 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_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_INVERTERACTIVECURRENTL1, Units.AMPERE));
channelConfigurationEhub.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_INVERTERACTIVECURRENTL2, Units.AMPERE));
channelConfigurationEhub.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_INVERTERACTIVECURRENTL3, 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_GRIDREACTIVECURRENTL1, Units.AMPERE));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_GRIDREACTIVECURRENTL2, Units.AMPERE));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_GRIDREACTIVECURRENTL3, Units.AMPERE));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_GRIDACTIVECURRENTL1, Units.AMPERE));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_GRIDACTIVECURRENTL2, Units.AMPERE));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_GRIDACTIVECURRENTL3, Units.AMPERE));
channelConfigurationEhub.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_INVERTERLOADREACTIVECURRENTL1, Units.AMPERE));
channelConfigurationEhub.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_INVERTERLOADREACTIVECURRENTL2, Units.AMPERE));
channelConfigurationEhub.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_INVERTERLOADREACTIVECURRENTL3, Units.AMPERE));
channelConfigurationEhub.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_INVERTERLOADACTIVECURRENTL1, Units.AMPERE));
channelConfigurationEhub.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_INVERTERLOADACTIVECURRENTL2, Units.AMPERE));
channelConfigurationEhub.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_INVERTERLOADACTIVECURRENTL3, Units.AMPERE));
channelConfigurationEhub
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_APPARENTPOWER, Units.WATT));
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_GRIDENERGYPRODUCEDL1, Units.WATT));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_GRIDENERGYPRODUCEDL2, Units.WATT));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_GRIDENERGYPRODUCEDL3, Units.WATT));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_GRIDENERGYCONSUMEDL1, Units.WATT));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_GRIDENERGYCONSUMEDL2, Units.WATT));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_GRIDENERGYCONSUMEDL3, 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_GRIDENERGYPRODUCEDTOTAL, Units.WATT));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_GRIDENERGYCONSUMEDTOTAL, Units.WATT));
channelConfigurationEhub.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_INVERTERENERGYPRODUCEDTOTAL, Units.WATT));
channelConfigurationEhub.add(new FerroampChannelConfiguration(
FerroampBindingConstants.CHANNEL_INVERTERENERGYCONSUMEDTOTAL, Units.WATT));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_LOADENERGYPRODUCEDTOTAL, Units.WATT));
channelConfigurationEhub.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_LOADENERGYCONSUMEDTOTAL, 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_TOTALCAPACITYBATTERIES, Units.WATT_HOUR));
return channelConfigurationEhub;
}
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_S1PVVOLTAGE, Units.VOLT));
channelConfigurationSsoS1
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_S1PVCURRENT, 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_S2PVVOLTAGE, Units.VOLT));
channelConfigurationSsoS2
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_S2PVCURRENT, 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_S3PVVOLTAGE, Units.VOLT));
channelConfigurationSsoS3
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_S3PVCURRENT, 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> getChannelConfigurationSsoS4() {
final List<FerroampChannelConfiguration> channelConfigurationSsoS4 = new ArrayList<>();
channelConfigurationSsoS4
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_S4ID, Units.ONE));
channelConfigurationSsoS4
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_S4PVVOLTAGE, Units.VOLT));
channelConfigurationSsoS4
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_S4PVCURRENT, Units.AMPERE));
channelConfigurationSsoS4
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_S4TOTALSOLARENERGY, Units.WATT));
channelConfigurationSsoS4
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_S4RELAYSTATUS, Units.ONE));
channelConfigurationSsoS4
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_S4TEMPERATURE, Units.ONE));
channelConfigurationSsoS4
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_S4FAULTCODE, Units.ONE));
channelConfigurationSsoS4
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_S4DCLINKVOLTAGE, Units.VOLT));
channelConfigurationSsoS4
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_S4TIMESTAMP, Units.ONE));
return channelConfigurationSsoS4;
}
public static List<FerroampChannelConfiguration> getChannelConfigurationEso() {
final List<FerroampChannelConfiguration> channelConfigurationEso = new ArrayList<>();
channelConfigurationEso
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_ESOID, Units.ONE));
channelConfigurationEso
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_ESOVOLTAGEBATTERY, Units.VOLT));
channelConfigurationEso.add(
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_ESOCURRENTBATTERY, 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_ESMID, 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_ESMTOTALCAPACITY, Units.WATT_HOUR));
channelConfigurationEsm
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_ESMPOWERBATTERY, 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));
return channelConfigurationRequest;
}
}

View File

@ -0,0 +1,30 @@
/**
* 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 = false;
}

View File

@ -0,0 +1,251 @@
/**
* 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.Objects;
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 @Nullable static MqttBrokerConnection ferroampConnection;
FerroampMqttCommunication ferroampMqttCommunication = new FerroampMqttCommunication(thing);
FerroampConfiguration ferroampConfig = new FerroampConfiguration();
private static List<FerroampChannelConfiguration> channelConfigEhub = 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> channelConfigSsoS4 = new ArrayList<>();
private static List<FerroampChannelConfiguration> channelConfigEso = new ArrayList<>();
private static List<FerroampChannelConfiguration> channelConfigEsm = new ArrayList<>();
long refreshInterval = 30;
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 + "\"}}";
FerroampMqttCommunication.sendPublishedTopic(requestCmdJsonCharge, ferroampConfig);
}
if (FerroampBindingConstants.CHANNEL_REQUESTDISCHARGE.equals(channelUID.getId())) {
String requestCmdJsonDisCharge = "{\"" + "transId" + "\":\"" + transId
+ "\",\"cmd\":{\"name\":\"discharge\",\"arg\":\"" + valueConfiguration + "\"}}";
FerroampMqttCommunication.sendPublishedTopic(requestCmdJsonDisCharge, ferroampConfig);
}
if (FerroampBindingConstants.CHANNEL_AUTO.equals(channelUID.getId())) {
String requestCmdJsonAuto = "{\"" + "transId" + "\":\"" + transId + "\",\"cmd\":{\"name\":\"auto\"}}";
FerroampMqttCommunication.sendPublishedTopic(requestCmdJsonAuto, ferroampConfig);
}
}
@Override
public void initialize() {
// Set configuration parameters
ferroampConfig = getConfigAs(FerroampConfiguration.class);
// Set channel configuration parameters
channelConfigEhub = FerroampChannelConfiguration.getChannelConfigurationEhub();
channelConfigSsoS1 = FerroampChannelConfiguration.getChannelConfigurationSsoS1();
channelConfigSsoS2 = FerroampChannelConfiguration.getChannelConfigurationSsoS2();
channelConfigSsoS3 = FerroampChannelConfiguration.getChannelConfigurationSsoS3();
channelConfigSsoS4 = FerroampChannelConfiguration.getChannelConfigurationSsoS4();
channelConfigEso = FerroampChannelConfiguration.getChannelConfigurationEso();
channelConfigEsm = FerroampChannelConfiguration.getChannelConfigurationEsm();
FerroampConfiguration ferroampConfig = getConfigAs(FerroampConfiguration.class);
final MqttBrokerConnection ferroampConnection = new MqttBrokerConnection(ferroampConfig.hostName,
FerroampBindingConstants.BROKER_PORT, false, false, ferroampConfig.userName);
scheduler.scheduleWithFixedDelay(this::pollTask, 60, refreshInterval, TimeUnit.SECONDS);
this.setFerroampConnection(ferroampConnection);
updateStatus(ThingStatus.UNKNOWN);
}
private void pollTask() {
try {
startMqttConnection(getConfigAs(FerroampConfiguration.class));
} catch (InterruptedException e) {
logger.debug("Not connected to the MqttBroker");
return;
}
MqttBrokerConnection ferroampConnection = FerroampHandler.ferroampConnection;
if (ferroampConnection == null || ferroampConnection.connectionState().toString().equals("DISCONNECTED")) {
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR);
logger.debug("Problem connection to MqttBroker");
} else if (ferroampConnection.connectionState().toString().equals("CONNECTED")) {
updateStatus(ThingStatus.ONLINE);
try {
channelUpdate();
} catch (RuntimeException scheduleWithFixedDelayException) {
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR,
scheduleWithFixedDelayException.getClass().getName() + ":"
+ scheduleWithFixedDelayException.getMessage());
}
}
}
private void startMqttConnection(FerroampConfiguration ferroampConfig) throws InterruptedException {
MqttBrokerConnection localSubscribeConnection = FerroampHandler.getFerroampConnection();
Objects.requireNonNull(localSubscribeConnection,
"MqttBrokerConnection localSubscribeConnection cannot be null");
localSubscribeConnection.start();
localSubscribeConnection.setCredentials(ferroampConfig.userName, ferroampConfig.password);
ferroampMqttCommunication.getSubscribedTopic("ehubTopic", ferroampConfig);
ferroampMqttCommunication.getSubscribedTopic("ssoTopic", ferroampConfig);
ferroampMqttCommunication.getSubscribedTopic("esoTopic", ferroampConfig);
ferroampMqttCommunication.getSubscribedTopic("esmTopic", ferroampConfig);
}
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++;
}
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++;
}
}
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++;
}
}
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++;
}
}
String[] ssoS4UpdateChannels = new String[9];
ssoS4UpdateChannels = FerroampMqttCommunication.getSsoS4ChannelUpdateValues();
int channelValuesCounterSsoS4 = 0;
if (ssoS4UpdateChannels.length <= 9) {
for (FerroampChannelConfiguration cConfig : channelConfigSsoS4) {
String ssoS4Channel = cConfig.id;
State ssoS4State = StringType.valueOf(ssoS4UpdateChannels[channelValuesCounterSsoS4]);
updateState(ssoS4Channel, ssoS4State);
channelValuesCounterSsoS4++;
}
}
String[] esoUpdateChannels = new String[11];
esoUpdateChannels = FerroampMqttCommunication.getEsoChannelUpdateValues();
if (esoUpdateChannels.length > 0) {
int channelValuesCounterEso = 0;
if (esoUpdateChannels.length <= 9) {
for (FerroampChannelConfiguration cConfig : channelConfigEso) {
String esoChannel = cConfig.id;
State esoState = StringType.valueOf(esoUpdateChannels[channelValuesCounterEso]);
updateState(esoChannel, esoState);
channelValuesCounterEso++;
}
}
}
String[] esmUpdateChannels = new String[7];
esmUpdateChannels = FerroampMqttCommunication.getEsmChannelUpdateValues();
if (esmUpdateChannels.length > 0) {
int channelValuesCounterEsm = 0;
if (esmUpdateChannels.length <= 9) {
for (FerroampChannelConfiguration cConfig : channelConfigEsm) {
String esmChannel = cConfig.id;
State esmState = StringType.valueOf(esmUpdateChannels[channelValuesCounterEsm]);
updateState(esmChannel, esmState);
channelValuesCounterEsm++;
}
}
}
}
// 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;
}
}

View File

@ -0,0 +1,56 @@
/**
* 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,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 EhubParameters1} 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,48 @@
/**
* 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", "pv-voltage", "pv-current", "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,178 @@
# add-on
addon.ferroamp.name = Ferroamp Binding
addon.ferroamp.description = This is the binding for Ferroamp EnergyHub.
# thing types
thing-type.ferroamp.energyhub.label = EnergyHub
thing-type.ferroamp.energyhub.description = Provides information from 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-id.label = Esm Unique Identifier
thing-type.ferroamp.energyhub.channel.esm-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-capacity.label = Esm Rated Capacity
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-current-battery.label = Eso Current on Battery Side
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-id.label = Eso Unique Identifier
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 on PCB
thing-type.ferroamp.energyhub.channel.eso-timestamp.label = Eso Time Stamp When Message was Published
thing-type.ferroamp.energyhub.channel.eso-voltage-battery.label = Eso Voltage on Battery Side
thing-type.ferroamp.energyhub.channel.grid-active-current-l1.label = Grid Active Current L1
thing-type.ferroamp.energyhub.channel.grid-active-current-l2.label = Grid Active Current L2
thing-type.ferroamp.energyhub.channel.grid-active-current-l3.label = Grid Active Current 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-energy-consumed-l1.label = Grid Energy Consumed L1
thing-type.ferroamp.energyhub.channel.grid-energy-consumed-l2.label = Grid Energy Consumed L2
thing-type.ferroamp.energyhub.channel.grid-energy-consumed-l3.label = Grid Energy Consumed L3
thing-type.ferroamp.energyhub.channel.grid-energy-consumed-total.label = Grid Energy Consumed Total
thing-type.ferroamp.energyhub.channel.grid-energy-produced-l1.label = Grid Energy Produced L1
thing-type.ferroamp.energyhub.channel.grid-energy-produced-l2.label = Grid Energy Produced L2
thing-type.ferroamp.energyhub.channel.grid-energy-produced-l3.label = Grid Energy Produced L3
thing-type.ferroamp.energyhub.channel.grid-energy-produced-total.label = Grid Energy Produced Total
thing-type.ferroamp.energyhub.channel.grid-frequency.label = 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.grid-reactive-current-l1.label = Grid Reactive Current L1
thing-type.ferroamp.energyhub.channel.grid-reactive-current-l2.label = Grid Reactive Current L2
thing-type.ferroamp.energyhub.channel.grid-reactive-current-l3.label = Grid Reactive Current L3
thing-type.ferroamp.energyhub.channel.grid-voltage-l1.label = Grid Voltage L1
thing-type.ferroamp.energyhub.channel.grid-voltage-l2.label = Grid Voltage L2
thing-type.ferroamp.energyhub.channel.grid-voltage-l3.label = Grid Voltage L3
thing-type.ferroamp.energyhub.channel.inverter-active-current-l1.label = Inverter Active Current L1
thing-type.ferroamp.energyhub.channel.inverter-active-current-l2.label = Inverter Active Current L2
thing-type.ferroamp.energyhub.channel.inverter-active-current-l3.label = Inverter Active Current L3
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-consumed-total.label = Inverter Energy Consumed Total
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-energy-produced-total.label = Inverter Energy Produced Total
thing-type.ferroamp.energyhub.channel.inverter-load-active-current-l1.label = Inverter Load Active Current L1
thing-type.ferroamp.energyhub.channel.inverter-load-active-current-l2.label = Inverter Load Active Current L2
thing-type.ferroamp.energyhub.channel.inverter-load-active-current-l3.label = Inverter Load Active Current L3
thing-type.ferroamp.energyhub.channel.inverter-load-reactive-current-l1.label = Inverter Load Reactive Current L1
thing-type.ferroamp.energyhub.channel.inverter-load-reactive-current-l2.label = Inverter Load Reactive Current L2
thing-type.ferroamp.energyhub.channel.inverter-load-reactive-current-l3.label = Inverter Load Reactive Current 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-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-consumed-total.label = Load Energy Consumed Total
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.load-energy-produced-total.label = Load Energy Produced Total
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.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-pv-current.label = S1 Current on PV String Side
thing-type.ferroamp.energyhub.channel.s1-pv-voltage.label = S1 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 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-pv-current.label = S2 Current on PV String Side
thing-type.ferroamp.energyhub.channel.s2-pv-voltage.label = S2 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 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-pv-current.label = S3 Current on PV String Side
thing-type.ferroamp.energyhub.channel.s3-pv-voltage.label = S3 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 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.s4-dc-link-voltage.label = S4 DC Link Voltage
thing-type.ferroamp.energyhub.channel.s4-fault-code.label = S4 FaultCode
thing-type.ferroamp.energyhub.channel.s4-id.label = S4 ID
thing-type.ferroamp.energyhub.channel.s4-pv-current.label = S4 Current on PV String Side
thing-type.ferroamp.energyhub.channel.s4-pv-voltage.label = S4 Voltage on PV String Side
thing-type.ferroamp.energyhub.channel.s4-relay-status.label = S4 RelayStatus
thing-type.ferroamp.energyhub.channel.s4-temperature.label = S4 Temperature on PCB
thing-type.ferroamp.energyhub.channel.s4-timestamp.label = S4 Time Stamp When Message was Published
thing-type.ferroamp.energyhub.channel.s4-total-solar-energy.label = S4 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-capacity-batteries.label = Total Rated Capacity of All Batteries
thing-type.ferroamp.energyhub.channel.total-solar-energy.label = Total Solar Energy
# thing types config
thing-type.config.ferroamp.energyhub.hasBattery.label = Battery Available
thing-type.config.ferroamp.energyhub.hasBattery.description = Has the system a battery connected?
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.userName.label = Username
thing-type.config.ferroamp.energyhub.userName.description = Username to access the device
# channel types
channel-type.ferroamp.date-time.label = Date Time
channel-type.ferroamp.date-time.state.pattern = %1$tc
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.percentage.label = Percentage
channel-type.ferroamp.power.label = Power
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

View File

@ -0,0 +1,538 @@
<?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>EnergyHub</label>
<description>Provides information from Ferroamp EnergyHub</description>
<channels>
<channel id="grid-frequency" typeId="frequency">
<label>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="grid-voltage-l1" typeId="electric-potential">
<label>Grid Voltage L1</label>
</channel>
<channel id="grid-voltage-l2" typeId="electric-potential">
<label>Grid Voltage L2</label>
</channel>
<channel id="grid-voltage-l3" typeId="electric-potential">
<label>Grid 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-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-active-current-l1" typeId="electric-current">
<label>Inverter Active Current L1</label>
</channel>
<channel id="inverter-active-current-l2" typeId="electric-current">
<label>Inverter Active Current L2</label>
</channel>
<channel id="inverter-active-current-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-reactive-current-l1" typeId="electric-current">
<label>Grid Reactive Current L1</label>
</channel>
<channel id="grid-reactive-current-l2" typeId="electric-current">
<label>Grid Reactive Current L2</label>
</channel>
<channel id="grid-reactive-current-l3" typeId="electric-current">
<label>Grid Reactive Current L3</label>
</channel>
<channel id="grid-active-current-l1" typeId="electric-current">
<label>Grid Active Current L1</label>
</channel>
<channel id="grid-active-current-l2" typeId="electric-current">
<label>Grid Active Current L2</label>
</channel>
<channel id="grid-active-current-l3" typeId="electric-current">
<label>Grid Active Current L3</label>
</channel>
<channel id="inverter-load-reactive-current-l1" typeId="electric-current">
<label>Inverter Load Reactive Current L1</label>
</channel>
<channel id="inverter-load-reactive-current-l2" typeId="electric-current">
<label>Inverter Load Reactive Current L2</label>
</channel>
<channel id="inverter-load-reactive-current-l3" typeId="electric-current">
<label>Inverter Load Reactive Current L3</label>
</channel>
<channel id="inverter-load-active-current-l1" typeId="electric-current">
<label>Inverter Load Active Current L1</label>
</channel>
<channel id="inverter-load-active-current-l2" typeId="electric-current">
<label>Inverter Load Active Current L2</label>
</channel>
<channel id="inverter-load-active-current-l3" typeId="electric-current">
<label>Inverter Load Active Current L3</label>
</channel>
<channel id="apparent-power" typeId="power">
<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="grid-energy-produced-l1" typeId="energy">
<label>Grid Energy Produced L1</label>
</channel>
<channel id="grid-energy-produced-l2" typeId="energy">
<label>Grid Energy Produced L2</label>
</channel>
<channel id="grid-energy-produced-l3" typeId="energy">
<label>Grid Energy Produced L3</label>
</channel>
<channel id="grid-energy-consumed-l1" typeId="energy">
<label>Grid Energy Consumed L1</label>
</channel>
<channel id="grid-energy-consumed-l2" typeId="energy">
<label>Grid Energy Consumed L2</label>
</channel>
<channel id="grid-energy-consumed-l3" typeId="energy">
<label>Grid 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="grid-energy-produced-total" typeId="energy">
<label>Grid Energy Produced Total</label>
</channel>
<channel id="grid-energy-consumed-total" typeId="energy">
<label>Grid Energy Consumed Total</label>
</channel>
<channel id="inverter-energy-produced-total" typeId="energy">
<label>Inverter Energy Produced Total</label>
</channel>
<channel id="inverter-energy-consumed-total" typeId="energy">
<label>Inverter Energy Consumed Total</label>
</channel>
<channel id="load-energy-produced-total" typeId="energy">
<label>Load Energy Produced Total</label>
</channel>
<channel id="load-energy-consumed-total" typeId="energy">
<label>Load Energy Consumed Total</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="percentage">
<label>System State of Charge</label>
</channel>
<channel id="soh" typeId="percentage">
<label>System State of Health</label>
</channel>
<channel id="power-battery" typeId="power">
<label>Battery Power</label>
</channel>
<channel id="total-capacity-batteries" typeId="energy">
<label>Total Rated Capacity of All Batteries</label>
</channel>
<channel id="s1-id" typeId="string">
<label>S1 ID</label>
</channel>
<channel id="s1-pv-voltage" typeId="electric-potential">
<label>S1 Voltage on PV String Side</label>
</channel>
<channel id="s1-pv-current" typeId="electric-current">
<label>S1 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 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-pv-voltage" typeId="electric-potential">
<label>S2 Voltage on PV String Side</label>
</channel>
<channel id="s2-pv-current" typeId="electric-current">
<label>S2 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 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-pv-voltage" typeId="electric-potential">
<label>S3 Voltage on PV String Side</label>
</channel>
<channel id="s3-pv-current" typeId="electric-current">
<label>S3 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 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="s4-id" typeId="string">
<label>S4 ID</label>
</channel>
<channel id="s4-pv-voltage" typeId="electric-potential">
<label>S4 Voltage on PV String Side</label>
</channel>
<channel id="s4-pv-current" typeId="electric-current">
<label>S4 Current on PV String Side</label>
</channel>
<channel id="s4-total-solar-energy" typeId="energy">
<label>S4 Total Solar Energy</label>
</channel>
<channel id="s4-relay-status" typeId="string">
<label>S4 RelayStatus</label>
</channel>
<channel id="s4-temperature" typeId="temperature">
<label>S4 Temperature on PCB</label>
</channel>
<channel id="s4-fault-code" typeId="string">
<label>S4 FaultCode</label>
</channel>
<channel id="s4-dc-link-voltage" typeId="electric-potential">
<label>S4 DC Link Voltage</label>
</channel>
<channel id="s4-timestamp" typeId="date-time">
<label>S4 Time Stamp When Message was Published</label>
</channel>
<channel id="eso-id" typeId="string">
<label>Eso Unique Identifier</label>
</channel>
<channel id="eso-voltage-battery" typeId="electric-potential">
<label>Eso Voltage on Battery Side</label>
</channel>
<channel id="eso-current-battery" typeId="electric-current">
<label>Eso Current 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="percentage">
<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 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-id" typeId="string">
<label>Esm Unique Identifier</label>
</channel>
<channel id="esm-soh" typeId="percentage">
<label>Esm System State of Health</label>
</channel>
<channel id="esm-soc" typeId="percentage">
<label>Esm System State of Charge</label>
</channel>
<channel id="esm-total-capacity" typeId="energy">
<label>Esm Rated Capacity</label>
</channel>
<channel id="esm-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>
</channels>
<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 Available</label>
<description>Has the system a battery connected?</description>
<default>false</default>
</parameter>
</config-description>
</thing-type>
<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-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-type id="power">
<item-type>Number:Power</item-type>
<label>Power</label>
<category>Energy</category>
<state readOnly="true" pattern="%.2f %unit%"/>
</channel-type>
<channel-type id="date-time">
<item-type>DateTime</item-type>
<label>Date Time</label>
<category>Energy</category>
<state readOnly="true" pattern="%1$tc"/>
</channel-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-type id="frequency">
<item-type>Number:Frequency</item-type>
<label>Frequency</label>
<category>Energy</category>
<state readOnly="true" pattern="%.2f %unit%"/>
</channel-type>
<channel-type id="percentage">
<item-type unitHint="%">Number:Dimensionless</item-type>
<label>Percentage</label>
<category>Energy</category>
<state readOnly="true" pattern="%.2f %unit%"/>
</channel-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-type id="string">
<item-type>String</item-type>
<label>String</label>
<category>Energy</category>
<state readOnly="true"/>
</channel-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>
</thing:thing-descriptions>

View File

@ -1,21 +1,16 @@
<?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" <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"> 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>5.0.0-SNAPSHOT</version> <version>5.0.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>
@ -150,6 +145,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>
@ -490,15 +486,11 @@
<module>org.openhab.voice.rustpotterks</module> <module>org.openhab.voice.rustpotterks</module>
<module>org.openhab.voice.voicerss</module> <module>org.openhab.voice.voicerss</module>
<module>org.openhab.voice.voskstt</module> <module>org.openhab.voice.voskstt</module>
<module>org.openhab.voice.watsonstt</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>
@ -554,7 +546,6 @@
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
<pluginManagement> <pluginManagement>
<plugins> <plugins>
@ -624,7 +615,6 @@
</plugin> </plugin>
</plugins> </plugins>
</pluginManagement> </pluginManagement>
<plugins> <plugins>
<plugin> <plugin>
<groupId>biz.aQute.bnd</groupId> <groupId>biz.aQute.bnd</groupId>
@ -690,7 +680,6 @@
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
<profiles> <profiles>
<!-- suppress embedding of dependencies --> <!-- suppress embedding of dependencies -->
<profile> <profile>
@ -716,5 +705,4 @@
</build> </build>
</profile> </profile>
</profiles> </profiles>
</project> </project>