home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.17k stars 29.85k forks source link

Airzone integration doesn’t work anymore since 2023.12 #105198

Closed plouf34 closed 9 months ago

plouf34 commented 9 months ago

The problem

Hello Since last HA update 2023.12, Airzone integration doesn’t work anymore.

What version of Home Assistant Core has the issue?

2023.12

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Airzone

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 9 months ago

Hey there @noltari, mind taking a look at this issue as it has been labeled with an integration (airzone) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `airzone` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign airzone` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


airzone documentation airzone source (message by IssueLinks)

matnoublanche commented 9 months ago

Same problem on my side since 2023.12

IMG_6530

matnoublanche commented 9 months ago

Found it !

2023-12-08 08:54:26.411 DEBUG (MainThread) [aioairzone.localapi] aiohttp request: /api/v1/hvac (params={'systemID': 0, 'zoneID': 0}) 2023-12-08 08:54:26.521 ERROR (MainThread) [homeassistant.components.airzone.coordinator] Unexpected error fetching airzone data: 'utf-8' codec can't decode byte 0xe9 in position 924: invalid continuation byte

After removing accented character of concerned room name the integration starts again correctly.

But before 2023.12 the integration worked properly with accented characters.

jd1900 commented 9 months ago

Same here. Also have accents on rooms.

oopptt commented 9 months ago

+1 here. Hope we could have this issue solved soon.

Noltari commented 9 months ago

So far I haven't been able to replicate this on my device. @plouf34 @matnoublanche @jd1900 @oopptt can any of you provide proper and full logs on the error instead of just saying that this is also happening to you? Thanks.

oopptt commented 9 months ago

Yes I can try later to update again and will tell you. The guys above are telling that if you have this kind of room names, for example "HABITACIÓN" (room in spanish), that name makes the integration fail on the start-up, and if they change to "HABITACION" it works properly. I will try to get some logs with the failure and let you know. Thanks for your reply!

Noltari commented 9 months ago

Yes I can try later to update again and will tell you. The guys above are telling that if you have this kind of room names, for example "HABITACIÓN" (room in spanish), that name makes the integration fail, and if they change to "HABITACION" it works properly. I will try to get some logs with the failure and let you know. Thanks for your reply!

Yes, that's exactly what I tried but it doesn't fail on my device.

oopptt commented 9 months ago

In addition, in my case the error appears when migrating from 2023.11.3 to 2023.12.1. Now I rolled back so I will try again later upgrading again so we can compare different things...

Noltari commented 9 months ago

In addition, in my case the error appears when migrating from 2023.11.3 to 2023.12.1. Now I rolled back so I will try again later upgrading again so we can compare different things...

The funny thing is that there were no changes at all on 2023.12 :) https://github.com/home-assistant/core/commits/dev/homeassistant/components/airzone

Bolstein commented 9 months ago

I have the same problem. I have tried changing the invalid characters but it doesn't work.

Debug: 2023-12-11 20:57:17.011 DEBUG (MainThread) [aioairzone.localapi] aiohttp request: /api/v1/hvac (params={'systemID': 0, 'zoneID': 0}) 2023-12-11 20:57:20.072 DEBUG (MainThread) [homeassistant.components.airzone.coordinator] Finished fetching airzone data in 3.061 seconds (success: False) 2023-12-11 20:57:25.543 DEBUG (MainThread) [aioairzone.localapi] aiohttp request: /api/v1/hvac (params={'systemID': 0, 'zoneID': 0}) Captura1

oopptt commented 9 months ago

Hi guys,

just tested again, if I upgrade HA I get these messages during start-up:

2023-12-11 21:49:36.764 INFO (MainThread) [homeassistant.setup] Setting up airzone 2023-12-11 21:49:36.764 INFO (MainThread) [homeassistant.setup] Setup of domain airzone took 0.0 seconds 2023-12-11 21:49:41.441 ERROR (MainThread) [homeassistant.components.airzone.coordinator] Unexpected error fetching airzone data: 'utf-8' codec can't decode byte 0xd3 in position 487: invalid continuation byte File "/usr/src/homeassistant/homeassistant/components/airzone/coordinator.py", line 40, in _async_update_data await self.airzone.update() File "/usr/local/lib/python3.11/site-packages/aioairzone/localapi.py", line 291, in update File "/usr/local/lib/python3.11/site-packages/aioairzone/localapi.py", line 430, in get_hvac File "/usr/local/lib/python3.11/site-packages/aioairzone/localapi.py", line 169, in http_request 2023-12-11 21:49:47.193 ERROR (MainThread) [homeassistant.components.airzone.coordinator] Unexpected error fetching airzone data: 'utf-8' codec can't decode byte 0xd3 in position 487: invalid continuation byte

airzone

But changing the global name of the main entity from "SALÓN" to "SALON" I get the integration working perfectly.

Hope this can help to solve the issue on further releases.

Thanks!

Polosaz commented 9 months ago

In my case, to solve it, in addition to the accents, I had to remove the letters "Ñ"

Noltari commented 9 months ago

So far I haven't been able to reproduce this on my Airzone Flexa device. No matter which characters I've tried, I still don't get any issues... If anyone with the issue is willing to provide local access to their home assistant installation (with terminal addon installed) it would help a lot...

Noltari commented 9 months ago

BTW, can any of you provide the full output of the following command?

curl -v -s --location --request POST "http://$AZ_IP:3000/api/v1/version" -d '{}'

Where AZ_IP is your Airzone device IP address, such as 192.168.1.X

This is what the full output should look like:

$ curl -v -s --location --request POST "http://$AZ_IP:3000/api/v1/version" -d '{}'
*   Trying 192.168.1.25:3000...
* Connected to 192.168.1.25 (192.168.1.25) port 3000 (#0)
> POST /api/v1/version HTTP/1.1
> Host: 192.168.1.25:3000
> User-Agent: curl/7.88.1
> Accept: */*
> Content-Length: 2
> Content-Type: application/x-www-form-urlencoded
>
< HTTP/1.1 200 OK
< Server: Airzone-Webserver
< Connection: close
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Methods: PUT,POST,OPTIONS,DELETE,PATCH
< Content-Type: text/json; charset=UTF-8
< Content-Length: 26
<
{
    "version":  "1.68"
}
* Closing connection 0