fjhorrillo / homebridge-airzone-cloud

Homebridge Airzone Cloud
Apache License 2.0
22 stars 3 forks source link

homebridge airzone cloud not working since new airzone app released #13

Closed jmellad closed 3 years ago

jmellad commented 3 years ago

Describe The Bug: Hi there, since airzone launched the new version of the app it gives me this error when initializing homebridge.

Unable to login to AirzoneCloud. Request: {"url":"https://www.airzonecloud.com/users/sign_in","method":"POST","mode":"cors","headers":{"Content-Type":"application/json;charset=utf-8","User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Safari/605.1.15"},"body":"{\"email\":\"*@**.\",\"password\":\"****\"}"} {"size":0,"timeout":0}

[25/08/2021, 11:57:23] [AirzoneCloud] Error calling to AirzoneCloud. Status: 401 Unauthorized [25/08/2021, 11:57:23] [AirzoneCloud] Unable to load devices from AirzoneCloud TypeError: Cannot read property 'device_relations' of undefined at AirzoneCloud._get_device_relations (/usr/local/lib/node_modules/homebridge-airzone-cloud/src/AirzoneCloud/AirzoneCloud.ts:166:21) at processTicksAndRejections (internal/process/task_queues.js:93:5) at AirzoneCloud._load_devices (/usr/local/lib/node_modules/homebridge-airzone-cloud/src/AirzoneCloud/AirzoneCloud.ts:138:37) at Function.createAirzoneCloud (/usr/local/lib/node_modules/homebridge-airzone-cloud/src/AirzoneCloud/AirzoneCloud.ts:54:5) at AirzoneCloudHomebridgePlatform.discoverDevices (/usr/local/lib/node_modules/homebridge-airzone-cloud/src/platform.ts:114:25)

Expected behavior: Before the update it worked correctly

Plugin Config:


Show your Homebridge config.json here, remove any sensitive information.

{
    "name": "AirzoneCloud",
    "system": "https://www.airzonecloud.com",
    "login": {
        "email": "***********",
        "password": "*******************"
    },
    "debug": false,
    "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Safari/605.1.15",
    "platform": "AirzoneCloud",
    "_bridge": {
        "username": "*********",
        "port": *******
    }
}

**Screenshots:**
<!-- If applicable, add screenshots to help explain your problem. -->

**Environment:**

* **Plugin Version**: 0.1.5
* **Homebridge Version**: 1.3.4
* **Node.js Version**: 14.15.5
* **NPM Version**: 7.5.4
* **Operating System**: Raspbian

<!-- Click the "Preview" tab before you submit to ensure the formatting is correct. -->
BLRPERES commented 3 years ago

New url since Airzone updated their servers

this plugin needs to be rewrited to match the new api (as far as I know nobody has this new api)

fjhorrillo commented 3 years ago

Hello @jmellad, I’m working on it for next version 0.2.0, please follow it over bug #10