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

'utf-8' codec can't decode byte #20

Open
MichaelMeyersGit opened this issue Jun 1, 2024 · 1 comment
Open

'utf-8' codec can't decode byte #20

MichaelMeyersGit opened this issue Jun 1, 2024 · 1 comment

Comments

@MichaelMeyersGit
Copy link

hello,

I am using the ricso integration for Home Assistant and can see the following error in my logs

cmd_id, command, crc = await self._read_command()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyrisco/local/risco_socket.py", line 123, in _read_command
return self._crypt.decode(buffer)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyrisco/local/risco_crypt.py", line 47, in decode
decrypted = decrypted_chars.decode(self._encoding)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfc in position 14: invalid start byte

It seems to be that this issue is related with German special characters.

In the home assistant overview I can see only that sensors which do not have german special characters in the name (label)

For example I can see the sensor with the name "Fenster WZ" (window living room) but I cannot see the sensor with the name "Tür WZ" (door living room).

The special characters are ä, ö and ü.

I am using the local integration. My panel is RW132-3.90

@OnFreund
Copy link
Owner

OnFreund commented Jan 1, 2025

That's interesting. Do you know what is the right encoding? Can you try running PyRisco with it (utf-8 is the default, but you can pass in a different one).

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

2 participants