kbr / fritzconnection

Python-Tool to communicate with the AVM Fritz!Box by the TR-064 protocol and the AHA-HTTP-Interface
MIT License
303 stars 59 forks source link

Trap error on connection to FRITZ!Box 4040 with new 7.27 firmware #116

Closed chemelli74 closed 2 years ago

chemelli74 commented 2 years ago

We have the following report on HA: https://github.com/home-assistant/core/issues/53379

User has a issue during connection: Unable to perform operation. 401 Unauthorized (ERR_NONE)401 UnauthorizedERR_NONEWebserver Fri, 23 Jul 2021 10:48:25 GMT

I think it should be somehow trapped here, instead it goes through until: https://github.com/kbr/fritzconnection/blob/fd8491be936f51d7fd3b89733754e0329c32c425/fritzconnection/core/soaper.py#L139

We should investigate to find a way to raise FritzConnectionException before reaching the above code.

Simone

kbr commented 2 years ago

If the error is reproducible please report the response from the box.

chemelli74 commented 2 years ago

We will work with the user to get more info.

Would you accept a PR with some logging, debug level, to help in the future ?

Simone

kbr commented 2 years ago

Indeed, logging was missing so far. That's a good idea and there is now a new module fritzconnection.core.logger to make debugging more easy.

chemelli74 commented 2 years ago

User found a solution: https://github.com/home-assistant/core/issues/53379#issuecomment-886776498

Simone