# Do maths formula rule on 'Voltage' reading

I have a Tesla PW2, with the consumption sensors hooked up to 3-phase power. The outcome for this is that the ‘grid’ and ‘load’ voltages out of the Tesla JSON output appear to have the three phases added together, and come out around 720 Volts.

From a single Tesla PW2 JSON sample:

site.instant_average_voltage: 724.4799957275391
battery.instant_average_voltage: 239
solar.instant_average_voltage: 238.32000732421875

When I pull these four voltages into extended data as v7,v10,v8,v9, I can do an ‘Extended Data Rule’ formula ‘v7=v7/3; v8=v8/3’ to bring the 720V samples back to a 240V reference - see https://pvoutput.org/intraday.jsp?id=64310&sid=59918&dt=20180707 in the extended data section, which shows all four voltages after the division.

However, the load voltage is also being pulled into the main ‘voltage’ field for the consumption, and being graphed as the raw ~720V value (varying from ~709V up to 735V or so).
The ‘autouploader rules’ (https://pvoutput.org/help.html#autoupload-rule) don’t permit manipulation of the voltage variable, so I can’t set a uploader rule of ‘voltage /=3’ to correct the voltage.

As a future feature request - could the uploader rules please be extended to allow manipulation of the voltage as a variable, so that ‘voltage = voltage / 3’ was a permitted rule thanks?

(Or, if its only the Tesla device that has this issue for 3-phase use, could a flag be built into the PVO powerwall.ini uploader to enable these voltages to be corrected before uploading thanks).

See https://pvoutput.org/intraday.jsp?id=64310&sid=59918 for 720V voltage charts (correction turned off 11pm on 8th July 2018)

Is this problem very common?

I don’t know! I would expect it to be common for all Tesla PW2 users installed on 3-phase connections. The Tesla is a single-phase device, but it measures all three phases and pumps out on one phase the equivalent of what it senses on all three added together, and relies on a 3-phase net-meter to sort it all out. Its an annoyance more than critical for me, but I can’t think of any other way around it, and figured I’d get it onto the ‘todo list’ for the next time you cracked open that code for something else.
You’re the only one who could trawl the database with a query looking for all the voltages above 700V!

Thanks, will look into adding voltage rules in the future.

1 Like

OK - confimed this will be an issue for every Tesla PW2 user on three-phase power.
Found a deeper URL that retrieves the data from the Neurio CT clamp meters.

https://192.168.0.63/api/meters/site:
which includes the following JSON (other stuff redacted):

last_communication_time “2018-10-04T09:41:25.096768706+10:00”
instant_power 2633.450019836426
instant_reactive_power -676.3100197315216
instant_apparent_power 2718.9068115265964
frequency 49.95000076293945
energy_exported 394966.2633560901
energy_imported 2262728.867244979
instant_average_voltage 722.4600067138672
instant_total_current 0
i_a_current 0
i_b_current 0
i_c_current 0
v_l1n 239.86000061035156
v_l2n 240.77999877929688
v_l3n 241.8699951171875
serial_number “0x000004714B003E5A”
version “Tesla-0.0.7”

Note the individual voltages for each phase are reported in v_l1n, v_l2n, v_l3n and the ‘instant_average_voltage’ is the sum of these.
Personally, I think they’ve mucked this up and they should put the average of v1,v2,v3 into instant_average_voltage rather than summing them, but until Tesla fix this in their gateway code…can we find a way of dividing voltage by 3 thanks ?

Voltage and temperature rules are now supported in v1.5.4

Upgrading from v1.5.3 to v1.5.4 only requires the single jar file replaced -

• Stop service
• Rename to org.pvoutput.integration.jar
• Copy to lib folder of the existing installation, replace existing copy.
• Update powerwall.ini with rule
• Start service
1 Like

Thanks BB - thats woorking a treat. Great to have voltages referenced to 230V again!

1 Like

…and circling back - Tesla have now changed this in the PW2 software vers 1.34.3 - all the ‘instant_average_voltage’ values now read around 240V, including those derived from 3 phases.
I can take out the ‘voltage / 3’ calc now.

Really not sure why they updated my system around 4pm yesterday afternoon, but the drop in Voltage display from 235V to 78V was very obvious!