Climate Honeywell component throws error about being rate-limited after a day of work

I have a regular honeywell configuration that works for about a day or two

climate:
platform: honeywell
username: xxx
password: xxx
region: us

Then the component starts throwing error “somecomfort.client.APIRateLimited: You are being rate-limited. Try waiting a bit.” every 2 minutes. Since then it doesn’t work any more. I can’t set or get current temperature or do anything else. It looks like I am hitting some allowed max rate. When I restart HASS, everything comes back to normal until the next day.

Is there a way to lower polling frequency for the climate component so it acts below allowed API calling rate?

Here is the full stack trace of the exception:
17-01-23 22:22:24 homeassistant.core: Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “C:\Users\Dmitry\AppData\Local\Programs\Python\Python35\lib\asyncio\tasks.py”, line 241, in _step
result = coro.throw(exc)
File “C:\Users\Dmitry\AppData\Local\Programs\Python\Python35\lib\site-packages\homeassistant\helpers\entity_component.py”, line 387, in _update_entity_states
yield from update_coro
File “C:\Users\Dmitry\AppData\Local\Programs\Python\Python35\lib\site-packages\homeassistant\helpers\entity.py”, line 216, in async_update_ha_state
yield from self.hass.loop.run_in_executor(None, self.update)
File “C:\Users\Dmitry\AppData\Local\Programs\Python\Python35\lib\asyncio\futures.py”, line 361, in iter
yield self # This tells Task to wait for completion.
File “C:\Users\Dmitry\AppData\Local\Programs\Python\Python35\lib\asyncio\tasks.py”, line 296, in _wakeup
future.result()
File “C:\Users\Dmitry\AppData\Local\Programs\Python\Python35\lib\asyncio\futures.py”, line 274, in result
raise self._exception
File “C:\Users\Dmitry\AppData\Local\Programs\Python\Python35\lib\concurrent\futures\thread.py”, line 55, in run
result = self.fn(*self.args, **self.kwargs)
File “C:\Users\Dmitry\AppData\Local\Programs\Python\Python35\lib\site-packages\homeassistant\components\climate\honeywell.py”, line 279, in update
self._device.refresh()
File “C:\Users\Dmitry\AppData\Local\Programs\Python\Python35\lib\site-packages\somecomfort\client.py”, line 87, in refresh
data = self._client._get_thermostat_data(self.deviceid)
File “C:\Users\Dmitry\AppData\Local\Programs\Python\Python35\lib\site-packages\somecomfort\client.py”, line 449, in _get_thermostat_data
return self._get_json(url)
File “C:\Users\Dmitry\AppData\Local\Programs\Python\Python35\lib\site-packages\somecomfort\client.py”, line 425, in _get_json
return self._request_json(‘get’, *args, **kwargs)
File “C:\Users\Dmitry\AppData\Local\Programs\Python\Python35\lib\site-packages\somecomfort\client.py”, line 417, in _request_json
raise APIRateLimited()
somecomfort.client.APIRateLimited: You are being rate-limited. Try waiting a bit.

I am using the latest version 0.4.1 of somecomfort requirement. Has anyone had this issue? I would appreciate any help on that matter.

I’m having the same issue

@dmitry Have you gotten anywhere with this? My instance is crashing eventually, not sure if this is what is causing it or not

I was able to find a temporary solution.

HA Climate component is polling Honeywell API every minute and that parameter is hardcoded. Honeywell API FAQ states that status requests should be every 5 minutes per hour.

Our limit is designed to allow you to poll device status every 5 minutes for up to 20 devices per hour, with a little cushion to make changes. If you need a higher rate limit, please contact us: [email protected]

I opened "..\Python\Python35\Lib\site-packages\homeassistant\components\climate\__init__.py". Increased SCAN_INTERVAL to more conservative value 600 seconds (6 times per hour) and restarted HASS.

A day later I checked the log and did not see such errors any more. It seems to be working for now. Next I will try to lessen interval to 300 secs and see if it still works.

You need that workaround applied after each HASS update. So maybe it’s better to put up an improvement request to make that interval configurable from yaml settings of climate component.

Please open an issue on GitHub so this can be properly fixed.

Issue 5597 has been added.

2 Likes

Following up on the forum to report back from the activity on the PR. The fist for Honeywell rate limiting is to add the scan_interval parameter to your platform. It is expressed in seconds.

climate:
  platform: honeywell
  username: !secret thermostat_username
  password: !secret thermostat_password
  region: us
  scan_interval: 600

Hi guys unfortunately I have been rate limited by Honeywell since I forgot to change the scan_interval in the configuration.yaml from 60 to 600. I then changed the interval to 600 seconds. Do you guys know how long it takes for the rate limit to expire?

Also running Hassbian version 0.71.0

I just purchased and installed Honeywell model: RTH9585WF-1004. After a couple of days I had the same issued. I just changed the scan_interval to 600. Is that still working for you? I wish someone would update the Integrations documentation if that’s the case. Thank you for the post as it saved me a great deal of time. Regards!

I have my scan_interval to 300. I have 3 Honeywell RTH6580WF’s. Haven’t had a rate limiting problem since I set it up back in May I think.

Yeah, nobody seems to put much effort into complete or current documentation around here.

I haven’t had any issues. I also use the room occupancy for automation conditions. Everything’s been working swell.

To @CaptTom’s point, if you work out something and feel that the documentation could be improved by what you’ve done, you can open PR to update documentation. Documentation is a community effort.