Skip to content

Commit

Permalink
Finalize README
Browse files Browse the repository at this point in the history
Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>
  • Loading branch information
theater committed Jun 22, 2023
1 parent 3413b23 commit eba81b9
Showing 1 changed file with 99 additions and 10 deletions.
109 changes: 99 additions & 10 deletions bundles/org.openhab.binding.solax/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,14 @@ The bridge does not have any channels. It is used only to connect to the module
| onTotalFeedinEnergy* | system.electric-power | The power to / from grid (negative means power is pulled from the grid and vice-versa) [W] |
| onTotalFeedinEnergy* | system.electric-power | The power to / from grid (negative means power is pulled from the grid and vice-versa) [W] |

_* experimental channels. So far the data does not seem reliable. Either it's taken from wrong source of the JSON or it's calculated wrong in the inverter._
_* experimental channels. So far the data does not seem reliable. Either it's taken from wrong part of the JSON or it's calculated wrong in the inverter itself. If someone finds better way to parse it or the meaning of the various int values, please open a new issue for solax binding and share the information._

### General channels

| Channel | Type | Description |
|--------------------------|----------------------------|------------------------------------------------------------------------------------------|
| lastUpdateTime | DateTime | Last time when a call has been made to the inverter |
| rawData | String | The raw data retrieved from inverter in JSON format. (Usable for channels not implemented. Can be consumed with the JSONpath transformation |

### Properties

Expand All @@ -93,29 +99,112 @@ _* experimental channels. So far the data does not seem reliable. Either it's ta

## Full Example

_Provide a full usage example based on textual configuration files._
_*.things, *.items examples are mandatory as textual configuration is well used by many users._
_*.sitemap examples are optional._
Here are some file based examples

### Thing Configuration

```java
Example thing configuration goes here.
// The local connect bridge
Bridge solax:localConnect:localBridge "Solax Inverter LocalBridge" [refresh=10, password="<SERIAL NUMBER OF THE WIFI>", hostname="<local IP/hostname in the network>"] {
Thing inverter MyInverter "MyInverter via LocalBridge" [serialWifi="<SERIAL NUMBER OF THE WIFI>", inverterType="X1_HYBRID_G4"]
}
```

### Item Configuration

```java
Example item configuration goes here.
Group gSolaxInverter "Solax Inverter" <energy> (boilerRoom)
Group solarPanels "Solar panels" <energy> (gSolaxInverter)
String solaxSerial "Serial Number [%s]" <energy> (gsolax_inverter) { channel="solax:inverter:localBridge:MyInverter:serialWifi" }

Number solaxPowerWest "West [%.0f W]" <solarplant> (gsolax_inverter,EveryChangePersist,solarPanels){ channel="solax:inverter:localBridge:MyInverter:pv1Power" }
Number solaxPowerEast "East [%.0f W]" <solarplant> (gsolax_inverter,EveryChangePersist,solarPanels){ channel="solax:inverter:localBridge:MyInverter:pv2Power" }
Number solaxBatteryPower "Battery power [%.0f W]" <energy> (gsolax_inverter,EveryChangePersist) { channel="solax:inverter:localBridge:MyInverter:batteryPower" }
Number solaxBatterySoc "Battery SoC [%.0f %%]" <batterylevel> (gsolax_inverter,EveryChangePersist) { channel="solax:inverter:localBridge:MyInverter:batteryStateOfCharge" }

Number solaxFeedInPower "Feed-in power (CEZ) [%.0f W]" <energy> (gsolax_inverter,EveryChangePersist) { channel="solax:inverter:localBridge:MyInverter:feedInPower" }
Number solaxAcPower "Invertor output power [%.0f W]" <energy> (gsolax_inverter,EveryChangePersist){ channel="solax:inverter:localBridge:MyInverter:inverterOutputPower" }

String solaxInverterType "Inverter Type [%s]" <energy> (gsolax_inverter) { channel="solax:inverter:localBridge:MyInverter:inverterType"}
String solaxUploadTime "Last update time [%s]" <calendar> (gsolax_inverter) { channel="solax:inverter:localBridge:MyInverter:lastUpdateTime" }
String solaxRawData "Raw data [%s]" <data> (gsolax_inverter) { channel="solax:inverter:localBridge:MyInverter:rawData" }
```

### Sitemap Configuration

```perl
Optional Sitemap configuration goes here.
Remove this section, if not needed.
Frame label="Solar power strings" {
Text item=solaxPowerEast valuecolor=[<=30="gray",<=300="red", <1500="orange", >=1500="green"] {
Text item=solaxPowerEast icon="energy" valuecolor=[<=30="gray",<=300="red", <1500="orange", >=1500="green"]
Text item=solaxPowerWest icon="energy" valuecolor=[<=30="gray",<=300="red", <1500="orange", >=1500="green"]
Switch item=Chart_Period label="Chart Period" mappings=[0="H", 1="D", 2="W", 3="M", 4="Y"]
Chart item=solarPanels period=h refresh=600 visibility=[Chart_Period==0]
Chart item=solarPanels period=D refresh=3600 visibility=[Chart_Period==1]
Chart item=solarPanels period=W refresh=3600 visibility=[Chart_Period==2, Chart_Period==Uninitialized]
Chart item=solarPanels period=M refresh=3600 visibility=[Chart_Period==3]
Chart item=solarPanels period=Y refresh=3600 visibility=[Chart_Period==4]
}
Text item=solaxPowerWest valuecolor=[<=30="gray",<=300="red", <1500="orange", >=1500="green"] {
Text item=solaxPowerEast icon="energy" valuecolor=[<=30="gray",<=300="red", <1500="orange", >=1500="green"]
Text item=solaxPowerWest icon="energy" valuecolor=[<=30="gray",<=300="red", <1500="orange", >=1500="green"]
Switch item=Chart_Period label="Chart Period" mappings=[0="H", 1="D", 2="W", 3="M", 4="Y"]
Chart item=solarPanels period=h refresh=600 visibility=[Chart_Period==0]
Chart item=solarPanels period=D refresh=3600 visibility=[Chart_Period==1]
Chart item=solarPanels period=W refresh=3600 visibility=[Chart_Period==2, Chart_Period==Uninitialized]
Chart item=solarPanels period=M refresh=3600 visibility=[Chart_Period==3]
Chart item=solarPanels period=Y refresh=3600 visibility=[Chart_Period==4]
}
Text item=solaxGenerationTotal valuecolor=[<=100="gray",<=500="red", <2000="orange", >=2000="green"] {
Text item=solaxPowerEast icon="energy" valuecolor=[<=30="gray",<=300="red", <1500="orange", >=1500="green"]
Text item=solaxPowerWest icon="energy" valuecolor=[<=30="gray",<=300="red", <1500="orange", >=1500="green"]
Text item=solaxGenerationTotal icon="energy" valuecolor=[<=30="gray",<=300="red", <1500="orange", >=1500="green"]
Switch item=Chart_Period label="Chart Period" mappings=[0="H", 1="D", 2="W", 3="M", 4="Y"]
Chart item=solarPanels period=h refresh=600 visibility=[Chart_Period==0]
Chart item=solarPanels period=D refresh=3600 visibility=[Chart_Period==1]
Chart item=solarPanels period=W refresh=3600 visibility=[Chart_Period==2, Chart_Period==Uninitialized]
Chart item=solarPanels period=M refresh=3600 visibility=[Chart_Period==3]
Chart item=solarPanels period=Y refresh=3600 visibility=[Chart_Period==4]
}
}
Frame label="Consumption" {
Text item=solaxAcPower valuecolor=[<=30="gray", <800="green", <1500="orange", >=1500="red"] {
Switch item=Chart_Period label="Chart Period" mappings=[0="H", 1="D", 2="W", 3="M", 4="Y"]
Text item=solaxAcPower icon="energy" valuecolor=[<=30="gray", <800="green", <1500="orange", >=1500="red"]
Chart item=solaxAcPower period=h refresh=600 visibility=[Chart_Period==0]
Chart item=solaxAcPower period=D refresh=3600 visibility=[Chart_Period==1]
Chart item=solaxAcPower period=W refresh=3600 visibility=[Chart_Period==2, Chart_Period==Uninitialized]
Chart item=solaxAcPower period=M refresh=3600 visibility=[Chart_Period==3]
Chart item=solaxAcPower period=Y refresh=3600 visibility=[Chart_Period==4]
}
Text item=solaxFeedInPower valuecolor=[<=30="gray", <800="green", <1500="orange", >=1500="red"] {
Switch item=Chart_Period label="Chart Period" mappings=[0="H", 1="D", 2="W", 3="M", 4="Y"]
Text item=solaxFeedInPower icon="energy" valuecolor=[<=30="gray", <800="green", <1500="orange", >=1500="red"]
Chart item=solaxFeedInPower period=h refresh=600 visibility=[Chart_Period==0]
Chart item=solaxFeedInPower period=D refresh=3600 visibility=[Chart_Period==1]
Chart item=solaxFeedInPower period=W refresh=3600 visibility=[Chart_Period==2, Chart_Period==Uninitialized]
Chart item=solaxFeedInPower period=M refresh=3600 visibility=[Chart_Period==3]
Chart item=solaxFeedInPower period=Y refresh=3600 visibility=[Chart_Period==4]
}
}
Frame label="Battery" {
Text item=solaxBatteryPower valuecolor=[<=-500="red", <0="orange", ==0="gray", >0="green"] {
Switch item=Chart_Period label="Chart Period" mappings=[0="H", 1="D", 2="W", 3="M", 4="Y"]
Text item=solaxBatteryPower icon="energy" valuecolor=[<-800="red", <0="orange", ==0="gray", >=0="green"]
Chart item=solaxBatteryPower period=h refresh=600 visibility=[Chart_Period==0]
Chart item=solaxBatteryPower period=D refresh=3600 visibility=[Chart_Period==1]
Chart item=solaxBatteryPower period=W refresh=3600 visibility=[Chart_Period==2, Chart_Period==Uninitialized]
Chart item=solaxBatteryPower period=M refresh=3600 visibility=[Chart_Period==3]
Chart item=solaxBatteryPower period=Y refresh=3600 visibility=[Chart_Period==4]
}
Text item=solaxBatterySoc valuecolor=[<=30="red", <50="orange", >=50="green"] {
Switch item=Chart_Period label="Chart Period" mappings=[0="H", 1="D", 2="W", 3="M", 4="Y"]
Text item=solaxBatterySoc valuecolor=[<=30="red", <50="orange", >=50="green"]
Chart item=solaxBatterySoc period=h refresh=600 visibility=[Chart_Period==0]
Chart item=solaxBatterySoc period=D refresh=3600 visibility=[Chart_Period==1]
Chart item=solaxBatterySoc period=W refresh=3600 visibility=[Chart_Period==2, Chart_Period==Uninitialized]
Chart item=solaxBatterySoc period=M refresh=3600 visibility=[Chart_Period==3]
Chart item=solaxBatterySoc period=Y refresh=3600 visibility=[Chart_Period==4]
}
```

## Any custom content here!

_Feel free to add additional sections for whatever you think should also be mentioned about your binding!_

0 comments on commit eba81b9

Please sign in to comment.