max13fr / Airzonecloud-HomeAssistant

Airzone Cloud plugin for Home Assistant
MIT License
28 stars 15 forks source link

Airzonecloud error #21

Closed ukrolelo closed 2 years ago

ukrolelo commented 2 years ago

422 Client Error: Unprocessable Entity for url: https://m.airzonecloud.com/api/v1/devices/xxxxxx/status/?installation_id=xxxxxxx&format=json

If i click the link,it shows: {"message":"Unauthorized"}

If i go manualy to website m.airozonecloud.com and login with same credentials everything works fine

marcgarciamarti commented 2 years ago

My system can't log into the cloud either. I see the same error message and I see this in the logs

Logger: custom_components.airzonecloud_backup.climate
Source: custom_components/airzonecloud_backup/climate.py:47 
Integration: airzonecloud_backup 
First occurred: 20:07:44 (1 occurrences) 
Last logged: 20:07:44

Unable to login to AirzoneCloud

If I use the same credentials in the iphone app, I can access the service just fine.

Thanks

max13fr commented 2 years ago

You need to upgrade this component to the last version v1.1.1. Just replace all files in custom_components/airzonecloud/ with the new ones and restart your home assistant.

Max

marcgarciamarti commented 2 years ago

You need to upgrade this component to the last version v1.1.1. Just replace all files in custom_components/airzonecloud/ with the new ones and restart your home assistant.

Max

But I did that already... mmmm, let me do it again.

max13fr commented 2 years ago

If you manually installed the airzonecloud python library, you should also upgrade it (with pip3 for example), or just drop it as home assistant automatically install dependencies from manifest.json

marcgarciamarti commented 2 years ago

If you manually installed the airzonecloud python library, you should also upgrade it (with pip3 for example), or just drop it as home assistant automatically install dependencies from manifest.json

Hi @max13fr, I had the previous version running just fine for months and after Airzone upgraded their backend, I haven't done a thing. Today I simply cloned the repo and made sure that the file structure matches what is indicated in the instructions

configuration.yaml
custom_components/
airzonecloud/
__init__.py
climate.py
const.py
manifest.py

I'm sorry but I'm not sure I understand what you are saying in regards to airzone cloud python library. I'm running home assistant Supervised, just in case that makes a difference.

ukrolelo commented 2 years ago

Same here but hass os,i downloaded custom components as i did last time. I have no idea what to pip and where to do it :O

max13fr commented 2 years ago

Really strange, in the manifest.json can you confirm you have this line ?

 "requirements": ["AirzoneCloud==1.1.1"]

Can you show the result of this command through ssh :

pip3 show  AirzoneCloud
max13fr commented 2 years ago

According to the faq, can you also looks for airzonecloud errors in home assistant log after restarting ? (between restart log and your errors above)

https://www.home-assistant.io/faq#problems-with-dependencies

ukrolelo commented 2 years ago

@max13fr 1. "requirements": ["AirzoneCloud==1.1.1"] Confirmed 2. ➜ ~ pip3 show airzonecloud WARNING: Package(s) not found: airzonecloud ➜ ~ pip3 show AirzoneCloud WARNING: Package(s) not found: AirzoneCloud ➜ ~ 3. 2021-12-20 08:45:51 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration airzonecloud which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2021-12-20 08:45:57 ERROR (SyncWorker_0) [AirzoneCloud.AirzoneCloud] {"_id":"deviceNotFound","msg":"No device found","reqId":"xxxxxxxxxxx#yyyyyyyy"} 2021-12-20 08:45:57 ERROR (SyncWorker_0) [custom_components.airzonecloud.climate] 422 Client Error: Unprocessable Entity for url: https://m.airzonecloud.com/api/v1/devices/xxxxxxxxxxxxx/status/?installation_id=yyyyyyyyyyyy&format=json 4. This error originated from a custom integration.

Logger: custom_components.airzonecloud.climate Source: custom_components/airzonecloud/climate.py:47 Integration: airzonecloud (documentation, issues) First occurred: 8:45:57 AM (1 occurrences) Last logged: 8:45:57 AM

422 Client Error: Unprocessable Entity for url: https://m.airzonecloud.com/api/v1/devices/xxxxxxxxxx/status/?installation_id=yyyyyyyyyyyyyy&format=json

Logger: AirzoneCloud.AirzoneCloud Source: /usr/local/lib/python3.9/site-packages/AirzoneCloud/AirzoneCloud.py:292 First occurred: 8:45:57 AM (1 occurrences) Last logged: 8:45:57 AM

{"_id":"deviceNotFound","msg":"No device found","reqId":"xxxxxxxx#yyyyy"}

ukrolelo commented 2 years ago

Portainer homeassistant shell: bash-5.1# pip3 show airzonecloud Name: AirzoneCloud Version: 1.1.1 Summary: Python3 library for Airzone Cloud API Home-page: https://github.com/max13fr/AirzoneCloud Author: max13fr Author-email: max13fr@yozo.fr License: UNKNOWN Location: /usr/local/lib/python3.9/site-packages Requires: requests Required-by:

ukrolelo commented 2 years ago

@max13fr Idk if its important but in reqid is a hash sign # and some numbers afterwards. From what i can see in manual it should be only numbers, no?

ukrolelo commented 2 years ago

I tested the airzonecloud(not home assistant) from a different machine,directly from python script and the result is the same with error

ukrolelo commented 2 years ago

I have also tested few other integration even the local one but unfortunatly its also not working. Tech support from airzone confirmed that all should be okay. I have sended them the screenshot from postman reguarding local API usage,why its not working. But for me the cloud one was better. So the error still persist on this aizonecloud-homeassistant

max13fr commented 2 years ago

Seems like a specific case on your hardware.

Can you send your login and a temporary password that I can try and debug directly ?

ukrolelo commented 2 years ago

@max13fr I sended you airzonecloud invitation. Thank you. P.S. please dont turn on/off heating/cooling randomly :D <3

max13fr commented 2 years ago

Thanks for the invitation, I found the issue.

Can you upgrade to the new v1.1.2 and retry it ? Should be good.

(you can drop my access to your system)

Max

ukrolelo commented 2 years ago

omg now that was fast let me try xD

ukrolelo commented 2 years ago

@max13fr Thank you MAX !!! Its working. God bless! Take care ! much <3

max13fr commented 2 years ago

Your welcome :)

marcgarciamarti commented 2 years ago

hi @max13fr,

I just upgraded my version to 1.1.2 and it still is not working for me. This is the information that I see

Este error se originó a partir de una integración personalizada.

Logger: custom_components.airzonecloud_backup.climate
Source: custom_components/airzonecloud_backup/climate.py:47
Integration: airzonecloud_backup
First occurred: 23:04:58 (1 occurrences)
Last logged: 23:04:58

Unable to login to AirzoneCloud

and

2021-12-21 23:04:58 ERROR (SyncWorker_7) [custom_components.airzonecloud_backup.climate] Unable to login to AirzoneCloud

could you please let me know how I could provide further more verbose loggin?

could I give you access to my endpoint too?

thank you!!!

ukrolelo commented 2 years ago

@marcgarciamarti Ehm, can you tell me why your folder is named airzonecloud_backup ? :> Should it be only airzonecloud? If you have it in configuration.yaml ?

marcgarciamarti commented 2 years ago

@marcgarciamarti Ehm, can you tell me why your folder is named airzonecloud_backup ? :>

Should it be only airzonecloud? If you have it in configuration.yaml ?

That is the previous working installation. I cloned the folder and appended "backup" because I thought it did not case any arm. Should I delete that folder? I've followed the instructions and I have the right folder structure, as per the instructions page.

ukrolelo commented 2 years ago

@marcgarciamarti Ehm, can you tell me why your folder is named airzonecloud_backup ? :> Should it be only airzonecloud? If you have it in configuration.yaml ?

That is the previous working installation. I cloned the folder and appended "backup" because I thought it did not case any arm. Should I delete that folder? I've followed the instructions and I have the right folder structure, as per the instructions page.

Yes! :>

marcgarciamarti commented 2 years ago

@marcgarciamarti Ehm, can you tell me why your folder is named airzonecloud_backup ? :> Should it be only airzonecloud? If you have it in configuration.yaml ?

That is the previous working installation. I cloned the folder and appended "backup" because I thought it did not case any arm. Should I delete that folder? I've followed the instructions and I have the right folder structure, as per the instructions page.

Yes! :>

aaaaaaand, you hit the nail right on its head! I removed that folder and it started working automagically! thanks man!

ukrolelo commented 2 years ago

@marcgarciamarti <3