Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Unexpected error" #11

Open
dimpep opened this issue Jan 3, 2024 · 9 comments
Open

"Unexpected error" #11

dimpep opened this issue Jan 3, 2024 · 9 comments

Comments

@dimpep
Copy link

dimpep commented Jan 3, 2024

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
Copy link

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
Copy link
Author

dimpep commented Jan 3, 2024

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
Copy link

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

@elvis4444
Copy link

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
Copy link

KHOne23 commented Jan 30, 2024

Same here

Router: Speedport Smart 3
Firmware-Version: 010137.5.1.001.0

@Andre0512
Copy link
Owner

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
Copy link

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

var keyArrayDefault = "cdc0cac1280b516e674f0057e4929bca84447cca8425007e33a88a5cf598a190";

@elvis4444
Copy link

elvis4444 commented Feb 19, 2024

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

@sauron3256
Copy link

Any progress on this matter? I get the same error trying to connect to the Greek version of the Smart 3, fw version 02.10.34.

This error originated from a custom integration.

Logger: custom_components.speedport.config_flow
Source: custom_components/speedport/config_flow.py:65
integration: Speedport (documentation, issues)
First occurred: October 27, 2024 at 11:21:54 PM (10 occurrences)
Last logged: 12:19:32 AM

Unexpected exception
Traceback (most recent call last):
File "/usr/local/lib/python3.12/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 65, in async_step_user
info = await validate_input(self.hass, user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/speedport/config_flow.py", line 32, in validate_input
speedport = await Speedport(
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/speedport/speedport.py", line 60, in create
await self.update_status()
File "/usr/local/lib/python3.12/site-packages/speedport/speedport.py", line 118, in update_status
self._status = await self.api.get_status()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/speedport/api.py", line 116, in get_status
return await self.api.get("data/Status.json")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/speedport/connection.py", line 105, in get
return decode(await response.text(), key=key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/speedport/connection.py", line 23, in decode
raise exceptions.DecryptionKeyError("Wrong decryption key") from exc
speedport.exceptions.DecryptionKeyError: Wrong decryption key

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants