diff --git a/bundles/org.openhab.binding.solax/README.md b/bundles/org.openhab.binding.solax/README.md index 23e0dcf5bba04..a3ff229b615e0 100644 --- a/bundles/org.openhab.binding.solax/README.md +++ b/bundles/org.openhab.binding.solax/README.md @@ -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 @@ -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="", hostname=""] { + Thing inverter MyInverter "MyInverter via LocalBridge" [serialWifi="", inverterType="X1_HYBRID_G4"] +} ``` ### Item Configuration ```java -Example item configuration goes here. +Group gSolaxInverter "Solax Inverter" (boilerRoom) +Group solarPanels "Solar panels" (gSolaxInverter) +String solaxSerial "Serial Number [%s]" (gsolax_inverter) { channel="solax:inverter:localBridge:MyInverter:serialWifi" } + +Number solaxPowerWest "West [%.0f W]" (gsolax_inverter,EveryChangePersist,solarPanels){ channel="solax:inverter:localBridge:MyInverter:pv1Power" } +Number solaxPowerEast "East [%.0f W]" (gsolax_inverter,EveryChangePersist,solarPanels){ channel="solax:inverter:localBridge:MyInverter:pv2Power" } +Number solaxBatteryPower "Battery power [%.0f W]" (gsolax_inverter,EveryChangePersist) { channel="solax:inverter:localBridge:MyInverter:batteryPower" } +Number solaxBatterySoc "Battery SoC [%.0f %%]" (gsolax_inverter,EveryChangePersist) { channel="solax:inverter:localBridge:MyInverter:batteryStateOfCharge" } + +Number solaxFeedInPower "Feed-in power (CEZ) [%.0f W]" (gsolax_inverter,EveryChangePersist) { channel="solax:inverter:localBridge:MyInverter:feedInPower" } +Number solaxAcPower "Invertor output power [%.0f W]" (gsolax_inverter,EveryChangePersist){ channel="solax:inverter:localBridge:MyInverter:inverterOutputPower" } + +String solaxInverterType "Inverter Type [%s]" (gsolax_inverter) { channel="solax:inverter:localBridge:MyInverter:inverterType"} +String solaxUploadTime "Last update time [%s]" (gsolax_inverter) { channel="solax:inverter:localBridge:MyInverter:lastUpdateTime" } +String solaxRawData "Raw data [%s]" (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!_