Hi, here is tutorial to connect your Solax inverter to Openhab
Prequisities:
Install HTTP binding
Install Map transformation
Install JsonPath Transformation
Get your TokenID from Solax Cloud System
Get your serial number from: Solax Cloud System
Create Solax.things in thing folder and change tokenID and serial number for your:
Thing http:url:solax "Solax inverter" [
baseURL="https://www.eu.solaxcloud.com:9443/proxy/api/getRealtimeInfo.do?tokenId=YOUR_TOKEN_ID&sn=YOUR_SERIAL_NUMBER",
refresh=30] {
Channels:
Type string : sn "Serial Number" [ stateTransformation="JSONPATH:$.result.sn" ]
Type number : acpower "AC Power" [ stateTransformation="JSONPATH:$.result.acpower" ]
Type number : powerdc1 "DC Power" [ stateTransformation="JSONPATH:$.result.powerdc1" ]
Type number : yieldtoday "Yield Today" [ stateTransformation="JSONPATH:$.result.yieldtoday" ]
Type number : yieldtotal "Yield Total" [ stateTransformation="JSONPATH:$.result.yieldtotal" ]
Type number : feedinpower "Feed In Power" [ stateTransformation="JSONPATH:$.result.feedinpower" ]
Type number : feedinenergy "Feed In Energy" [ stateTransformation="JSONPATH:$.result.feedinenergy" ]
Type number : consumeenergy "Feed In Energy" [ stateTransformation="JSONPATH:$.result.consumeenergy" ]
Type string : uploadTime "Last data" [ stateTransformation="JSONPATH:$.result.uploadTime" ]
Type number : inverterType "Iverter Type" [ stateTransformation="JSONPATH:$.result.inverterType" ]
Type number : inverterStatus "Iverter Status" [ stateTransformation="JSONPATH:$.result.inverterStatus" ]
Type number : batPower "Battery power" [ stateTransformation="JSONPATH:$.result.batPower" ]
Type number : soc "Battery Charge" [ stateTransformation="JSONPATH:$.result.soc" ]
}
Create Solax.items in items folder
Group gsolax_inverter "Solax Inverter"
String solax_sn "SeriovĂ© ÄŤĂslo" (gsolax_inverter) { channel="http:url:solax:sn" }
Number solax_powerdc1 "Výroba panelů [%.0f W]" (gsolax_inverter){ channel="http:url:solax:powerdc1" }
Number solax_batPower "Odběr z baterie [%.0f W]" (gsolax_inverter) { channel="http:url:solax:batPower" }
Number solax_feedinpower "OdbÄ›r ze sĂtÄ› [%.0f W]" (gsolax_inverter) { channel="http:url:solax:feedinpower" }
Number solax_consumeenergy "Spotřeba domu [%.0f kWh]" (gsolax_inverter) { channel="http:url:solax:consumeenergy" }
Number solax_soc "Baterie NabitĂ [%.0f %%]" (gsolax_inverter) { channel="http:url:solax:soc" }
Number solax_yieldtoday "DennĂ produkce [%.0f kWh]" (gsolax_inverter){ channel="http:url:solax:yieldtoday" }
Number solax_yieldtotal "Produkce celkem [%.0f kWh]" (gsolax_inverter) { channel="http:url:solax:yieldtotal" }
Number solax_acpower "Energie v měniči [%.0f W]" (gsolax_inverter){ channel="http:url:solax:acpower" }
Number solax_feedinenergy "Feedin Power [%.0f kWh]" (gsolax_inverter) { channel="http:url:solax:feedinenergy" }
String solax_uploadTime "PoslednĂ data" (gsolax_inverter) { channel="http:url:solax:uploadTime" }
Number solax_inverterType "Inverter Typ [MAP(Solax.map):%s]" (gsolax_inverter) { channel="http:url:solax:inverterType"}
Number solax_inverterStatus "Inverter Status [MAP(Solax.map):%s]" (gsolax_inverter) { channel="http:url:solax:inverterStatus" }
Sitemap:
sitemap demo label="My home automation" {
Frame label="Date" {
Group item=gsolax_inverter
}
}
Create Solax.map file in transform folder
1=X1-LX
2=X-Hybrid
3=X1-Hybiyd/Fit
4=X1-Boost/Air/Mini
5=X3-Hybiyd/Fit
6=X3-20K/30K
7=X3-MIC/PRO
8=X1-Smart
9=X1-AC
10=A1-Hybrid
11=A1-Fit
12=A1-Grid
13=J1-ESS
100=Wait Mode
101=Check Mode
102=Normal Mode
103=Fault Mode
104=Permanent Fault Mode
105=Update Mode
106=EPS Check Mode
107=EPS Mode
108=Self-Test Mode
109=Idle Mode
110=Standby Mode
111=Pv Wake Up Bat Mode
112=Gen Check Mode
113=Gen Run Mode