Closed peppersass closed 7 months ago
Additional information: It appears there's a problem with Week, Month and Year exports, too. They all produce only a single line of data, which is for the last day of the week, day of the month or month of the year. It looks like the Day export is doing something similar, perhaps writing 12 5-minute records, each of which overwrites the previous one. as if the file is in write mode versus append mode. Or maybe Tesla is only feeding you the last record(s) in the requested set. Again, this is the current Store version 5.0.
Strange, I haven't made any changes to the data export (other than adding load_power
as you noticed) and the export is working fine for me. Are you seeing all of the data rendered on the graphs, or is that wrong too?
I suspect the issue may be to do with time zones and the exact date that is being passed to the API. Given you have the code running locally, you may want to debug into this and check that the power/energy history URLs have what look like the correct end date/time and time zone.
@peppersass I was able to replicate similar behaviour by changing my time zone. I can look into whether I can always use the Powerwall's stated time zone rather than rely on the local device's time zone as they could differ - but can you confirm if there is any obvious discrepancy between the two in your case?
You nailed it. My device was set to a different time zone than the Powerwalls. Once I corrected the time zone, exports are working correctly.
I travelled to the U.S. Central Time Zone the last week of December and had to manually change my notebook's time zone because I have location services turned off for privacy reasons (which is why I don't have a LinkedIn account!) I forgot to reset the time zone when I got home.
If you're able to access the Powerwall's configured time zone, it would be best to use it instead of the device, which could be portable.
Thanks for the quick response.
You closed the thread where we discussed SyncFusion, so I'll ask here: What Powerwall Companion features are supported by SyncFusion? Can I turn off / remove that library so the license message doesn't display at startup? My primary use for the app is to capture the PW data on a daily basis, so I don't need most of the UI functions. I modified 3.6 to run aa a scheduled task, but it won't work as long as the SyncFusion license message is displayed at startup. As I said, I don't have a LinkedIn account or any other social media accounts for privacy reasons. I feel very strongly about this. I'm still able to use 3.6 to capture the daily data, but I'm concerned that if Tesla makes a big change 3.6 will become obsolete.
While I'm sure you already fixed your time zone setting, I have made an update to the app to use the Powerwall's settings instead of the local time zone. If you DM me your Microsoft account email address, I can give you access to the test release - I'd appreciate you giving this a try before I push it out more broadly.
SyncFusion is a UI toolkit company, and I use their components for the circular gauge and the graphs. Given how central these are to the app, you won't want to remove them.
If all you want to do is download the data, you may be better off using a tool that's more fit for purpose such as https://github.com/zigam/tesla-solar-download/
Thanks for the link. Install instructions are out of date but eventually got it to work. Daily data is OK except it adds a newline after each record. Only does Daily and Monthly, whereas I need Daily and Yearly. Can create Yearly from Monthly, I suppose. Will keep it as a backup in case Tesla changes something that breaks 3.6.
BTW, attached is a screenshot of the app I wrote to analyze the data. We're in a pilot program with our utility in which they sold us two PowerWalls for $50/mo over 10 years and put us on time-of-use rates. As the rates change, it can be quite complicated to determine whether the program is more or less expensive than the utility's fixed-rate or an alternative community rate we can get. My app uses the Daily data to calculate usage and cost. It needs the From/To info in the Yearly data ompare TOU vs no-TOU, batteries vs no-batteries, solar vs no-solar, etc.
The $900 we paid in 2023 was for all our electricity, heating and cooling (we're in Northern New England and have heat pumps.) Compares with close to $5K if we still had propane, no solar and no batteries. The batteries almost pay for themselves because of the TOU advantages.
Closing this issue as the app now uses the powerwall's time zone, not local.