core
core copied to clipboard
Ambiclimate - Doesn't work
The problem
From the middle of August Ambiclimate integration started to work weird and most of the commands and entities don't work properly. I can start a climate entity but I cannot stop it. I get a lot of strange errors in the log. It does't look it is a HA Core problem because this problem started while I was on vacation and so I didn't do any update. I updated HA only today to see if it could fix the issue but it doesn't.
What version of Home Assistant Core has the issue?
2022.8.6
What was the last working version of Home Assistant Core?
2022.7.*
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Ambiclimate
Link to integration documentation on our website
https://www.home-assistant.io/integrations/ambiclimate/
Diagnostics information
No diagnostic info for this integration
Example YAML snippet
No response
Anything in the logs that might be useful for us?
2022-08-21 10:33:27.261 ERROR (MainThread) [ambiclimate] <!DOCTYPE html>
<html lang="en-US">
<head>
<title>Just a moment...</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta name="robots" content="noindex,nofollow" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<link href="/cdn-cgi/styles/cf-errors.css" rel="stylesheet" />
<script>
(function(){
window._cf_chl_opt={
cvId: '2',
cType: 'managed',
cNounce: '60774',
cRay: '73e206214fe3baff',
cHash: 'c0cbeb46332af1d',
cUPMDTk: "\/api\/v1\/device\/sensor\/humidity?room_name=Studio&location_name=Casa&__cf_chl_tk=9Gjn5o2WJcXEqfZnVMAueAa_7LV8oi2DjVwjVOmzJBU-1661070807-0-gaNycGzNB1E",
cFPWv: 'g',
cTTimeMs: '1000',
cTplV: 3,
cRq: {
ru: 'aHR0cHM6Ly9hcGkuYW1iaWNsaW1hdGUuY29tL2FwaS92MS9kZXZpY2Uvc2Vuc29yL2h1bWlkaXR5P3Jvb21fbmFtZT1TdHVkaW8mbG9jYXRpb25fbmFtZT1DYXNh',
ra: 'SG9tZUFzc2lzdGFudC8yMDIyLjguNiBhaW9odHRwLzMuOC4xIFB5dGhvbi8zLjEw',
rm: 'R0VU',
d: '6vr0JTjQQ4XqXHRXiDzE+x8K3FH8KbQhnMLJMxD1XRHN+hR5AYqdMxpqjqi97QrmImd7KBbKPal2TWBBCO6htVyh8xu1PkbK39cU0yXt3yEvp19wUrwnze1U1an4aPVEYlcgCNCnfPJhz5PR1XoiIREvgZWeBF4Ee4sUVjlmJtF2l5txUlyZR0bp8YMs2wJvmA2FMijg3x76U5QTMK9VyFFzs6JcbUgj98LroXgx9zMlJMVqucKVNAgYJNSqiNG/hoHVFI8yBWcaLeOFMylJD+qG3kvcvRxwQjpevL8gO3mjNbnEqBNJWJ2uJ0FN0YDM8XT/M1GGVDvMvMfh7GpD8OlT+bOMj84OiGuwC+1L0LpsliEtT0r3Yi7ZxiTXC/wIDNQpW0GyAuf7pto3jZBscEFFJqh7sQSGNauH4KvfCBroIy/uOqxDJCODf0ttrMjvmT4eXM9Ef9shSwHTd6lNmMmcPAXoPp0FURM0GMPJTT6ChCH1AzHkRwJUzVy+V1X6q2Q3qj1Wgsscn6lns4tZTE2NrRFpZDUYOmKkINigX0p5fpCu3oAYt45TEKh+tOKfoDtcEj1XePnLx8RDy9UD8hItpP/PM2SEkfhA0x0NbFxuerlBkoLXis9a5/stwy+1RmsEIyKNW6QOKO78tiEqdw==',
t: 'MTY2MTA3MDgwNy4yNDgwMDA=',
m: 'rIw2etaT26/7aiq8I1ZL0EJhc7mbiJbdovcPEpKP4lU=',
i1: 'R8Su60NZGbywqzjCNlfRJw==',
i2: 'MwDSa9S+KSDoA/0Vt/xPaA==',
zh: 'LwR1M7B9KkpclJ+f00KJ6ebN95wzUk448XI8VN48eSE=',
uh: '/onJMSOjLY7c/2GLHBVH5Yi9KK0SCy7Sep/sB7bqGWA=',
hh: '9c4M45osrP2kdjZ1D5KQDUlf5o3sLeyqBiJvHgsKQQE=',
}
}
window._cf_chl_enter = function(){window._cf_chl_opt.p=1};
})();
</script>
</head>
<body class="no-js">
<div class="main-wrapper" role="main">
<div class="main-content">
<h1 class="zone-name-title h1">
<img class="heading-favicon" src="/favicon.ico"
onerror="this.onerror=null;this.parentNode.removeChild(this)" />
api.ambiclimate.com
</h1>
<h2 class="h2" id="cf-challenge-running">
Checking if the site connection is secure
</h2>
<noscript>
<div id="cf-challenge-error-title">
<div class="h2">
<span class="icon-wrapper">
<div class="heading-icon warning-icon"></div>
</span>
<span id="cf-challenge-error-text">
Enable JavaScript and cookies to continue
</span>
</div>
</div>
</noscript>
<div id="trk_jschal_js" style="display:none;background-image:url('/cdn-cgi/images/trace/managed/nojs/transparent.gif?ray=73e206214fe3baff')"></div>
<div id="cf-challenge-body-text" class="core-msg spacer">
api.ambiclimate.com needs to review the security of your connection before
proceeding.
</div>
<form id="challenge-form" action="/api/v1/device/sensor/humidity?room_name=Studio&location_name=Casa&__cf_chl_f_tk=9Gjn5o2WJcXEqfZnVMAueAa_7LV8oi2DjVwjVOmzJBU-1661070807-0-gaNycGzNB1E" method="POST" enctype="application/x-www-form-urlencoded">
<input type="hidden" name="md" value="upf8GbILrCJiAJWydkzybqgn1riQlXYAeSZX8lhPlsQ-1661070807-0-AX76tuNpzgtTPPRk6AcHFbyYw5AsGnvw_Tc-pdzZ41t4z8D34qgWAPBjfpZmm_JMQ-S-cFwGxnAQ8EI5-NPDEk9HlsYy7xafNNuqIBLtK9sHJERCVN61oeh84Gy1JqWspvSWbf6m-_2Prqq9NlTgYquVhoF3f-as6db-Pc1xLi9tMO6zCEpzPaH0WYQZD36tOBfiwBhETu4VPycW3MY27G1VguDmaJ3us6joIsXKLXMwTetVjWdGwz3ETxVq5AuRCH3RJaAXs8GZFSfrJbK8LZUYXZJRJYyH9DKNjNSmWVGRjSSoslmkL_95M4WuuOCAjVuShCQ6RiCHbxfVNG6Tp1r9fUlD8TWYHjpuLbASCetvR1hAiFoAysFzzg348gPUPRMDeAyNW201f5rK9jOqxbVY83ZT_kqsyFayQx_oxcbqO6p92RuGgLS35YXoEl1vFj-UQoRj8cxjF4FDKxoSHpKyQsKiIs2ebTOOWIHbiUUUV2BwBJ755dMMNys8hgMFdw2ZUesP-IztF8ANAuc8KZdn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rTQjHCRrzwjim0oOJ+pBKWwkxZfIXOgkbEjs="/>
</form>
</div>
</div>
<script>
(function(){
var trkjs = document.createElement('img');
trkjs.setAttribute('src', '/cdn-cgi/images/trace/managed/js/transparent.gif?ray=73e206214fe3baff');
trkjs.setAttribute('style', 'display: none');
document.body.appendChild(trkjs);
var cpo = document.createElement('script');
cpo.src = '/cdn-cgi/challenge-platform/h/g/orchestrate/managed/v1?ray=73e206214fe3baff';
window._cf_chl_opt.cOgUHash = location.hash === '' && location.href.indexOf('#') !== -1 ? '#' : location.hash;
window._cf_chl_opt.cOgUQuery = location.search === '' && location.href.slice(0, -window._cf_chl_opt.cOgUHash.length).indexOf('?') !== -1 ? '?' : location.search;
if (window.history && window.history.replaceState) {
var ogU = location.pathname + window._cf_chl_opt.cOgUQuery + window._cf_chl_opt.cOgUHash;
history.replaceState(null, null, "\/api\/v1\/device\/sensor\/humidity?room_name=Studio&location_name=Casa&__cf_chl_rt_tk=9Gjn5o2WJcXEqfZnVMAueAa_7LV8oi2DjVwjVOmzJBU-1661070807-0-gaNycGzNB1E" + window._cf_chl_opt.cOgUHash);
cpo.onload = function() {
history.replaceState(null, null, ogU);
};
}
document.getElementsByTagName('head')[0].appendChild(cpo);
}());
</script>
<div class="footer" role="contentinfo">
<div class="footer-inner">
<div class="clearfix diagnostic-wrapper">
<div class="ray-id">Ray ID: <code>73e206214fe3baff</code></div>
</div>
<div class="text-center">
Performance & security by
<a rel="noopener noreferrer" href="https://www.cloudflare.com?utm_source=challenge&utm_campaign=m" target="_blank">Cloudflare</a>
</div>
</div>
</div>
</body>
</html>
2022-08-21 10:33:27.262 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.studio fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 514, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 709, in async_device_update
raise exc
File "/usr/src/homeassistant/homeassistant/components/ambiclimate/climate.py", line 192, in async_update
data = await self._heater.update_device()
File "/usr/local/lib/python3.10/site-packages/ambiclimate/__init__.py", line 281, in update_device
humidity = await self.get_sensor_humidity()
File "/usr/local/lib/python3.10/site-packages/ambiclimate/__init__.py", line 192, in get_sensor_humidity
val = res[0].get('value')
TypeError: 'NoneType' object is not subscriptable
Additional information
If you need more info please let me know. I have 5 Ambiclimate devices.
ambiclimate documentation ambiclimate source (message by IssueLinks)
Hey there @danielhiversen, mind taking a look at this issue as it has been labeled with an integration (ambiclimate
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
I'm having similar problems as well (I also have 5 Ambiclimates). Although I started having issues back in April or May with the current version of Home Assistant at the time, where the Ambiclimate integration would fail. Sometimes if I restored a previous night's backup (even though nothing had changed), it would start working again. But it's been intermittently failing for a few months. As of a couple weeks ago, it pretty much completely stopped working.
I tried completely removing the application that was created in api.ambiclimate.com and creating a new one, removing and trying to re-install the Ambiclimate integration but now I can't even get the integration installed.
Hi @GJSchroeder, did you check you logs to see if you get the same errors as mine?
Hi @antivirus68 ,
Unfortunately I don't have the old logs anymore, and since I so far haven't been able to get the integration re-installed I don't have anything Ambiclimate related in the current logs. However, I do recall that the more recent errors I was getting in August had the same as the start of your log, " ERROR (MainThread) [ambiclimate] ".
I did some more testing on ambiclimate rest api using curl commands outside home assistant. I got the same messages and the code:
429 HTTP status code
Which means that I exceed the calls limits. Since I have 5 devices I guess ambiclimate integration does too many calls in a 10 minute range.
If I remove ambiclimate integration and wait few minutes, than I can execute the curl commands outside home assistant fine.
This issue gives problem also when I try to add the ambiclimate integration again, Infact it adds only one of the five devices since it start to get the error very soon.
Is it possible to delay the ambiclimate config flow process and then the polling calls?
The following statement comes from Ambiclimate site:
Standard API rate limits per window
The following table shows the settings for each endpoint.
/login
POST
20 access within 600 seconds. Per-user.
/oauth2/token
GET, POST
10 access within 600 seconds. Per-OAuth-client.
This limit is shared by both token creation and refresh.
Please @Danielhiversen let me know if you need some more info or I can do some other tests.
I'm having similar error in the log. It can show up to a few hundred a day. I have 2 ambiclimates and used the integration to create an automation to automatically switch to Comfort Mode when certain temperature in the room reach after I turned ON the AC using remote controller and it seem to be still working.
Hi @frenck ,
sorry to bother you. Do you know if this integration is still supported? Because I didn't have any feedback from the code owner.
Bye Marco
Same here. 2 devices. It happens since some months, but deleting the integration and activating it back was used to work, at least partially (sometimes only 1 device was up, sometimes both). Now it doesn't work anymore. I get the same html response as antivirus68. From Nodered authentication and token refresh seem working
Same. Cloudflare (protecting Ambi server) has blocked the traffic.
I gave up on this integration and switched to websockets with IFTTT and Ambi. Not ideal as have to pay for IFTTT, it's another cloud service I'd like to avoid, and it's not as functional as the native Ambi integration but it gives me the basics of on/off/comfort mode that I need. When you live in a tropical environment, having the aircons work reliably is a must! :)
I can help making a new integration, but I don't think the current issue is due to the existing integration, but Ambi Climate.
"api.ambiclimate.com needs to review the security of your connection before proceeding."
I suggest all of us, Ambi Climate users, should send Ambi an email mentioning this.
I have just got a reply from Ambi.
Hi there,
Sorry to hear that you are getting the captcha response.
You would get this when your script reaches the maximum API request limit.
To avoid getting the captcha response, we suggest requesting data using the API every 30 seconds (or longer), since the sensor data from any Ambi Climate device updates every 30 seconds.
Sincerely,
Donnie
I have not checked yet, but I belive there should be a call limit implemented onto this HA integration?
Me too. I'm not sure it makes completely sense because at the moment I have 1 device OK and 1 not OK, but my raspberry restart every day at 5:30 am and the log messages start to appear in that exact moment.
So, I'm a bit confused
I have some news from Ambiclimate that I contacted few weeks ago. They answer me, quote:
"We have confirmed that the current rate limit is 5 calls per minute and we understand that this may not be enough especially for users with multiple devices.
We have imposed this rate limit to optimize the services for now while we improve our OpenAPI infrastructure. "
I don't know when they started to set this rate limit but I guess that the current integration does not comply with this, very strict, limit.
Let's hope they will change this in the future. In the meantime I don't know what we can do about it. Expecially because it looks like the mantainer of this integration is not working on it anymore.
Thanks for the update, antivirus68. I don't know who is responsible for the polling: HA or the integration? (As a happy user, I know how to get results but don't know why they get out of the programming). If it were HA, any chance to manage the polling time? (I vaguely remember of an old update that would allow such a thing; but I'm old and my memory is going broken)
Minor note on this... for a workaround of hitting their rate limit do this.
Go to homeassistant Integrations Enter the ambiclimate integration "system options" DISABLE cloud polling. This will make it so homeassistant does not automatically poll all your Ambi devices once per minute.
Make a new automation with a "time pattern trigger". Set to 5 - 10 minutes or whatever you feel like. Add an action: "Home assistant core" update entity. Then pick your ambiclimate entity. Should be "climate.<WHATEVER>". where WHATEVER is the name of your Ambi.
Now your Ambi devices will update much less than the rate limit and you will be able to use this integration again. This integration should probably be fixed NOT to use homeassistant's default of once every 60 seconds, because if you have more than one Ambi you are already over the rate limit.
Thanks for the suggestion, I didn't know that.
But unfortunately even this workaround does not work because this rate limits affect the integration setup and so I don't get any device to update.
Getting the same problem on 2023.1.1 still.
Same errors in logs shown.
Trust me to try pick a broken integration as my my first device to try adding on a new install!
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
Bump. This has not been fixed.
This can basically only be solved by Ambi raising their rate limit. They allow so few requests per hour this integration is useless. I have spoken with them regarding this and they said they have too many poorly written clients hammering away at them and the API is not a priority at this time.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
Still doesn't work
Everybody, please send an email to [email protected] regarding this problem. Only if they see the sheer volume of us, they can fix it.
Everybody, please send an email to [email protected] regarding this problem. Only if they see the sheer volume of us, they can fix it.
Great idea, I've sent them a nicely worded e-mail.
I sent an email to ambiclimate support but they told me to ask to homeassistant developer. At this point I will return the item back
I sent an email to ambiclimate support but they told me to ask to homeassistant developer. At this point I will return the item back
There's nothing to ask Homeassistant. For more than a year, AmbiClimate has imposed strict rate limits on their API, making it nearly useless. They said they were aware of this issue more than one year ago and haven't done anything to address it. I do not think it will be fixed soon (or ever) and have gave up using this integration. Really, it should be just removed from core, as it's useless.
Ambi climate have also given up completely on fixing their google assistant integrations so I wouldn't hold your breath for anything to be done. I might jump ship to sensibo at this point.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.