jasonacox / pypowerwall

Python API for Tesla Powerwall and Solar Power Data
MIT License
123 stars 21 forks source link

New Tesla Pros software update does not work with pypowerwall #51

Closed gregshep closed 9 months ago

gregshep commented 9 months ago

Tesla's firmware 23.28.2 no longer supports the old way of getting metrics as far as I can see. Going to my Powerwall's IP address I get "Switch to Tesla Pros for a better commissioning experience. The current experience is no longer supported"

The pypowerwall app says it connects but there are not any metrics: 10/13/2023 05:13:32 PM [proxy] [INFO] pyPowerwall [0.6.2] Proxy Server [t27] - HTTP Port 8675 10/13/2023 05:13:32 PM [proxy] [INFO] pyPowerwall Proxy Started

Will pypowerwall support the newer Tesla Pros application?

jasonacox commented 9 months ago

Hi @gregshep -

I'm on 23.28.2 with no problems. This was also reported here: https://github.com/jasonacox/Powerwall-Dashboard/discussions/367

From what I can tell, everything is the same, just that Tesla created an Android app for installers to use instead of having to use the web page setup. I do hope they don't remove the web based version.

gregshep commented 9 months ago

You're right, pypowerwall is working. I have grafana permissions issues and that Tesla Pros screen made me think it was that. Thank you!

ymilord commented 9 months ago

You're right, pypowerwall is working. I have grafana permissions issues and that Tesla Pros screen made me think it was that. Thank you!

@gregshep How did you correct the grafana permission issue? I am having the same issue as you. Thanks

gregshep commented 9 months ago

You're right, pypowerwall is working. I have grafana permissions issues and that Tesla Pros screen made me think it was that. Thank you!

@gregshep How did you correct the grafana permission issue? I am having the same issue as you. Thanks

My mistake was using native docker-compose commands (e.g. docker-compose pull; docker-compose restart, etc). This seemed to have messed up the grafana configuration. Instead I used the provided commands: upgrade.sh verify.sh compose-dash.sh up -d and this fixed my configuration. I can't recall the exact combination but lesson is don't use the native docker-compose to upgrade containers..

ymilord commented 9 months ago

@gregshep Unfortunately, that won't work for my specific install.

I already have a global Grafana install that has a bunch of different dashboards configured. I wanted to add the Powerwall-Dashboard to it. Everything works except the power flow. I get the same error you described above. If I goto the pypowerwall example page, it displays normally. When I goto my grafana instance with the powerwall-dashboard added- I get the tesla pro splash page. I am assuming the credentials for the gateway are stored somewhere thats not configured/accessible by my separate grafana instance can't get to/or read. Just trying to figure that out to get that working.

When you said you corrected the permission issue, I thought you figure out something specific that got grafana to use the preconfigured credentials.

@jasonacox

For context, I have everything but grafana running on one docker host. I have grafana running on a different host. Same VLAN. But two separate hosts. I am guessing when its one host, grafana is pulling something from somewhere to get the credentials. I just need to put it where is expected. I just don't know what it is or where it goes.

jasonacox commented 9 months ago

Hi @ymilord - If you are getting the "Tesla Pros" screen instead of the animation, it means you still need to log in to the Tesla Powerwall gateway directly and dismiss that popup. There are some screenshots in this discussion that might help: https://github.com/jasonacox/Powerwall-Dashboard/discussions/367#discussioncomment-7278760 - Also note, some found that they needed to clear their browser cache.

As to your setup, that makes sense, but one caveat, after spending a few days testing the animation to work on newer Grafana instances, I have come to the conclusion that the last stable Grafana version is v9.1.2 (technically it will work up to Grafana v9.2.20 but I ran out of time to do full soak testing). I dropped some of my analysis in https://github.com/jasonacox/Powerwall-Dashboard/pull/374. This may not apply to you, but wanted to raise it in case you are seeing some weird behavior with the animation even after it is working.

ymilord commented 8 months ago

@jasonacox Thanks for the reply.

I wanted to try and troubleshoot for a couple days before I replied.

I've tried the login trick, but the issue is I can click 'Continue' but it ignores 'Upgrade Later' Click. It just loops back to the splash page with the 'Continue' button. Endlessly.

I went in and edited the flow panel to something huge thinking the bottom half it being covered by the Firmware info. No dice. I then completely removed the Firmware version display at the bottom and does the same thing. I can click the initial 'Continue' button, But Upgrade later loops back to the beginning splash page with the Continue button.

If I goto http://<IP/Hostname>:8675/example.html on any machine on my network it displays normally. I've even tried injecting that example page into the flow panel. Same deal I get the expected 'Tesla Powerwall Power Flows iFrame Example' But then I also get the Tesla Pro splash page and once again it just loops back to the beginning when Continue/Upgrade Later is clicked. Once again Endlessly.

What I don't get is how can I get to that example page from any machine from various OSs and it displays normally, but when I use it for Grafana it craps itself.

jasonacox commented 8 months ago

That is very odd! I agree. In my testing, if it was misbehaving in Grafana, it would misbehave in the example. The only thing that I can think of is that the browser has cached some bit of code or cookie that is breaking it for one. Try clearing your cache in your bowser and try both again. You may need to dismiss the Tesla Pros upgrade screens too (see https://github.com/jasonacox/Powerwall-Dashboard/discussions/377#discussioncomment-7409065).