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

Lingering power reading (not real) #84

Open
barrymichels opened this issue Sep 9, 2024 · 21 comments
Open

Lingering power reading (not real) #84

barrymichels opened this issue Sep 9, 2024 · 21 comments

Comments

@barrymichels
Copy link

barrymichels commented Sep 9, 2024

When my charging session is complete, Home Assistant shows the charger is still delivering around 325W for hours afterward. The EnelXWay app does not show this current in the charging curve. My home power monitor doesn't show any extra power either.

Any suggestions on where to start figuring out where this value is getting stuck?

2024-09-09 07:37:07 INFO [ha_mqtt_discoverable.sensors] Setting Power to 324.61 using hmd/sensor/JuiceBox/Power/state

Proxy logs show it sending that power value to HA.

image
Screenshot_20240909-072916

@ivanfmartinez
Copy link
Contributor

There are some strange bugs on the JuiceBox.

Here (and others confirmed same behaviour) when I plug my Volvo XC40 the Voltage indication changes from 220V to around 139V. This makes wrong power values but apparently the energy stay correct.

On the same Juicebox when I plug Bolt or BYD Yuan Plus the Voltage and power stay correct.

Juicepassproxy only send the values sent from juicebox to HA. Maybe the enelx servers are "correcting" some bug on the juicebox before showing the value to the user

@Legot
Copy link

Legot commented Oct 9, 2024

Here (and others confirmed same behaviour) when I plug my Volvo XC40 the Voltage indication changes from 220V to around 139V. This makes wrong power values but apparently the energy stay correct.

~139V is the average DC voltage out of a full bridge rectifier being run off of 220V single phase. The low voltage side of the juicebox is probably just reading that DC voltage from it's power supply and multiplying it by 1.57 (when running on single phase) to estimate the mains voltage.

For a 3 phase input it is probably doing something similar and rectifying them then multiplying the output DC voltage by 1.654

@ivanfmartinez
Copy link
Contributor

Here (and others confirmed same behaviour) when I plug my Volvo XC40 the Voltage indication changes from 220V to around 139V. This makes wrong power values but apparently the energy stay correct.

~139V is the average DC voltage out of a full bridge rectifier being run off of 220V single phase. The low voltage side of the juicebox is probably just reading that DC voltage from it's power supply and multiplying it by 1.57 (when running on single phase) to estimate the mains voltage.

For a 3 phase input it is probably doing something similar and rectifying them then multiplying the output DC voltage by 1.654

In my case I have two phases to get the 220V, and the value is correct when Bolt is connected, but not when the Volvo is connected on same charger.

@ivanfmartinez
Copy link
Contributor

@barrymichels you still have this problem ? can you send some logs with the messages that came from Juicebox to JPP ?

@barrymichels
Copy link
Author

barrymichels commented Oct 19, 2024 via email

@barrymichels
Copy link
Author

barrymichels commented Oct 20, 2024 via email

@barrymichels
Copy link
Author

barrymichels commented Oct 20, 2024 via email

@ivanfmartinez
Copy link
Contributor

@barrymichels this information indicates that you are not running the latest version of my branch #69

the messages that come from juicebox indicates a current of "1.3" A, and voltage 247.5, and that indicates the power of 321 W.

If the your home meter don't indicate this consumption juicebox is sending wrong values. And maybe is a BUG that ENEL X known and solved on server side.

I recommend you to use latest version from my branch, or wait some days for the merge. But at this moment I can't see a way to know that indicates for JPP this "bug".

@barrymichels
Copy link
Author

barrymichels commented Oct 24, 2024 via email

@ivanfmartinez
Copy link
Contributor

@barrymichels can you compare the unknown parameters during the time that value are correct and when not correct ?

FROM_JUICEBOX_FIELD_DEFS = {

My p value is most of the time over 0980, and yours is 0008 and 0009 in the logs that you sent. Maybe this if some kind of correction factor that we are not using now and ENEL X is using .

my values from log

docker-compose logs | grep -o -E "p[0-9]{3,}"   | sort | uniq -c
      1 p0013
      1 p0303
      1 p0979
      1 p0982
    428 p0983
    418 p0984
     54 p0985
     31 p0986
     23 p0987
     43 p0990
    266 p0991
     17 p0992
     21 p0993
    536 p0994
      2 p0995
     28 p0997

If you get this value (and other unknown) on more situations maybe we can find something that we are not using and can use to solve this.

@barrymichels
Copy link
Author

barrymichels commented Oct 24, 2024 via email

@ivanfmartinez
Copy link
Contributor

@barrymichels can you confirm that when power is correct the values is around "099*" and when incorrect like "0000*" ?

if you confirm this, probably this should be used to solve the problem, but we need to figure how this value is used.

@barrymichels
Copy link
Author

barrymichels commented Oct 24, 2024 via email

@ivanfmartinez
Copy link
Contributor

@barrymichels full log will not help without the details about what is the correct power usage.

What I can think is that "p" can be a factor with 1000 being 100% and 0011 being 1.1%, in this case if we consider 1% of 320 W this will be 3 W....

This factor should be applied to the current value and this will correct the power.

We probably need someone to get the power reported from juicebox/juicepassproxy compared to an external meter to confirm that case.

Maybe FalconFour can have more information. I asked him on discord.

@ivanfmartinez
Copy link
Contributor

Just completed charge on Bolt the p value goes down when car stops charging

v09u,s411,F11,u00152597,V2122,L00005393884,S02,T31,M0017,C0026,m0032,t09,i73,e00000,f5999,r70,b000,B0000000,P0,E0004992,A00170,p0993!6HF:

v09u,s412,F11,u00152622,V2167,L00005393900,S02,T31,M0017,C0026,m0032,t09,i74,e00000,f6001,r72,b000,B0000000,P0,E0005008,A00004,p0004!IUV:

v09u,s413,F11,u00152648,V2178,L00005393901,S02,T31,M0017,C0026,m0032,t09,i75,e00000,f6000,r72,b000,B0000000,P0,E0005009,A00004,p0004!LTI:

@FalconFour
Copy link

Something strange going on. S02 = Charging state, which comes from J1772 pilot. That means relay is closed, charging is active. That's my first clue. "p" is power factor (https://theengineeringmindset.com/power-factor-explained/) and it's basically a power-nerd stat for our purposes; it's merely reporting what the meter IC is saying, but the meter IC already accounts for it in its calculations. Nothing to act on there, but having such an incredibly low power factor is definitely a bit of a clue. Suggests there's some hardware issue in the box...

The strangest thing I see is reporting Charging state (J1772 state C) when the vehicle is unplugged, as well as reporting current when none can be present. All this is coming from the box itself (not JPP's fault, which is just reporting the info correctly).

@ivanfmartinez
Copy link
Contributor

@FalconFour in my case #84 (comment) the device has type 2 connector, I dont know if there is some difference from the ones with J1772 connector.

@FalconFour
Copy link

State is state. If the box says it's in state C (S02) when it's unplugged, something is definitely wrong with the box hardware. 🤷‍♂️

@ivanfmartinez
Copy link
Contributor

In my case it is not unplugged, it is not charging.

And I understood that was the same case for @barrymichels , the charging has stopped but car still plugged.

@ivanfmartinez
Copy link
Contributor

ivanfmartinez commented Oct 25, 2024

@FalconFour any hint abount the F parameter also ?

it changed sometimes and apparently when its over 3 my voltage value is wrong.

maybe related to wrong calculation on Juicebox because the car have a 3-phase OBC ?

also the p changed from around 003x to around 001x at same time, maybe they are using the power_factor to send other information when using low values

# Volvo reached the configured charge limit, current used and power factor goes down
2024-10-25 11:07:29   :v09u,s682,F31,u00232086,V1337,L00005426871,S02,T29,M0010,C0022,m0032,t09,i63,e00527,f6001,r65,b000,B0000000,P0,E0009813,A00093,p0989!PB1:

2024-10-25 11:07:39   :v09u,s683,F31,u00232096,V1340,L00005426873,S02,T29,M0010,C0022,m0032,t09,i64,e00533,f6001,r64,b000,B0000000,P0,E0009815,A00015,p0031!UM4:

# F changed from 31 to 21 and the p from 34 to 14
2024-10-25 11:09:10   :v09u,s692,F31,u00232186,V1348,L00005426881,S02,T29,M0010,C0022,m0032,t09,i73,e00516,f5998,r67,b000,B0000000,P0,E0009823,A00016,p0034!41N:
2024-10-25 11:09:20   :v09u,s693,F11,u00232196,V2148,L00005426882,S02,T29,M0010,C0022,m0032,t09,i74,e00525,f5995,r65,b000,B0000000,P0,E0009824,A00005,p0014!475:


# After sometime the state changed from S02 to S01 and also the F changed from 11 to 10
# Car still connected to JB
2024-10-25 11:20:33  :v09u,s761,F11,u00232861,V2155,L00005426902,S02,T29,M0010,C0022,m0032,t09,i44,e00254,f5999,r65,b000,B0000000,P0,E0009844,A00005,p0013!PH5:

2024-10-25 11:20:35  :v09u,s762,F10,u00232863,V2155,L00005426902,S01,T29,M0010,C0022,m0032,t29,i45,e-0001,f5999,r64,b000,B0000000!R9E:


@ivanfmartinez
Copy link
Contributor

F value does not change when car is unplugged, only S changes :

 
2024-10-25 13:29:03 :v09u,s052,F10,u00240514,V2128,L00005426922,S01,T25,M0020,C0022,m0032,t29,i43,e00496,f6001,r68,b000,B0000000!IVL:

2024-10-25 13:29:20  :v09u,s053,F10,u00240531,V2118,L00005426922,S00,T25,M0020,C0022,m0032,t29,i44,e00254,f6001,r68,b000,B0000000!CBZ:



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

4 participants