planbnet/livisi_unofficial

Login Error with Livisi Unofficial Integration

Closed this issue · 1 comments

System Health details

Versions Used:

Livisi Unofficial Integration: Version 1.10.0 and 1.11.0
Home Assistant: Latest Version
Hardware: Raspberry Pi 4
SHC: SHC Classic Generation 1 Central Unit

Checklist

  • I have enabled debug logging for my installation.
  • I have filled out the issue template to the best of my ability.
  • This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
  • This issue is not a duplicate issue of currently previous issues..

Describe the issue

I encounter an error in all use cases when entering the IP and password for the Livisi Unofficial Integration

Expected Behavior:
The Livisi Unofficial Integration should allow a successful login when the IP and password are entered.

Actual Behavior:
The login fails in all the described use cases.

Reproduction steps

  1. The official Livisi integration was installed. Then I tried to install the unofficial integration and complete the migration. Login failed.

  2. Deleted everything and retried the official integration. Login works without issues. Then tried the unofficial integration again and encountered a login error (token problem from log file).

  3. Deleted everything again and tried installing the unofficial integration from scratch without the previous official Livisi integration. Encountered the same error again.

Debug logs

Here is an excerpt from the log file describing the error:

2024-05-28 16:50:04.233 ERROR (MainThread) [custom_components.livisi] 'access_token'
  File "/config/custom_components/livisi/__init__.py", line 106, in async_migrate_entry
  File "/config/custom_components/livisi/coordinator.py", line 61, in async_setup
    self.aiolivisi = await livisi_connect(
  File "/config/custom_components/livisi/livisi_connector.py", line 40, in connect
  File "/config/custom_components/livisi/livisi_connector.py", line 68, in connect
  File "/config/custom_components/livisi/livisi_connector.py", line 144, in _async_retrieve_token
KeyError: 'access_token'

Diagnostics dump

No response

This is caused be a non-iso-latin-1 char in the password. I have no idea which encoding livisi expects - I tried multiple combinations but the SHC does not seem to adhere to the Content-Type header. I'm simply giving up here, with the workaround to change the password.