Andre0512 / speedport

Home Assistant integration for Telekom Speedport
MIT License
22 stars 6 forks source link

"Unexpected error" #11

Open dimpep opened 7 months ago

dimpep commented 7 months ago

Have a good day and a happy new year. Trying to connect to Greek version of smart 3 always get error "Unexpected error" Router ip is on 192.168.3. and the rest of my network setup including home assistant is on 192.168.1. so I don't know if this could explain the problem. Here is the log. `This error originated from a custom integration.

Logger: custom_components.speedport.config_flow Source: custom_components/speedport/config_flow.py:64 Integration: Speedport (documentation, issues) First occurred: 00:51:55 (9 occurrences) Last logged: 09:30:58

Unexpected exception Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/speedport/connection.py", line 21, in decode ciphertext_tag = bytes.fromhex(data) ^^^^^^^^^^^^^^^^^^^ ValueError: non-hexadecimal number found in fromhex() arg at position 0

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/config/custom_components/speedport/config_flow.py", line 64, in async_step_user info = await validate_input(self.hass, user_input) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/speedport/config_flow.py", line 31, in validate_input speedport = await Speedport( ^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/speedport/speedport.py", line 60, in create await self.update_status() File "/usr/local/lib/python3.11/site-packages/speedport/speedport.py", line 118, in update_status self._status = await self.api.get_status() ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/speedport/api.py", line 116, in get_status return await self.api.get("data/Status.json") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/speedport/connection.py", line 97, in get return decode(await response.text(), key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/speedport/connection.py", line 23, in decode raise exceptions.DecryptionKeyError("Wrong decryption key") from exc speedport.exceptions.DecryptionKeyError: Wrong decryption key `

Thank you for your time

bluechris commented 7 months ago

I have the same error also in the greek provider Cosmote. The router is Smart3 with firmware version 02.10.16 Do we need to open the remote management for the addon to work?

dimpep commented 7 months ago

I don't think so because remote management needs a custom port to be defined but there is no option to select a port to the intergration.Hopefully Andre will come back to this. Ps.Same provider and same fw version with you chris

JanLoebel commented 7 months ago

Same problem here. Provider: Telekom Router: Speedport Smart 4 Typ B Firmware-Version: 010146.3.4.001.0

elvis4444 commented 7 months ago

I'm getting the same error in the logs.

Router: Speedport Smart 3 Firmware-Version: 010137.5.1.001.0 (no new updates available for me)

KHOne23 commented 6 months ago

Same here

Router: Speedport Smart 3 Firmware-Version: 010137.5.1.001.0

Andre0512 commented 6 months ago

Hey, please check if you have a different value for keyArrayDefault in the jquery functions encryptccm() or decryptccm() in your http://speedport.ip/js/jquery-addons.js

For me and many other it looks like this:

var keyArrayDefault = "cdc0cac1280b516e674f0057e4929bca84447cca8425007e33a88a5cf598a190";

so I use it as a static value.

JanLoebel commented 5 months ago

@Andre0512 I've checked and the value is exactly the same:

var keyArrayDefault = "cdc0cac1280b516e674f0057e4929bca84447cca8425007e33a88a5cf598a190";

elvis4444 commented 5 months ago

I’ve checked the values and they are in both functions the same values like yours