Skip to content

Commit

Permalink
[solax] Support for three phase inverter X3 Hybrid G4 (#15710)
Browse files Browse the repository at this point in the history
Signed-off-by: Konstantin Polihronov <[email protected]>
  • Loading branch information
theater authored Nov 7, 2023
1 parent 1881f17 commit 24f4234
Show file tree
Hide file tree
Showing 17 changed files with 1,554 additions and 262 deletions.
45 changes: 39 additions & 6 deletions bundles/org.openhab.binding.solax/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ In case the parsed information that comes with the binding out of the box differ
|------------------------|------------|-------------------------------------------------------------------------------------|
| local-connect-inverter | Thing | This is model representation of inverter with all the data available as a channels |

Note: Channels may vary depending on the inverter type and the availability of information for parsing the raw data.
If you're missing a channel this means that it's not supported for your inverter type.

## Thing Configuration

### Local Connect Inverter Configuration
Expand All @@ -28,12 +31,25 @@ In case the parsed information that comes with the binding out of the box differ

### Inverter Output Channels

| Channel | Type | Description |
|--------------------------|----------------------------|--------------------------------------------------|
| inverter-output-power | Number:Power | The output power of the inverter [W] |
| inverter-current | Number:ElectricCurrent | The output current of the inverter [A] |
| inverter-voltage | Number:ElectricPotential | The output voltage of the inverter [V] |
| inverter-frequency | Number:Frequency | The frequency of the output voltage [Hz] |
| Channel | Type | Description |
|---------------------------------|----------------------------|----------------------------------------------------------------|
| inverter-output-power | Number:Power | The output power of the inverter [W] |
| inverter-current | Number:ElectricCurrent | The output current of the inverter [A] |
| inverter-voltage | Number:ElectricPotential | The output voltage of the inverter [V] |
| inverter-frequency | Number:Frequency | The frequency of the electricity of the inverter [Hz] |
| inverter-output-power-phase1 | Number:Power | The output power of phase 1 of the inverter [W] |
| inverter-output-power-phase2 | Number:Power | The output power of phase 2 of the inverter [W] |
| inverter-output-power-phase3 | Number:Power | The output power of phase 3 of the inverter [W] |
| inverter-total-output-power | Number:Power | The total output power of all phases of the inverter [W] |
| inverter-current-phase1 | Number:ElectricCurrent | The output current of phase 1 of the inverter [A] |
| inverter-current-phase2 | Number:ElectricCurrent | The output current of phase 2 of the inverter [A] |
| inverter-current-phase3 | Number:ElectricCurrent | The output current of phase 3 of the inverter [A] |
| inverter-voltage-phase1 | Number:ElectricPotential | The output voltage of phase 1 of the inverter [V] |
| inverter-voltage-phase2 | Number:ElectricPotential | The output voltage of phase 2 of the inverter [V] |
| inverter-voltage-phase3 | Number:ElectricPotential | The output voltage of phase 3 of the inverter [V] |
| inverter-frequency-phase1 | Number:Frequency | The frequency of phase 1 of the inverter [Hz] |
| inverter-frequency-phase2 | Number:Frequency | The frequency of phase 2 of the inverter [Hz] |
| inverter-frequency-phase3 | Number:Frequency | The frequency of phase 3 of the inverter [Hz] |

### Photovoltaic Panels Production Channels

Expand Down Expand Up @@ -71,6 +87,23 @@ In case the parsed information that comes with the binding out of the box differ
| last-update-time | DateTime | Last time when a call has been made to the inverter |
| raw-data | String | The raw data retrieved from inverter in JSON format. (Usable for channels not implemented. Can be consumed with the JSONpath transformation |

### Statistics / Usage related Channels

| Channel | Type | Description |
|----------------------------------|----------------------------|-----------------------------------------------------------|
| power-usage | Number:Power | Current power usage / consumption of the building [W] |
| total-energy | Number:Energy | Total energy output from the inverter [kWh] |
| total-battery-discharge-energy | Number:Energy | Total energy from the battery [kWh] |
| total-battery-charge-energy | Number:Energy | Total energy to the battery [kWh] |
| total-pv-energy | Number:Energy | Total energy from the PV [kWh] |
| total-consumption | Number:Energy | Total energy consumed for the building [kWh] |
| total-feed-in-energy | Number:Energy | Total energy consumed from the electricity provider [kWh] |
| today-energy | Number:Energy | Energy output from the inverter for the day [kWh] |
| today-battery-discharge-energy | Number:Energy | Total energy from the battery output for the day [kWh] |
| today-battery-charge-energy | Number:Energy | Total energy charged to the battery for the day [kWh] |
| today-feed-in-energy | Number:Energy | Total energy charged to the battery for the day [kWh] |
| today-consumption | Number:Energy | Total energy consumed for the day [kWh] |

### Properties

| Property | Description |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,32 +39,67 @@ public class SolaxBindingConstants {
public static final String PROPERTY_INVERTER_TYPE = "inverterType";

// List of all Channel ids
public static final String INVERTER_OUTPUT_POWER = "inverter-output-power";
public static final String INVERTER_OUTPUT_CURRENT = "inverter-current";
public static final String INVERTER_OUTPUT_VOLTAGE = "inverter-voltage";
public static final String INVERTER_OUTPUT_FREQUENCY = "inverter-frequency";
// Single phase specific
public static final String CHANNEL_INVERTER_OUTPUT_POWER = "inverter-output-power";
public static final String CHANNEL_INVERTER_OUTPUT_CURRENT = "inverter-current";
public static final String CHANNEL_INVERTER_OUTPUT_VOLTAGE = "inverter-voltage";
public static final String CHANNEL_INVERTER_OUTPUT_FREQUENCY = "inverter-frequency";
public static final Set<String> SINGLE_CHANNEL_SPECIFIC_CHANNEL_IDS = Set.of(CHANNEL_INVERTER_OUTPUT_POWER,
CHANNEL_INVERTER_OUTPUT_CURRENT, CHANNEL_INVERTER_OUTPUT_VOLTAGE, CHANNEL_INVERTER_OUTPUT_FREQUENCY);

public static final String INVERTER_PV1_POWER = "pv1-power";
public static final String INVERTER_PV1_VOLTAGE = "pv1-voltage";
public static final String INVERTER_PV1_CURRENT = "pv1-current";
// Three phase specific
public static final String CHANNEL_INVERTER_OUTPUT_POWER_PHASE1 = "inverter-output-power-phase1";
public static final String CHANNEL_INVERTER_OUTPUT_POWER_PHASE2 = "inverter-output-power-phase2";
public static final String CHANNEL_INVERTER_OUTPUT_POWER_PHASE3 = "inverter-output-power-phase3";
public static final String CHANNEL_INVERTER_TOTAL_OUTPUT_POWER = "inverter-total-output-power";
public static final String CHANNEL_INVERTER_OUTPUT_CURRENT_PHASE1 = "inverter-current-phase1";
public static final String CHANNEL_INVERTER_OUTPUT_CURRENT_PHASE2 = "inverter-current-phase2";
public static final String CHANNEL_INVERTER_OUTPUT_CURRENT_PHASE3 = "inverter-current-phase3";
public static final String CHANNEL_INVERTER_OUTPUT_VOLTAGE_PHASE1 = "inverter-voltage-phase1";
public static final String CHANNEL_INVERTER_OUTPUT_VOLTAGE_PHASE2 = "inverter-voltage-phase2";
public static final String CHANNEL_INVERTER_OUTPUT_VOLTAGE_PHASE3 = "inverter-voltage-phase3";
public static final String CHANNEL_INVERTER_OUTPUT_FREQUENCY_PHASE1 = "inverter-frequency-phase1";
public static final String CHANNEL_INVERTER_OUTPUT_FREQUENCY_PHASE2 = "inverter-frequency-phase2";
public static final String CHANNEL_INVERTER_OUTPUT_FREQUENCY_PHASE3 = "inverter-frequency-phase3";

public static final String INVERTER_PV2_POWER = "pv2-power";
public static final String INVERTER_PV2_VOLTAGE = "pv2-voltage";
public static final String INVERTER_PV2_CURRENT = "pv2-current";
// Generic
public static final String CHANNEL_INVERTER_PV1_POWER = "pv1-power";
public static final String CHANNEL_INVERTER_PV1_VOLTAGE = "pv1-voltage";
public static final String CHANNEL_INVERTER_PV1_CURRENT = "pv1-current";

public static final String INVERTER_PV_TOTAL_POWER = "pv-total-power";
public static final String INVERTER_PV_TOTAL_CURRENT = "pv-total-current";
public static final String CHANNEL_INVERTER_PV2_POWER = "pv2-power";
public static final String CHANNEL_INVERTER_PV2_VOLTAGE = "pv2-voltage";
public static final String CHANNEL_INVERTER_PV2_CURRENT = "pv2-current";

public static final String BATTERY_POWER = "battery-power";
public static final String BATTERY_VOLTAGE = "battery-voltage";
public static final String BATTERY_CURRENT = "battery-current";
public static final String BATTERY_TEMPERATURE = "battery-temperature";
public static final String BATTERY_STATE_OF_CHARGE = "battery-level";
public static final String CHANNEL_INVERTER_PV_TOTAL_POWER = "pv-total-power";
public static final String CHANNEL_INVERTER_PV_TOTAL_CURRENT = "pv-total-current";

public static final String FEED_IN_POWER = "feed-in-power";
public static final String CHANNEL_BATTERY_POWER = "battery-power";
public static final String CHANNEL_BATTERY_VOLTAGE = "battery-voltage";
public static final String CHANNEL_BATTERY_CURRENT = "battery-current";
public static final String CHANNEL_BATTERY_TEMPERATURE = "battery-temperature";
public static final String CHANNEL_BATTERY_STATE_OF_CHARGE = "battery-level";

public static final String TIMESTAMP = "last-update-time";
public static final String RAW_DATA = "raw-data";
public static final String CHANNEL_FEED_IN_POWER = "feed-in-power";

public static final String CHANNEL_TIMESTAMP = "last-update-time";
public static final String CHANNEL_RAW_DATA = "raw-data";

// Totals
public static final String CHANNEL_POWER_USAGE = "power-usage";
public static final String CHANNEL_TOTAL_ENERGY = "total-energy";
public static final String CHANNEL_TOTAL_BATTERY_DISCHARGE_ENERGY = "total-battery-discharge-energy";
public static final String CHANNEL_TOTAL_BATTERY_CHARGE_ENERGY = "total-battery-charge-energy";
public static final String CHANNEL_TOTAL_PV_ENERGY = "total-pv-energy";
public static final String CHANNEL_TOTAL_FEED_IN_ENERGY = "total-feed-in-energy";
public static final String CHANNEL_TOTAL_CONSUMPTION = "total-consumption";

// Today totals
public static final String CHANNEL_TODAY_ENERGY = "today-energy";
public static final String CHANNEL_TODAY_BATTERY_DISCHARGE_ENERGY = "today-battery-discharge-energy";
public static final String CHANNEL_TODAY_BATTERY_CHARGE_ENERGY = "today-battery-charge-energy";
public static final String CHANNEL_TODAY_FEED_IN_ENERGY = "today-feed-in-energy";
public static final String CHANNEL_TODAY_CONSUMPTION = "today-consumption";

// I18N Keys
protected static final String I18N_KEY_OFFLINE_COMMUNICATION_ERROR_JSON_CANNOT_BE_RETRIEVED = "@text/offline.communication-error.json-cannot-be-retrieved";
Expand Down
Loading

0 comments on commit 24f4234

Please sign in to comment.