mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[ferroamp] Binding for ferroamp 20241121
Done changes in: FerroampChannelConfiguration.java, regarded CHANNEL_APPARENTPOWER thing-types.xml, regarded CHANNEL_APPARENTPOWER FerroampHandler.java, regarded Annotation warnings FerroampMqttCommunication.java, regarded Annotation warnings README.md, regarded pointed out changes Signed-off-by: Örjan Backsell <orjan.backsell@gmail.com>
This commit is contained in:
parent
23df24b076
commit
c95df50776
@ -40,7 +40,6 @@ The following configuration parameters are available.
|
||||
| eso | boolean | Has the system an Eso unit connected? | N/A | no | no |
|
||||
| esm | boolean | Has the system an Esm unit connected? | N/A | no | no |
|
||||
|
||||
|
||||
## Channels
|
||||
|
||||
| Channel Type ID | Item Type | Read/Write | Label | Description |
|
||||
@ -76,7 +75,7 @@ The following configuration parameters are available.
|
||||
| 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:Energy | R | Apparent Power | Apparent power |
|
||||
| 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 |
|
||||
@ -107,9 +106,9 @@ The following configuration parameters are available.
|
||||
| inverter-energy-produced-l1 | Number:Energy | R | Inverter Energy Produced L1 | |
|
||||
| inverter-energy-produced-l2 | Number:Energy | R | Inverter Energy Produced L2 | |
|
||||
| inverter-energy-produced-l3 | Number:Energy | R | Inverter Energy Produced L3 | |
|
||||
| inverter-energy-consumed-l1 | Number:ElectricCurrent | R | Inverter Energy Consumed L1 | |
|
||||
| inverter-energy-consumed-l2 | Number:ElectricCurrent | R | Inverter Energy Consumed L2 | |
|
||||
| inverter-energy-consumed-l3 | Number:ElectricCurrent | R | Inverter Energy Consumed L3 | |
|
||||
| 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 | |
|
||||
@ -127,8 +126,8 @@ The following configuration parameters are available.
|
||||
| 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 | |
|
||||
| soc | Number:Percentage | R | System State of Check | State of the system |
|
||||
| soh | Number:Percentage | 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 |
|
||||
|
||||
@ -177,7 +176,7 @@ The following configuration parameters are available.
|
||||
| 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-soc | Number:Percentage | 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 |
|
||||
@ -187,8 +186,8 @@ The following configuration parameters are available.
|
||||
|
||||
|
||||
| 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-soh | Number:Percentage | R | Esm System State of Health | State of Health for ESM |
|
||||
| esm-soc | Number:Percentage | 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 |
|
||||
@ -214,7 +213,6 @@ Thing ferroamp:energyhub:myenergyhub [ hostName="energyhub-ip", userName="myUser
|
||||
Thing ferroamp:energyhub:myenergyhub [ hostName="energyhub-ip", userName="myUserName", password="myPassword", hasBattery=true, eso=true ]
|
||||
```
|
||||
|
||||
|
||||
## `demo.items` Example
|
||||
|
||||
```java
|
||||
|
@ -101,8 +101,8 @@ public class FerroampChannelConfiguration {
|
||||
FerroampBindingConstants.CHANNEL_INVERTERLOADACTIVECURRENTL2, Units.AMPERE));
|
||||
channelConfigurationEhub.add(new FerroampChannelConfiguration(
|
||||
FerroampBindingConstants.CHANNEL_INVERTERLOADACTIVECURRENTL3, Units.AMPERE));
|
||||
channelConfigurationEhub.add(
|
||||
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_APPARENTPOWER, Units.VOLT_AMPERE));
|
||||
channelConfigurationEhub
|
||||
.add(new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_APPARENTPOWER, Units.WATT));
|
||||
channelConfigurationEhub.add(
|
||||
new FerroampChannelConfiguration(FerroampBindingConstants.CHANNEL_GRIDPOWERACTIVEL1, Units.AMPERE));
|
||||
channelConfigurationEhub.add(
|
||||
|
@ -113,7 +113,7 @@ public class FerroampHandler extends BaseThingHandler implements MqttMessageSubs
|
||||
logger.debug("Problem connection to MqttBroker");
|
||||
}
|
||||
|
||||
Objects.requireNonNull(ferroampConnection, "MqttBrokerConnection ferroampConnection cannot be null");
|
||||
Objects.requireNonNull(ferroampConnection, "MqttBrokerConnection ferroampConnection cannot be null, ");
|
||||
if (ferroampConnection.connectionState().toString().equals("CONNECTED")) {
|
||||
try {
|
||||
channelUpdate();
|
||||
|
@ -37,13 +37,13 @@ import com.google.gson.JsonObject;
|
||||
|
||||
public class FerroampMqttCommunication implements MqttMessageSubscriber {
|
||||
|
||||
static String[] ehubChannelsUpdateValues;
|
||||
static String[] ssoS1ChannelsUpdateValues;
|
||||
static String[] ssoS2ChannelsUpdateValues;
|
||||
static String[] ssoS3ChannelsUpdateValues;
|
||||
static String[] ssoS4ChannelsUpdateValues;
|
||||
static String[] esoChannelsUpdateValues;
|
||||
static String[] esmChannelsUpdateValues;
|
||||
static String[] ehubChannelsUpdateValues = new String[0];
|
||||
static String[] ssoS1ChannelsUpdateValues = new String[0];
|
||||
static String[] ssoS2ChannelsUpdateValues = new String[0];
|
||||
static String[] ssoS3ChannelsUpdateValues = new String[0];
|
||||
static String[] ssoS4ChannelsUpdateValues = new String[0];
|
||||
static String[] esoChannelsUpdateValues = new String[0];
|
||||
static String[] esmChannelsUpdateValues = new String[0];
|
||||
|
||||
static boolean isSsoChecked = false;
|
||||
static String ssoS1IdCheck = "";
|
||||
@ -128,6 +128,7 @@ public class FerroampMqttCommunication implements MqttMessageSubscriber {
|
||||
jsonElementsStringTemp = jsonElementsObject.get(EhubJsonElements.getJsonElementsEhub().get(0)).toString();
|
||||
GetGeneralValues gridfreq = checkNullGeneralValues(
|
||||
gson.fromJson(jsonElementsStringTemp, GetGeneralValues.class));
|
||||
|
||||
ehubChannelPostsValue[0] = gridfreq.getVal();
|
||||
|
||||
// iace
|
||||
|
@ -102,7 +102,7 @@
|
||||
<channel id="inverter-load-active-current-l3" typeId="electric-current">
|
||||
<label>Inverter Load Active Current L3</label>
|
||||
</channel>
|
||||
<channel id="apparent-power" typeId="energy">
|
||||
<channel id="apparent-power" typeId="power">
|
||||
<label>Apparent Power</label>
|
||||
</channel>
|
||||
<channel id="grid-power-active-l1" typeId="power">
|
||||
|
Loading…
Reference in New Issue
Block a user