[solax] binding

so i switched off the battery now to test an real feed in - and it seems this is the data when feedin to grid:

{“sn”:“x”,“ver”:“3.005.01”,“type”:14,“Data”:[2350,2339,2306,39,39,39,905,896,877,2678,5275,3161,32,34,1692,1105,5002,5002,5002,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1015,0,0,0,0,0,0,0,0,0,0,1,48,1663,256,10526,7690,5896,100,0,45,0,0,0,0,0,0,0,0,0,0,0,0,0,14449,0,48,8,0,0,2601,0,2939,0,0,9,15439,0,59,7,0,0,62853,0,17344,0,0,0,793,0,0,0,0,0,0,0,0,0,1,0,0,0,16,0,3504,2400,300,204,295,277,33,33,30,1620,779,15163,15163,14906,0,0,0,3267,3259,48034,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,3586,257,257,515,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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”:[2343,2332,2321,42,41,41,953,941,934,2828,4977,2871,37,37,1861,1081,5001,5001,5001,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1014,0,0,0,0,0,0,0,0,0,0,1,48,1814,256,10538,7690,5896,100,0,45,0,0,0,0,0,0,0,0,0,0,0,0,0,14449,0,48,8,0,0,2601,0,2939,0,0,9,15439,0,59,7,0,0,62853,0,17344,0,0,0,793,0,0,0,0,0,0,0,0,0,1,0,0,0,16,0,3504,2400,300,204,295,277,33,33,30,1620,779,15163,15163,14906,0,0,0,3267,3259,48034,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,3586,257,257,515,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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. I’ll code it as data[34] -data[35] for now and we may test and adapt it once I get the running .jar file…

The difference between the cloud and the local can vary a lot because the cloud updates very rarely… that’s the main motivation of building the local access binding…

I think I managed to make something like an “initial” release.
As I’m building this completely in the dark I try to make it as generic as possible and working for my X1 Hybrid G4, assuming the same rules will apply for the X3/QCells.
Please give it a try when you’ve got a chance and let me know what works and what not… please always use DEBUG level for logging when asking for help, you can remove the SN information as it’s kinda sensitive at the moment… :slight_smile:

Hi Konstantin,

amazing - great work - i am out today, but i will try it asap as i am at home!!

Hey Konstantin,

i updated - and everything seems to be perfect, great job!!! :slight_smile:

Would it be possible to add additional channels with this current state? like daily yielded / daily consumption. also the current consumtion of the house would be very interessting!

yeah. I can try to add these… for my inverter they didn’t work too well, or the parser I found was incorrect…
Is the Feed-in working properly? Do you have any feedback for this?

yes the feedin seems to be fine - have monitored it the last hours :slight_smile:

i will try to make a small c# console demo today - and try to get the values - i will give an update here later about which values are the ones

I’ve heard that C# is much like Java. Maybe you can start contributing as well… :smiley:

i have to try - never did java or even openhab dev - but i am happy to do so if i am able to setup an environment :slight_smile: - will just finish parsing / testing now with my console :slight_smile:

just a quick about about my current progress - i used qvolt_hyb_g3_3p.py as template as it seems mostly correct.

34-35 is exactly from/to grid
47 = Power Now (current usage from the house)
70 = Today’s Energy including battery usage
82 = Today’s produced pv Energy
90 = Today’s Feed-in Energy
92 = 882: Today’s Consumption

2360: Network Voltage Phase 1: (0, Units.V, div10)
2363: Network Voltage Phase 2: (1, Units.V, div10)
2349: Network Voltage Phase 3: (2, Units.V, div10)
96: Output Current Phase 1: (3, Units.A, twoway_div10)
96: Output Current Phase 2: (4, Units.A, twoway_div10)
96: Output Current Phase 3: (5, Units.A, twoway_div10)
2267: Power Now Phase 1: (6, Units.W, to_signed)
2261: Power Now Phase 2: (7, Units.W, to_signed)
2255: Power Now Phase 3: (8, Units.W, to_signed)
6783: AC Power: (9, Units.W, to_signed)
4742: PV1 Voltage: (9, Units.V, div10)
2924: PV2 Voltage: (10, Units.V, div10)
90: PV1 Current: (11, Units.A, div10)
98: PV2 Current: (12, Units.A, div10)
4273: PV1 Power: (13, Units.W)
2867: PV2 Power: (14, Units.W)
4999: Grid Frequency Phase 1: (16, Units.HZ, div100)
4999: Grid Frequency Phase 2: (17, Units.HZ, div100)
4999: Grid Frequency Phase 3: (18, Units.HZ, div100)
2: Inverter Operation mode: (19, Units.NONE, cls.Processors.inverter_modes)
2057: Exported Power: (34, Units.W, to_signed)
32320: Battery Voltage: (39, Units.V, div100)
0: Battery Current: (40, Units.A, twoway_div100)
0: Battery Power: (41, Units.W, to_signed)
4726: Power Now: (47, Units.W, to_signed)
14917: Total Energy: (68, Total(Units.KWH), total_energy)
0: Total Energy Resets: (69)
252: Today’s Energy including battery usage: (70)
2690: Total Battery Discharge Energy: (74, Total(Units.KWH), discharge_energy)
0: Total Battery Discharge Energy Resets: (75)
3132: Total Battery Charge Energy: (76, Total(Units.KWH), charge_energy)
0: Total Battery Charge Energy Resets: (77)
10: Today’s Battery Discharge Energy: (78, Units.KWH, div10)
112: Today’s Battery Charge Energy: (79, Units.KWH, div10)
16031: Total PV Energy: (80, Total(Units.KWH), pv_energy)
0: Total PV Energy Resets: (81)
367: Today’s Energy: (82, Units.KWH, div10)
62952: Total Feed-in Energy: (86, Total(Units.KWH), feedin_energy)
0: Total Feed-in Energy Resets: (87)
18528: Total Consumption: (88, Total(Units.KWH), consumption)
0: Total Consumption Resets: (89)
96: Today’s Feed-in Energy: (90, Units.KWH, div100)
882: Today’s Consumption: (92, Units.KWH, div100)
100: Battery Remaining Capacity: (103, Units.PERCENT)
38: Battery Temperature: (105, Units.C)
92: Battery Remaining Energy: (106, Units.KWH, div10)
0: Battery Operation mode: (168, Units.NONE, cls.Processors.battery_modes)

There is a general problem in the binding, that I need to fix for all the data… I use short / 10 (or 100) which is a whole number division, resulting in cutting the residual. That’s why the frequency (for ex.) gives you 49 and not 50, because 4999 / 100 = 49 while it should do a round up. I’ll work on that.
Also will add these additional channels you mentioned about. Stay tuned for a new release.

Could you elaborate this 47… what does it mean current usage - is it the feed-in + the produced + the pulled from the battery at the current moment?

amazing! the power now seems to be the vlaue from the bottom right - Verbraucher - it is the power which the house currently consumes.

OK. Indeed it is the Feed-in + the inverter output power (i.e. the battery + the production if any)
I got it… thanks!

1 Like

I started to define the new channels for the totals. Would appreciate some help with the descriptions. Could you please have a look and advise if they’re clear enough or some improvement can be used. Especially the label/description parts in the XML.

            <channel id="power-usage" typeId="system.electric-power">
				<label>Power Usage</label>
				<description>Current power consumption of the building</description>
			<channel id="total-energy" typeId="system.electric-power">
				<label>Total Energy</label>
				<description>Total energy output from the inverter</description>
			<channel id="total-battery-discharge-energy" typeId="system.electric-power">
				<label>Total Battery Discharge Energy</label>
				<description>Total energy from the battery output</description>
			<channel id="total-battery-charge-energy" typeId="system.electric-power">
				<label>Total Battery Charge Energy</label>
				<description>Total energy charged to the battery</description>
			<channel id="total-pv-energy" typeId="system.electric-power">
				<label>Total PV Energy</label>
				<description>Total energy charged to the battery</description>
			<channel id="total-consumption" typeId="system.electric-power">
				<label>Total Consumption</label>
				<description>Total energy consumed from the building</description>
			<channel id="today-energy" typeId="system.electric-power">
				<label>Today Energy</label>
				<description>Energy output from the inverter for the day</description>
			<channel id="today-feed-in-energy" typeId="system.electric-power">
				<label>Today Feed-In Energy</label>
				<description>Energy consumed from the electricity provider for the day</description>
			<channel id="today-consumption" typeId="system.electric-power">
				<label>Today Consumption</label>
				<description>Energy consumed from the building for the day</description>

Thanks in advance,

I am totally fine with all of them :muscle::+1:

My biggest problem with all this is that I need to document all the channels based on OH community standards and the metadata changes during review are frequently a lot. :slight_smile: Would like to reduce any questions as much as possible, so the better we define the items (and the descriptions), the better.

Btw I’m using for the unit test the very first output you provided.
Unfortunately cannot see totals like this 65K or so there… Talking about this one: 62952: Total Feed-in Energy: (86, Total(Units.KWH), feedin_energy)
According to me this should be 1925KWh and the total consumption is 369KWh which doesn’t make much sense… I would expect your total consumption to be > feed in value (because you have PV and battery too)

Anyway… new release can be downloaded here: Release Support for totals for X3 Hybrid G4 · theater/openhab-addons · GitHub
Please give it a try and let me know if there are any messed channels. It’s possible :slight_smile: