home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.43k stars 30.67k forks source link

Latest powerwall firmware requires a non-default password to be set #129440

Open wriede opened 1 week ago

wriede commented 1 week ago

The problem

I yesterday ran into the problem that after years of flawless operation of the Tesla Powerwall Integration all of a sudden HA demands that I reauthenticate the powerwall. I follow the instructions and fill in the last 5 of the serial and get "Authentication failed with error: Access denied for resource https://192.168.0.7/api/login/Basic: default password not supported: Login Error".

Issue seems similar to #128506 yet different. Dead end for me unless someone can tell me what to do... Thanks!

What version of Home Assistant Core has the issue?

core-2024.10.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Tesla Powerwall

Link to integration documentation on our website

https://www.home-assistant.io/integrations/powerwall

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.powerwall
Source: helpers/update_coordinator.py:386
integration: Tesla Powerwall (documentation, issues)
First occurred: October 28, 2024 at 1:39:12 AM (1 occurrences)
Last logged: October 28, 2024 at 1:39:12 AM

Error fetching Powerwall site data: Unable to fetch data from powerwall

Additional information

No response

home-assistant[bot] commented 1 week ago

Hey there @bdraco, @jrester, @daniel-simpson, mind taking a look at this issue as it has been labeled with an integration (powerwall) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `powerwall` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign powerwall` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


powerwall documentation powerwall source (message by IssueLinks)

g8ry commented 1 week ago

This is happening to me 2 days ago. For some reason, I can't log directly into my powerwall 2 anymore, the last 5 letters of my serial number don't work.

Upon investigation, it looks like the front end to my powerwall 2 has been updated and now shows:-

tesla-one

@wriede Can you log into your powerwall at https://192.168.0.7 @wriede Can you reset your password ?

I've tried everything and for some reason the software on the powerwall update just doesn't work. I don't think its the home assistant integration problem, I think its a software problem thats just appeared the powerwall since the powerwall got updated in the background.

IXEguy commented 6 days ago

Seeing the same thing as what g8ry mentioned above.

Unable to login using the last 5 digits as I have in the past.

wriede commented 6 days ago

I get exactly the same login screen. I cannot log in with the 5 digit code or the entire serial #. Tried changing the password but get "unexpected request origin". Clearly Tesla is messing with us :-(

coderjohnjohn commented 6 days ago

I have the same/similar issue. However I have managed to 'reset' the password, by connecting to the wifi, and using the full serial number (with preceding S) in the forgot password prompt. However, I still can't log in through the powerwall's web interface as it says 'bad credentials' using the password it just told me it had been reset to. I also got the 'Tesla One' app on my phone and can connect to it via that, but I can't see anything helpful in there either. I have not changed anything else in HA, and I used to be able to log in to the powerwall, so I am almost certain the change/fault has been pushed out to the powerwall/gateway from Tesla rather than a bug in HA or the powerwall integration. My powerwall gateway version is 24.36.2 46990655 which is the latest, and has been rolled out to 1.1% by the looks of https://www.netzero.energy/firmware_versions

coderjohnjohn commented 6 days ago

Ok, with help from https://teslamotorsclub.com/tmc/threads/unable-to-log-into-gateway-after-24-36-2-update-work-around-found.336050/ I've got mine working again.

Suggested steps as follows:

Very frustratingly, if you hit the reset password button after entering a wrong one, you can reset a new password, but the generated password does not meet the above criteria, so while it is probably stored in the system, it will not accept it to successfully login.

MattMake commented 6 days ago

Just for clarification, after changing your password on the Tesla Gateway - did you have to adjust anything on the HA Powerwall integration? I've checked settings and such on the integration, but I don't see any place to adjust passwords. I'm not an HA expert, so any guidance would be greatly appreciated.

I'm expecting to receive 24.36.2 soon, so I figure I will go ahead and change the password now. However, I wanted to ensure I knew what other items down the line I need to adjust.

Thanks in advance!

IXEguy commented 6 days ago

Followed the steps posted by @coderjohnjohn and I am connected. Hopefully data starts to populate soon.

g8ry commented 6 days ago

Working for me too, thanks for your help @coderjohnjohn

@MattMake Once you have set a new password on the TEG gateway, use that password on HA integration, its that simple. Let us know you've managed to update the password on the gateway ok and its working now.

MattMake commented 6 days ago

I've got no problems with where and how to change the password in the gateway. My question is more around where in HA specifically do I set the new password? Or will it prompt once it notices the password doesn't work?

wriede commented 6 days ago

MattMake: I don't know whether this'll appear if you change the password proactively but once I got the gateway firmware update HA threw up a repair which gives this popup for the password when you fix it: image

MattMake commented 6 days ago

Ok, I pre-emptively changed my Gateway password, as I am still on 24.28.1. From the TMC thread, it looks like it forces a change if the default is still set. I changed on my gateway, then updated Powerwall Dashboard, now I'm waiting for HA to complain that the password isn't working :).

Update - I was able to access the password prompt by reloading the Tesla module (which failed), then going to notifications and getting the prompt above. I entered my new password and the integration is all happy again.

image

wriede commented 6 days ago

My problem with the procedure is that I'm 500 miles away from my powerwall so connecting to its WiFi or throwing its switch is not something I can personally do. I'll have to ask my caretaker to do it for me. He's a handyman so definitely capable but not at all familiar with the equipment so I will need to supply all specific details. For that I have one question for those of you who have successfully done this: where the procedure says "just type its IP" to access the gateway, is that the IP it has on my local LAN? Or if not, how did you determine what IP to use?

g8ry commented 6 days ago

My problem with the procedure is that I'm 500 miles away from my powerwall so connecting to its WiFi or throwing its switch is not something I can personally do. I'll have to ask my caretaker to do it for me. He's a handyman so definitely capable but not at all familiar with the equipment so I will need to supply all specific details. For that I have one question for those of you who have successfully done this: where the procedure says "just type its IP" to access the gateway, is that the IP it has on my local LAN? Or if not, how did you determine what IP to use?

On my system the wifi to the TEG-XXX gateway had the serial number as its password (the long version of your original default password)

When I logged into that, I had to visit http://192.168.91.1 (my phones IP when connected to the TEG was 192.168.91.x). the 192.168.91.1 page is exactly the same as you see when logging into you 192.168.0.7, then just follow the instructions by @coderjohnjohn

wriede commented 5 days ago

I see that bdraco changed the title of this issue and adjusted the classification which is appropriate given what we've learned BUT maintainers: Please change the prompt shown when HA asks for a password because going forward the default password is irrelevant.

MattMake commented 5 days ago

Just FYI, if you pre-emptively change your password before you are upgraded to 24.36.2, you can change the password without requiring physical powerwall access for flipping switches. Just be sure to change the password to something that matches the new requirements - at least 8 characters, upper and lower case, numbers and special characters.

wriede commented 5 days ago

That's a very good point. Maintainers: Is there a way to warn the users of this integration that authenticate with the default password that maybe they want to be proactive? I mean, I din't see this coming and it was very frustrating.

bdraco commented 5 days ago

Opening a PR to the alerts repo to add an alert would be a nice thing to do