Noltari / aioairzone

Python library to control Airzone via Local API
Apache License 2.0
2 stars 0 forks source link

Airzone API "Method not provided or not supported" #2

Open jetblack-nz opened 1 year ago

jetblack-nz commented 1 year ago

Hi there,

I've seen a couple of similar issues logged for home assistant, and you helped them out together with the Airzone developer. Thanks for the great integration btw! So here it goes:

The Home Assistant and Airzone integration worked fine until my Airzone firmware was upgraded late last year to resolve an issue with one of my zones. Not sure what the firmware was before, but since the webserver 3.3.6 is running the local API is reporting an error.

Please let me know if you need anything else, I have enabled debug logging for the integration but since the Airzone API is not responding well, not sure it's useful.

Symptoms:

I have called the Airzone API manually, see here: curl -s --location --request POST "http://10.1.1.236:3000/api/v1/hvac" -d '{"systemID": 127}' | jq { "errors": [ { "error": "Method not provided or not supported" } ] }

Versions: Home Assistant (Docker) 2023.3.6 Frontent 20230309.1

Airzone: Airzone INT Firmware: 7.2.2 Gateway: Daikin Firmware 2.1.1 Webserver Firmware: 3.3.6

jetblack-nz commented 1 year ago

Hi @dev-airzone I've seen your comments on related issues e.g. https://github.com/home-assistant/core/issues/82137 and thought you might be interested in this. Thank you

Noltari commented 1 year ago

Hi @jetblack-nz,

If it's working for some time and then it stops working then I bet that your device needs to be updated to a more recent firmware, so you need to contact Airzone and request them to update your device by providing the MAC address of your device.

jetblack-nz commented 1 year ago

Thank you @Noltari, I have contacted Airzone via email to get this looked at. If you don't mind I keep the issue open and comment any updates from the manufacturer.

Noltari commented 1 year ago

Thank you @Noltari, I have contacted Airzone via email to get this looked at. If you don't mind I keep the issue open and comment any updates from the manufacturer.

Sure, I'll be happy to help if there are any changes required in order to get your device working :)

Noltari commented 1 year ago

@jetblack-nz I'm closing this since it's been over a month and I didn't get any updates from you. So I'm assuming that everything is working as expected now.

jetblack-nz commented 1 year ago

@Noltari sorry for not replying. Airzone provided a short non-answer: "You have the last firmware version available for your hardware. It is not possible to go higher than 3.36 on AZVAFWSCLOUDC" and "The problem with the API integrations is that they use more and more memory on logs and more frequent pooling because the new hardware can handle it, but with previous hardware with less memory on the PCB, the frequent pool block the API service when the physical memory is full."

I will dig further into this, as the older firmware worked fine.

Is there a chance to configure the polling interval for your custom component? I don't need real-time data, just the temperature sensors would be great to update every hour or so...

Noltari commented 1 year ago

@Noltari sorry for not replying. Airzone provided a short non-answer: "You have the last firmware version available for your hardware. It is not possible to go higher than 3.36 on AZVAFWSCLOUDC" and "The problem with the API integrations is that they use more and more memory on logs and more frequent pooling because the new hardware can handle it, but with previous hardware with less memory on the PCB, the frequent pool block the API service when the physical memory is full."

This sounds to me like something is leaking memory or not optimized at all, since it works fine for some hours and then it doesn't...

I will dig further into this, as the older firmware worked fine.

Exactly, it makes no sense that the older firmware worked and the new doesn't...

Is there a chance to configure the polling interval for your custom component? I don't need real-time data, just the temperature sensors would be great to update every hour or so...

I've checked and there's nothing in the API documentation stating the minimum delay between polls... And based on my experience and the information that you provided is likely that even incrementing the scan interval will trigger the same behaviour... I will try to contact Airzone about this to get feedback from them about a proper scan interval for older devices, how to identify them and maybe even try to make the scan interval configurable from Home Assistant...

Noltari commented 1 year ago

@jetblack-nz please, extract this to your custom_components folder and restart Home Assistant. It's the same integration source code but with a scan interval of 10 minutes and 30 minutes instead of 60 seconds. airzone-2023.6.1-10m.zip airzone-2023.6.1-30m.zip

jetblack-nz commented 1 year ago

@Noltari thanks for that, I will install it on the weekend and test it out.

Noltari commented 1 year ago

@Noltari thanks for that, I will install it on the weekend and test it out.

@jetblack-nz I reported this issue to Airzone and they are investigating it. Did the higher scan interval help?

jetblack-nz commented 1 year ago

@Noltari it looks like the Airzone system holds on for a bit longer with the updated scan intervals, but it eventually fails. Usually after 6-12 hours.

Just making sure I have your component updated correctly, is there something specific in the logs that show that? After the HA restart it only includes below. Thank you

[homeassistant.loader] We found a custom integration airzone 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'

Noltari commented 1 year ago

@Noltari it looks like the Airzone system holds on for a bit longer with the updated scan intervals, but it eventually fails. Usually after 6-12 hours.

But, 6-12h is still a pretty short interval... Taking into account that we bumped the scan interval from 1 min to 1 hour, it should take a lot more time than that to fail if it was due to API requests consuming too much resources...

How long does it take to fail with the standard scan interval?

Just making sure I have your component updated correctly, is there something specific in the logs that show that? After the HA restart it only includes below. Thank you

[homeassistant.loader] We found a custom integration airzone 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'

Yes, that indicates that you installed a custom component, so you're using the modified version.

jetblack-nz commented 1 year ago

How long does it take to fail with the standard scan interval?

It took about 3 hours for the API to stop responding with the standard scan interval.

I haven't had a lot of time to look into this, but I made sure that your custom code with the 30 min scan interval is installed. The Airzone system is not resetting as usual when I do a refresh via the app, or a change of network settings on the wall controller itself. When I get a chance I'll cut the power to the whole aircon completely, that should do the trick.

Noltari commented 6 days ago

@jetblack-nz you may want to take a look at https://github.com/Noltari/aioairzone/issues/8 and Maybe your device is also suffering the segmented HTTP body and header issue...

jetblack-nz commented 5 days ago

Much appreciated @Noltari to notify me. I will try the updated version and see if it helps.