Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

X1-Hyrid-G3 incorrect data mapping #8

Open
andmagri opened this issue Jan 8, 2024 · 4 comments
Open

X1-Hyrid-G3 incorrect data mapping #8

andmagri opened this issue Jan 8, 2024 · 4 comments

Comments

@andmagri
Copy link

andmagri commented Jan 8, 2024

I'm finding some values in Data2.txt don't match for this inverter type (3)
e.g.
Yield_Total: read32BitUnsigned(Data[11], Data[12]) / 10

Data[11] = 64258
Data[12] = 1

Yield_Total = 1 + 65536 * 64258 = 4,211,276,546 / 10
Solax Cloud says that the total yield is 12.58MW

{"sn":"****","ver":"2.035.01","type":3,"Data":[2323,8,1,0,0,0,0,1,2,5000,2,64258,1,88,0,0,19660,10,5,22,100,0,35663,0,71,0,0,0,0,0,0,0,0,0,0,0,0,100,0,22,3608,0,0,0,274,0,0,0,63416,65535,5752,0,35641,1,2121,22,256,2160,1740,0,185,130,120,32,32,573,1,1,13566,0,41592,0,55360,1,251,0,65534,65535,154,0,0,0,0,0,0,0,0,0,125,0,1708,0,0,251,0,87,0,0,0,0,0,0,0,0,0,0,0,0,1,22016,5134,2066,6145,0,0,0,0,513,0,0,0,0,0,0,0,273,1970,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,257,257,257,257,0,0,0,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":[3.680,3,"****",1,3.35,0.00,3.29,1.05,0.00,1]}

@nazar-pc
Copy link
Owner

nazar-pc commented Jan 8, 2024

That is how application't code seems to read it though 🤷‍♂️

@andmagri
Copy link
Author

andmagri commented Jan 9, 2024

I've come across this for a Gen4:
def pack_u16(a, b): return (b << 16) + a

'On-grid total yield': pack_u16(data[11],data[12])*0.1

Source: https://community.openenergymonitor.org/t/reading-data-from-a-solax-x1-hybrid-gen4-hybridx-inverters/23842

How would I translate this into bash cause it's the only scripting language I understand?

@nazar-pc
Copy link
Owner

nazar-pc commented Jan 9, 2024

This is really not the place to ask such questions 😕

@darmach
Copy link

darmach commented Nov 10, 2024

...however @andmagri bitwise shift in bash can be done:

 a=1; b=8; echo $(( ( $b << 2 ) + $a ))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants