[solax] binding

Hi all,

This is the community post for discussing the Solax binding.

Github issues: Solax issues

Github pull requests: Solax pull requests

Unofficial / development releases usually can be found here: Konstantin’s unofficial releases

Below are some guidelines about how to do specific stuff which is related to the binding debugging and troubleshooting.

How to setup a separate log for solax binding with specific log level?
You need to add a few additional XML tags to the $OPENHAB/userdata/etc/log4j2.xml

  • How to define the debug level of the binding:
    Under the Loggers section you need to add the following where the level is the log level you want to have (e.g. INFO, DEBUG, TRACE, ERROR):

    <Logger additivity="false" level="TRACE" name="org.openhab.binding.solax">
                            <AppenderRef ref="Solax"/>
  • How to make the logger to write the solax specific logs into a separate file:
    Under Appenders section you need to add the following which will create a file called solax.log in your logs directory:

     <RollingRandomAccessFile fileName="${sys:openhab.logdir}/solax.log" filePattern="${sys:openhab.logdir}/solax.log.%i" name="Solax">
        <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n"/>
              <SizeBasedTriggeringPolicy size="16 MB"/>

Best regards,

1 Like

Hi Konstantin,
I am trying your Solax binding with my Q-Cells Hybrid G3 inverter.
The Q-Cells Hybrid G3 is a Solax X3 Hybrid G4.
It seems that the connection to the inverter is working fine, but the values seems not be correct.

2023-07-02 01:36:55.690 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item ‘QCells_Hyb_G3_Inverter_Type’ updated to X3_HYBRID_G4
2023-07-02 01:36:55.691 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item ‘QCells_Hyb_G3_InverterOutputPower’ updated to 2321 W
2023-07-02 01:36:55.694 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item ‘QCells_Hyb_G3_InverterCurrent’ updated to 232 A
2023-07-02 01:36:55.695 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item ‘QCells_Hyb_G3_InverterVoltage’ updated to 231 V
2023-07-02 01:36:55.696 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item ‘QCells_Hyb_G3_Electric_frequency’ updated to 0
2023-07-02 01:36:55.698 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item ‘QCells_Hyb_G3_Pv1Power’ updated to 50 W
2023-07-02 01:36:55.698 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘QCells_Hyb_G3_Pv1Power’ changed from 53 W to 50 W
2023-07-02 01:36:55.700 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item ‘QCells_Hyb_G3_Pv1Current’ updated to 15 A
2023-07-02 01:36:55.700 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item ‘QCells_Hyb_G3_Pv1Voltage’ updated to 1 V
2023-07-02 01:36:55.700 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item ‘QCells_Hyb_G3_Pv2Power’ updated to 424 W
2023-07-02 01:36:55.701 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘QCells_Hyb_G3_Pv2Power’ changed from 426 W to 424 W
2023-07-02 01:36:55.702 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item ‘QCells_Hyb_G3_Pv2Current’ updated to 22 A
2023-07-02 01:36:55.702 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘QCells_Hyb_G3_Pv2Current’ changed from 21 A to 22 A
2023-07-02 01:36:55.703 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item ‘QCells_Hyb_G3_Pv2Voltage’ updated to 0 V
2023-07-02 01:36:55.703 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item ‘QCells_Hyb_G3_PvTotalPower’ updated to 474 W
2023-07-02 01:36:55.703 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘QCells_Hyb_G3_PvTotalPower’ changed from 479 W to 474 W
2023-07-02 01:36:55.703 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item ‘QCells_Hyb_G3_PvTotalCurrent’ updated to 37 A
2023-07-02 01:36:55.704 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘QCells_Hyb_G3_PvTotalCurrent’ changed from 36 A to 37 A
2023-07-02 01:36:55.704 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item ‘QCells_Hyb_G3_BatteryPower’ updated to 4999 W
2023-07-02 01:36:55.704 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item ‘QCells_Hyb_G3_BatteryCurrent’ updated to 0 A
2023-07-02 01:36:55.704 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item ‘QCells_Hyb_G3_BatteryVoltage’ updated to 0 V
2023-07-02 01:36:55.705 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item ‘QCells_Hyb_G3_Battery_Temperature’ updated to 4999 °C
2023-07-02 01:36:55.705 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item ‘QCells_Hyb_G3_Batterieladung’ updated to 5000
2023-07-02 01:36:55.705 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘QCells_Hyb_G3_Batterieladung’ changed from 4999 to 5000
2023-07-02 01:36:55.705 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item ‘QCells_Hyb_G3_FeedInPower’ updated to 0 W

This probably means that the values are put in different places for this inverter. They basically return to you an array of integer values and we try to guess which is what (hardcoded). What you can try and do is to do the call directly to the IP address and see the output and try to map the values…
Then we can think if we want to support different types of parsers for the different models

I have created alpha3 binary with a small fix, related to the channels (irrelevant for your issue) and also added a “raw data” channel where you can directly check the raw data JSON which the binding retrieves.


Hi - thank you for the binding - i tried it today with my QCells inverter - here is the raw json is this helps, it seems that the values are not correctls as by Sascha!


seems like here is the exact documentation for all the values:

solax/solax/inverters/qvolt_hyb_g3_3p.py at 4c4bc83bf4ec1538f00621177e33cfc3fef428a7 · squishykid/solax · GitHub

I’m currently on vacation. Will have a look when I get back.


that’s a great finding. Thanks for sharing it!

I’m currently working on merging the initial version (with the support for X1 that I own).
Once we finish all the changes, I will start working on distinguishing the types (there is already such logic) and adding different parser for the different types.

Unfortunately currently according to my information from solax cloud web-site the type=14 is distinguished as X3 Solax inverter and it seems that there is difference in the data stored in the array for it.
Could you check on the cloud API if your QCells is found under a different type (e.g. not 14)?


Hey - happy to help :slight_smile: the cloud gives me this result:

{“success”:true,“exception”:“操作成功”,“result”:{“inverterSN”:“XXX”,“sn”:“XXX”,“acpower”:595.0,“yieldtoday”:7.9,“yieldtotal”:424.3,“feedinpower”:0.0,“feedinenergy”:147.2,“consumeenergy”:81.31,“feedinpowerM2”:0.0,“soc”:27.0,“peps1”:0.0,“peps2”:0.0,“peps3”:0.0,“inverterType”:“14”,“inverterStatus”:“102”,“uploadTime”:“2023-08-09 12:43:17”,“batPower”:2019.0,“powerdc1”:1723.0,“powerdc2”:1000.0,“powerdc3”:null,“powerdc4”:null,“batStatus”:“0”},“code”:0}

Link: portal-q-cells.us/proxyApp/proxy/api/getRealtimeInfo.do?tokenId=XXX&sn=XXX

I’m finally back from vacation. Back to work… took me a while to finish all the emails and check the hobby in the open-source community. :slight_smile:

Can you give me a bit more overview. What is Q-cells? Is it something like a Solax inverter but with a different data and the same API?
We need to find a way to distinguish the Q-cells from the Solax X3 type inverter and the only thing I see there is this inverterType=14 which is the same.
Do you have any clue how to auto-detect it and distinguish between both? (because according to the python parsers provided above, they indeed put the data in a different places of the integer array)

P.S. just figured that @Funghi wrote that it’s the same. Very strange that they put the values in a different places of the array. :slight_smile:

OK guys…, so I checked again the python scripts… it seems that X3.py differs from x3_v34.py. The second one seem very similar to the qvolt_hyb_g3_3p.py (didn’t check them line by line). Therefore we According to the API documentation (appendix section) 14 is indeed X3 G4.

See below:
Inverter type Inverter status
Type code Inverter type Status code Inverter status
1 X1-LX
2 X-Hybrid
3 X1-Hybiyd/Fit
4 X1-Boost/Air/Mini
5 X3-Hybiyd/Fit
6 X3-20K/30K
8 X1-Smart
9 X1-AC
10 A1-Hybrid
11 A1-Fit
12 A1-Grid
13 J1-ESS
14 X3-Hybrid-G4
15 X1-Hybrid-G4
16 X3-MIC/PRO-G2
17 X1-SPT
18 X1-Boost/Mini-G4
19 A1-HYB-G2
20 A1-AC-G2
21 A1-SMT-G2
22 X3-FTH
23 X3-MGA-G2

I would propose that I use the Qcells/X3_v34.py parser for this data and test it once it’s imlemented. (unfortunately the PR is still not merged but I believe we’re very close to do it now)

What do you think?

hi - sorry for the late reply - as i am on vacation now :slight_smile: i dont know exactly how they are connected - but seems like solax and qcells are nearly identical. as for your approach - lets go this way - i am happy to test an build anytime :sunglasses:

another solution would be to provide some kind of combobox in the plugin settings for selecting the type - dont know if this is possible?

OK. I’ll work on this when I have some free time. Already did some preparation work. Will let you and @Funghi know when I have a working jar to test with…

amazing - thank you for your work! Let me know if i can help with anything!

Hi @noxe , I wonder if you could do some tests with your response and let me know if you can identify which is the “feed in” value? Currently I have suspicion that it’s either the value with index 34 or 47 (indexing starts from 0 which means the 35th or the 48th element from the data array).
In the python parser these are named as “Exported Power”: (34, Units.W, to_signed) and “Power Now”: (47, Units.W, to_signed).
I guess it’s more likely to be the 48th element but if you could do some rough cross checks with the cloud data and this output that would be great to confirm it.
On the progress - I have already refactored the code so I support multiple parsers and managed to run the X1Hybrid G4 (my inverter) parser successfully. Now I’m working to map the necessary values for the X3HybridG4 (or QCells which appear to be the same)… hope to have a first version to test these days (maybe today or tomorrow)…


Hi Konstantin,

i am looking on the values right now - i am not sure which one are correct. i read some other parsers - and i found:

"Feed-in Power ": (pack_u16(34, 35), Units.W, to_signed32),

where i would have this values currenctly:


which seems to match the parser above which notes this:

# instead of to_signed this is actually 34 - 35,
        # because 35 =  if 34>32767: 0 else: 65535
        "Exported Power": (34, Units.W, to_signed),
        # 35: if 34>32767: 0 else: 65535

currently i have “feedinpower”:-992.0, - which is exactly 34 - 35 (64543 - 65535 = -992) - since we have bad weather rught now - i am taking power from the grid right now

Good finding! We have to play a bit with this one… can you give me the full response + the expected value (according to you) so I can try to make a unit test for it?

Sure - here are 2 full responses - but currently i am a bit lost - seems now both values are 0?

{“sn”:“x”,“ver”:“3.005.01”,“type”:14,“Data”:[2352,2335,2329,34,34,34,783,761,767,2311,4881,3084,45,43,2242,1326,5003,5003,5002,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,31330,350,1127,3078,36,1108,1,48,2311,256,4151,7690,5896,100,0,44,0,0,0,0,0,0,0,0,0,0,0,0,0,14442,0,41,8,0,0,2601,0,2933,0,0,3,15425,0,45,7,0,0,62853,0,17337,0,0,0,786,0,0,0,0,0,0,0,0,0,1,11,1,35,10,256,3504,2400,300,183,292,275,32,32,30,1620,779,15163,15163,14906,0,0,0,3248,3241,47443,8,20564,12339,18753,12353,18742,12356,13625,20564,12339,18754,12866,18743,14151,13104,20564,12339,18754,12866,18743,14151,12592,20564,12339,18754,12865,18738,12871,13620,0,0,0,0,0,0,0,3587,258,1537,515,0,31330,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],“Information”:[12.000,14,“x”,8,1.23,0.00,1.24,1.09,0.00,1]} to {“sn”:“x”,“ver”:“3.005.01”,“type”:14,“Data”:[2347,2332,2324,35,34,35,800,781,784,2365,5027,3075,43,42,2206,1305,4998,4999,5000,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,31320,330,1064,3078,33,1015,1,48,2365,256,4358,7690,5896,100,0,44,0,0,0,0,0,0,0,0,0,0,0,0,0,14442,0,41,8,0,0,2601,0,2933,0,0,3,15426,0,46,7,0,0,62853,0,17337,0,0,0,786,0,0,0,0,0,0,0,0,0,1,11,1,35,10,256,3504,2400,300,183,292,275,32,32,30,1620,779,15163,15163,14906,0,0,0,3247,3240,47446,8,20564,12339,18753,12353,18742,12356,13625,20564,12339,18754,12866,18743,14151,13104,20564,12339,18754,12866,18743,14151,12592,20564,12339,18754,12865,18738,12871,13620,0,0,0,0,0,0,0,3587,258,1537,515,0,31320,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],“Information”:[12.000,14,“x”,8,1.23,0.00,1.24,1.09,0.00,1]}
{“sn”:“x”,“ver”:“3.005.01”,“type”:14,“Data”:[2337,2337,2315,34,33,34,765,749,750,2264,4978,3071,49,45,2480,1394,5001,5001,5000,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,31360,470,1505,3080,47,1447,1,48,2264,256,4644,7690,5896,100,0,44,0,0,0,0,0,0,0,0,0,0,0,0,0,14443,0,42,8,0,0,2601,0,2933,0,0,3,15426,0,46,7,0,0,62853,0,17337,0,0,0,786,0,0,0,0,0,0,0,0,0,1,12,1,35,11,256,3504,2400,300,186,291,275,33,32,30,1620,779,15163,15163,14906,0,0,0,3251,3244,47474,8,20564,12339,18753,12353,18742,12356,13625,20564,12339,18754,12866,18743,14151,13104,20564,12339,18754,12866,18743,14151,12592,20564,12339,18754,12865,18738,12871,13620,0,0,0,0,0,0,0,3587,257,257,515,0,31360,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],“Information”:[12.000,14,“x”,8,1.23,0.00,1.24,1.09,0.00,1]} to {“sn”:“x”,“ver”:“3.005.01”,“type”:14,“Data”:[2345,2334,2313,35,35,35,800,785,786,2371,4975,3067,49,45,2448,1388,5002,5002,5002,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1,173,0,0,0,0,31350,400,1285,3079,41,1262,1,48,2198,256,4656,7690,5896,100,0,44,0,0,0,0,0,0,0,0,0,0,0,0,0,14443,0,42,8,0,0,2601,0,2933,0,0,3,15427,0,47,7,0,0,62853,0,17337,0,0,0,786,0,0,0,0,0,0,0,0,0,1,12,1,35,11,256,3504,2400,300,186,291,275,33,32,30,1620,779,15163,15163,14906,0,0,0,3250,3243,47479,8,20564,12339,18753,12353,18742,12356,13625,20564,12339,18754,12866,18743,14151,13104,20564,12339,18754,12866,18743,14151,12592,20564,12339,18754,12865,18738,12871,13620,0,0,0,0,0,0,0,3587,257,257,515,0,31350,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],“Information”:[12.000,14,“x”,8,1.23,0.00,1.24,1.09,0.00,1]}


Ok now i have again values - i guess the realtime data does not 100% correspond to the screenshot.


{“sn”:“x”,“ver”:“3.005.01”,“type”:14,“Data”:[2340,2321,2326,36,36,36,824,804,810,2438,4995,3076,45,41,2297,1280,5000,5000,5001,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1,65494,65535,0,0,0,31330,320,1034,3078,33,1015,1,48,2480,256,6181,7690,5896,100,0,45,0,0,0,0,0,0,0,0,0,0,0,0,0,14445,0,44,8,0,0,2601,0,2934,0,0,4,15430,0,50,7,0,0,62853,0,17337,0,0,0,786,0,0,0,0,0,0,0,0,0,1,13,1,35,12,256,3504,2400,300,189,291,275,32,32,30,1620,779,15163,15163,14906,0,0,0,3248,3241,47588,8,20564,12339,18753,12353,18742,12356,13625,20564,12339,18754,12866,18743,14151,13104,20564,12339,18754,12866,18743,14151,12592,20564,12339,18754,12865,18738,12871,13620,0,0,0,0,0,0,0,3587,257,1281,515,0,31330,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],“Information”:[12.000,14,“H34C12I8257105”,8,1.23,0.00,1.24,1.09,0.00,1]} to {“sn”:“x”,“ver”:“3.005.01”,“type”:14,“Data”:[2338,2321,2325,35,34,35,786,772,779,2337,4968,3069,46,41,2309,1285,5000,5000,5000,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1,65475,65535,0,0,0,31340,350,1096,3078,35,1077,1,48,2398,256,6193,7690,5896,100,0,45,0,0,0,0,0,0,0,0,0,0,0,0,0,14445,0,44,8,0,0,2601,0,2934,0,0,4,15430,0,50,7,0,0,62853,0,17337,0,0,0,786,0,0,0,0,0,0,0,0,0,1,13,1,35,12,256,3504,2400,300,189,291,275,32,32,30,1620,779,15163,15163,14906,0,0,0,3248,3241,47591,8,20564,12339,18753,12353,18742,12356,13625,20564,12339,18754,12866,18743,14151,13104,20564,12339,18754,12866,18743,14151,12592,20564,12339,18754,12865,18738,12871,13620,0,0,0,0,0,0,0,515,257,1281,515,0,31340,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],“Information”:[12.000,14,“x”,8,1.23,0.00,1.24,1.09,0.00,1]}