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

high data values #1

Open
pcmalek opened this issue May 3, 2021 · 8 comments
Open

high data values #1

pcmalek opened this issue May 3, 2021 · 8 comments

Comments

@pcmalek
Copy link

pcmalek commented May 3, 2021

hi fatyogi and thank you for your work
i used your code with my UPOWER and my TRACER AN it is great but i found a problem with all big data value like "PVwatt","PVkwh","BAwatt","ACwatt","IVwatt".
the problem is that all those value can be more than 600 so the data is split in to two value High and Low .
in your code you did not combine the high and low value instead you made them two different thing but if for example the "IV watt" = 1000 Watt than the code display a high and a low value that do not make any sence.
i tried to fix it by combining the high and low data value but i did not succeed.
i hope you can help thanks .

@fatyogi
Copy link
Owner

fatyogi commented May 4, 2021

Hi pcmalek,

Thank you for your comment. I could not figure out how do they return these high values using the two variables, simply because I never had any high values with my simple set up, hence I just left these registers as-is.

Is it simply 100's in one register and 1000s in the other? Unfortunately, I do not have the UPower unit anymore to do the testing.

If you can source that information from Epsolar or find out the other way how the high values are coded by using two registers, I am happy to alter the code to represent that.

@pcmalek
Copy link
Author

pcmalek commented May 5, 2021 via email

@fatyogi
Copy link
Owner

fatyogi commented May 13, 2021

Hi pcmalek,

Can you please test the logtracer.py against your Tracer controller and see if it picks up the high values now. I have not done that for UPower logger yet, however the principles will be the same

Thanks,
Olaf

@pcmalek
Copy link
Author

pcmalek commented May 15, 2021 via email

@pcmalek
Copy link
Author

pcmalek commented May 15, 2021 via email

@pcmalek
Copy link
Author

pcmalek commented May 15, 2021 via email

@fatyogi
Copy link
Owner

fatyogi commented Jul 27, 2022

Thank you for doing that.

To me, the hexadecimal vs decimal values should not matter - all numbers are stored in binary format in the (int) type variable and only presented to humans in decimal or hexdecimal form. So, the << 16 operation should work fine either way.

However, you have got the point about multiplying them by 100 first! Maybe that is what's missing from my formulae

@JV16Bar
Copy link

JV16Bar commented Nov 6, 2024

I would like to mention, that if either the Controller Temperature (CTtemp) or Battery Temperature (BAtemp) gets negative, the value should be shifted with 32768 (#8000) to correctly read the registers value.
I'm using Tracer 2206AN and this is the formula i'm using in SolarTracer.py to correctly read the negative values:
"BAtemp": (regs[0x10]-0x10000)/100.0 if regs[0x10]& 0x8000 else regs[0x10]/100.0, "CTtemp": (regs[0x11]-0x10000)/100.0 if regs[0x11]& 0x8000 else regs[0x11]/100.0,

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