weltmeyer / ha_sonnenbatterie

Homeassistant integration to show many stats of Sonnenbatterie
GNU General Public License v3.0
56 stars 28 forks source link

Unauthorized for url: http://192.168.10.209/api/session #8

Closed emign closed 2 years ago

emign commented 2 years ago

Hey,

I try to set this up with my ECO 8 but I cannot even login. The password is def. correct (see GIF). I also tried "User" as user, but that offers the same result

screencast 2021-10-17 21-19-13

This error originated from a custom integration.

Logger: custom_components.sonnenbatterie
Source: custom_components/sonnenbatterie/config_flow.py:50 
Integration: sonnenbatterie (documentation) 
First occurred: 9:02:06 PM (6 occurrences) 
Last logged: 9:12:53 PM

Unable to connect to sonnenbatterie: Traceback (most recent call last): File "/config/custom_components/sonnenbatterie/config_flow.py", line 42, in async_step_user sonnenInst=await self.hass.async_add_executor_job(_internal_setup,username,password,ipaddress); File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/sonnenbatterie/config_flow.py", line 41, in _internal_setup return sonnenbatterie(_username,_password,_ipaddress) File "/usr/local/lib/python3.9/site-packages/sonnenbatterie/sonnenbatterie.py", line 10, in __init__ self._login() File "/usr/local/lib/python3.9/site-packages/sonnenbatterie/sonnenbatterie.py", line 24, in _login getsession.raise_for_status() File "/usr/local/lib/python3.9/site-packages/requests/models.py", line 953, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: http://192.168.10.209/api/session
weltmeyer commented 2 years ago

Can you check, if the login to "http://192.168.10.209/dash/login" is working for you? Also.. my Installer Password seems to differ from the one u used.

emign commented 2 years ago

oooooohh. Thats a different dashboard than http://192.168.10.209:8080/login my password does NOT work on your dashboard. What is the password for that dashboard? :)

weltmeyer commented 2 years ago

You could try "User" and "sonnenUser3552"

emign commented 2 years ago

That works. But only shows a subset of relevant values. The installer password is the same for all too I think

weltmeyer commented 2 years ago

That works. But only shows a subset of relevant values. The installer password is the same for all too I think

Yes, it seems to be. I can't share it as i dont want to be responsible if anything bad happens with your batterie. You may get it from your electrician(who installed the batterie) or you could maybe find it somewhere on the internet.

I also only use the user login for the integration.