Solax Cloud API connection

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
3 Likes

Hi nice work

This is only values for display, no control ?

I have seen that is possible to control the solax inverter work modes and alot more, but it seems like it’s necessary to connect to the inverter via modbus.

I would love to have the ability control “Force time use” from openhab to charge the cheapest electricity from grid to the battery in the winter season, when sun radiation is low.

Have you tried modbus connection ??

Thanks Mads

Hi,

thanks for your reply, my solution is official API only for display.

I will look at this article and try to find a solution.

1 Like

My electricity company will start a trial project with variable tariffs and I have subscribed :wink:
So I have the same need as you. Already started checking the API from the app, I might have an idea.
Will follow this topic and post my experience, if any

1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.