jasonacox / Powerwall-Dashboard

Grafana Monitoring Dashboard for Tesla Solar and Powerwall Systems
MIT License
270 stars 57 forks source link

Release 4.0.1 - not seeing voltages #427

Closed youzer-name closed 5 months ago

youzer-name commented 5 months ago

I ran upgrade.sh and saw it do the upgrade from 4.0.0 to 4.0.1. The only non-standard thing in my process is I'm using powerwall.extend.yml to create a powerwall-history container that pulls the data for my Tesla solar site.

I am not seeing any data populating into the voltages panel. I deleted and recreated the dashboard from dashboard.json, and I see the new regex entry in the overrides, so everything looks to be current.

I tried a ./compose-dash down and ./compose-dash up -d which didn't help.

Upgrade Powerwall-Dashboard from 4.0.0 to 4.0.1 --------------------------------------------------------------------- This script will attempt to upgrade you to the latest version without removing existing data. A backup is still recommended. Upgrade - Proceed? [y/N] y Resetting Timezone to Default... Pull influxdb.sql, dashboard.json, telegraf.conf, and other changes... Saved working directory and index state WIP on main: 4b5d0ba Merge pull request #414 from jasonacox/v4.0.0 remote: Enumerating objects: 14, done. remote: Counting objects: 100% (14/14), done. remote: Compressing objects: 100% (7/7), done. remote: Total 14 (delta 6), reused 13 (delta 6), pack-reused 0 Unpacking objects: 100% (14/14), 25.18 KiB | 661.00 KiB/s, done. From https://github.com/jasonacox/Powerwall-Dashboard 4b5d0ba..7dd1297 main -> origin/main * [new tag] v4.0.1 -> v4.0.1 Updating 4b5d0ba..7dd1297 Fast-forward RELEASE.md | 6 ++- VERSION | 2 +- dashboards/dashboard.json | 157 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---- influxdb/influxdb.sql | 5 ++ upgrade.sh | 2 +- 5 files changed, 161 insertions(+), 11 deletions(-) Setting Timezone back to America/New_York... Updating Powerwall-Dashboard stack... Including powerwall.extend.yml Running Docker Compose... [+] Running 6/6 ✔ Container pypowerwall Running 0.0s ✔ Container influxdb Started 8.8s ✔ Container tesla-history Started 9.7s ✔ Container weather411 Started 9.9s ✔ Container grafana Started 10.0s ✔ Container telegraf Started 9.6s Waiting for InfluxDB to start... ....... up! Add downsample continuous queries to InfluxDB... Deleting old pyPowerwall... pypowerwall pypowerwall Deleting old telegraf... telegraf telegraf Deleting old weather411... weather411 weather411 Deleting old tesla-history... tesla-history tesla-history Restarting Powerwall-Dashboard stack... Including powerwall.extend.yml Running Docker Compose... [+] Running 6/6 ✔ Container pypowerwall Started 2.6s ✔ Container influxdb Running 0.0s ✔ Container tesla-history Started 2.3s ✔ Container weather411 Started 2.7s ✔ Container grafana Running 0.0s ✔ Container telegraf Started 4.6s

I see the new CQ's (vitals 8 - vitals 12) in InfluxDB but I don't see any recent data in vitals.http. The last records are from before my firmware updated. Looking at the source of the CQ, I tried to run:

SELECT PW1_v_out, PW2_v_out, PW3_v_out, PW4_v_out, PW5_v_out, PW6_v_out, PW7_v_out, PW8_v_out, PW9_v_out, PW10_v_out, PW11_v_out, PW12_v_out FROM raw.http order by time desc limit 5

That returned no data. So I don't have the raw data coming in.

select * from raw.http order by time desc limit 1 returns these columns:

time backup_reserve_percent battery_energy_exported battery_energy_imported battery_frequency battery_i_a_current battery_i_b_current battery_i_c_current battery_instant_apparent_power battery_instant_average_current battery_instant_average_voltage battery_instant_power battery_instant_reactive_power battery_instant_total_current battery_num_meters_aggregated battery_timeout grid_status host load_energy_exported load_energy_imported load_frequency load_i_a_current load_i_b_current load_i_c_current load_instant_apparent_power load_instant_average_current load_instant_average_voltage load_instant_power load_instant_reactive_power load_instant_total_current load_timeout month nominal_energy_remaining nominal_full_pack_energy percentage site_energy_exported site_energy_imported site_frequency site_i_a_current site_i_b_current site_i_c_current site_instant_apparent_power site_instant_average_current site_instant_average_voltage site_instant_power site_instant_reactive_power site_num_meters_aggregated site_timeout solar_energy_exported solar_energy_imported solar_frequency solar_i_a_current solar_i_b_current solar_i_c_current solar_instant_apparent_power solar_instant_average_current solar_instant_average_voltage solar_instant_power solar_instant_reactive_power solar_instant_total_current solar_num_meters_aggregated solar_timeout source time_remaining_hours url year

Edit:

I'm trying to read through the recent code changes to see where the breakdown is occurring. I do have the battery blocks info when I directly query the powerwall's API:

"battery_blocks": [ { "Type": "", "PackagePartNumber": "3012170-10-C", "PackageSerialNumber": "xxxxx", "disabled_reasons": [], "pinv_state": "PINV_GridFollowing", "pinv_grid_state": "Grid_Compliant", "nominal_energy_remaining": 14793, "nominal_full_pack_energy": 14793, "p_out": -10, "q_out": 330, "v_out": 245, "f_out": 60.013000000000005, "i_out": -0.1, "energy_charged": 2617505, "energy_discharged": 2197889, "off_grid": false, "vf_mode": false, "wobble_detected": false, "charge_power_clamped": false, "backup_ready": true, "OpSeqState": "Active", "version": "eb113390162784" }, { "Type": "", "PackagePartNumber": "3012170-10-C", "PackageSerialNumber": "xxxxx", "disabled_reasons": [], "pinv_state": "PINV_GridFollowing", "pinv_grid_state": "Grid_Compliant", "nominal_energy_remaining": 14601, "nominal_full_pack_energy": 14601, "p_out": 0, "q_out": 340, "v_out": 245.10000000000002, "f_out": 60.013999999999996, "i_out": -0.2, "energy_charged": 2609343, "energy_discharged": 2197269, "off_grid": false, "vf_mode": false, "wobble_detected": false, "charge_power_clamped": false, "backup_ready": true, "OpSeqState": "Active", "version": "eb113390162784" }, { "Type": "", "PackagePartNumber": "3012170-05-E", "PackageSerialNumber": "xxxxx", "disabled_reasons": [], "pinv_state": "PINV_GridFollowing", "pinv_grid_state": "Grid_Compliant", "nominal_energy_remaining": 14487, "nominal_full_pack_energy": 14487, "p_out": 0, "q_out": 320, "v_out": 245.10000000000002, "f_out": 60.013000000000005, "i_out": -0.2, "energy_charged": 275393, "energy_discharged": 203059, "off_grid": false, "vf_mode": false, "wobble_detected": false, "charge_power_clamped": false, "backup_ready": true, "OpSeqState": "Active", "version": "eb113390162784" } ],

Edit: Python isn't my strong suit, but reading through pypowerwall.py, I think the voltage data should be returned in "http://pypowerwall:8675/freq"

All I get from that is:

{
"grid_status": 1
}

So I'm stumped. Everything seems to be the current version. I confirmed that my copy of pypowerwall.py in the container is the current version with lines referencing the battery_blocks data. When I directly access the powerwall api, I see the battery_blocks. Why doesn't my pypowerall return that data when /freq is accessed?

jasonacox commented 5 months ago

Hi @youzer-name, that response you show is what you will get if you are in Tesla Cloud mode instead of Local Mode. Did you happen to switch to cloud mode? Run ./verify.sh or http://pypowerwall:8675/help to see what mode it is running.

If not, try http://pypowerwall:8675/api/system_status - that is where the new voltage data is coming from.

youzer-name commented 5 months ago

Hi @youzer-name, that response you show is what you will get if you are in Tesla Cloud mode instead of Local Mode. Did you happen to switch to cloud mode?

That was it. I think when I did the 4.0.0 update I picked cloud mode, thinking that was required to get all the data after the firmware update. I re-ran setup.sh and am back in local mode and the data is populating.