Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MELCloud - Error - "This request has been throttled due to an excessive amount of traffic to our service" #109728

Open
samboman opened this issue Feb 5, 2024 · 178 comments

Comments

@samboman
Copy link

samboman commented Feb 5, 2024

The problem

UPDATE / EDIT: It is not related to the HA upgrade. It is related to some change MELCloud have done on their servers.

2024-02-05 17:04:27.418 ERROR (MainThread) [homeassistant.components.climate] melcloud: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 573, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1216, in async_device_update
await self.async_update()
File "/usr/src/homeassistant/homeassistant/components/melcloud/climate.py", line 125, in async_update
await self.api.async_update()
File "/usr/src/homeassistant/homeassistant/components/melcloud/init.py", line 107, in async_update
await self.device.update()
File "/usr/local/lib/python3.11/site-packages/pymelcloud/device.py", line 86, in update
self._energy_report = await self._client.fetch_energy_report(self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pymelcloud/client.py", line 195, in fetch_energy_report
async with self._session.post(
File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 1194, in aenter
self._resp = await self._coro
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 693, in _request
resp.raise_for_status()
File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 1060, in raise_for_status
raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 429, message='This request has been throttled due to an excessive amount of traffic to our service.', url=URL('https://app.melcloud.com/Mitsubishi.Wifi.Client/EnergyCost/Report')

What version of Home Assistant Core has the issue?

core-2024.1.6

What was the last working version of Home Assistant Core?

core-2024.1.5

What type of installation are you running?

Home Assistant Container

Integration causing the issue

MELCloud

Link to integration documentation on our website

https://www.home-assistant.io/integrations/melcloud

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

home-assistant bot commented Feb 5, 2024

Hey there @vilppuvuorinen, mind taking a look at this issue as it has been labeled with an integration (melcloud) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of melcloud can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign melcloud Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


melcloud documentation
melcloud source
(message by IssueLinks)

@tonicb78
Copy link

tonicb78 commented Feb 5, 2024

Same issue here after updating HA. Climate entity is not created.

@Impedanz
Copy link

Impedanz commented Feb 5, 2024

Thank you for opening that issue! Same Error here after Update :*(

@olealm
Copy link

olealm commented Feb 5, 2024

Same issue here after updating Home Assistant OS to 11.5. Climate entity unavailable. Tried deleting and re-adding my heatpump, but climate entity was not created.

@helio58
Copy link

helio58 commented Feb 5, 2024

Same problem no climate entity. Climate entity unavailable . Core 2024.1.6

@98ultimate
Copy link

Screenshot_20240205-182334~2.png

Melcloud app on android gives this warning message. Can not access heat pump now.

@Nisssen
Copy link

Nisssen commented Feb 5, 2024

Same issue here after updating Home Assistant OS to 11.5. Climate entity unavailable.

@machadolucas
Copy link

Same issue here after updating Home Assistant OS to 11.5

@Dirkhaan
Copy link

Dirkhaan commented Feb 5, 2024

Same here, also after updating the HAOS to 11.5

@Lantoit
Copy link

Lantoit commented Feb 5, 2024

Same issue, I've downgraded Ha to previous version without success.

@Osconse
Copy link

Osconse commented Feb 5, 2024

Same problem. I have even restored a Home Assistant backup and it still doesn't work

@vilppuvuorinen
Copy link
Contributor

Well we had a good run with this thing.

I'm guessing the only option is would be to drastically reduce the polling frequency to once in 10-20 minutes and hope the load will be acceptable. Let's see how it goes.

The best workaround is to replace the wifi module with a ESP and cut out the cloud component entirely.

@Beamer28582
Copy link

Same her. In spite of Backup it doesn‘t work.

@98ultimate
Copy link

The best workaround is to replace the wifi module with a ESP and cut out the cloud component entirely.

Lets hope 500€ wifi module is not useless forever. Waiting useful solution from Mitsubishi if wifi module becomes useless.

@EGDimitrov
Copy link

EGDimitrov commented Feb 5, 2024

I have the same problem after update. Terrible... Give us a solution please...The problem is with the home assistant, because the Melcloud application on my phone works without any problems.

@tonicb78
Copy link

tonicb78 commented Feb 5, 2024

Well we had a good run with this thing.

I'm guessing the only option is would be to drastically reduce the polling frequency to once in 10-20 minutes and hope the load will be acceptable. Let's see how it goes.

The best workaround is to replace the wifi module with a ESP and cut out the cloud component entirely.

I was thinking some months ago to build the esp32 module, we should avoid any types of cloud integrations.

@Flowlance
Copy link

Same issue in home assistant on docker. MelCloud app works fine

@Osconse
Copy link

Osconse commented Feb 5, 2024

Hace algunos meses estuve pensando que al construir el módulo esp32, deberíamos evitar cualquier tipo de integraciones en la nube.

Where can I find information about replacing the wifi module with an esp32?

@tonicb78
Copy link

tonicb78 commented Feb 5, 2024

Where can I find information about replacing the wifi module with an esp32?

Check this:

https://community.home-assistant.io/t/mitsubishi-ac-with-wemos-d1-mini-pro/107007/286

@EGDimitrov
Copy link

EGDimitrov commented Feb 5, 2024

A little while ago I got supervisor 2024.01.1 upgrade. After the upgrade everything work again!!!! Yeeeeeeeeeeeeee

@Osconse
Copy link

Osconse commented Feb 5, 2024

¿Dónde puedo encontrar información sobre cómo reemplazar el módulo wifi con un esp32?

Mira esto:

https://community.home-assistant.io/t/mitsubishi-ac-with-wemos-d1-mini-pro/107007/286
Thanks

@Osconse
Copy link

Osconse commented Feb 5, 2024

Hace un tiempo obtuve la actualización supervisor 2024.01.1. Después de la actualización, ¡todo vuelve a funcionar! Yeeeeeeeeeeeee

I just updated to 2024.01.1 and it does NOT work for me...😭😭

@Dirkhaan
Copy link

Dirkhaan commented Feb 5, 2024

Did you do a complete reboot, because it worked for me after a complete reboot!

@simonk0606
Copy link

Same problem! I've rebooted all, nothing better for now ! But I'm not sur I had the correction 2024-01-1. Where can I check it ?

@Osconse
Copy link

Osconse commented Feb 5, 2024

¿Hiciste un reinicio completo porque funcionó para mí después de un reinicio completo?

I have turned off the host completely and restarted Home Assistant again but it still doesn't work. It gives me this error: Error: 429, message='This request has been throttled due to an excessive amount of traffic to our service.', url=URL('https://app.melcloud.com/Mitsubishi.Wifi.Client/EnergyCost/Report')

@Impedanz
Copy link

Impedanz commented Feb 5, 2024

Complete reboot(unplug Power), no newer Updates available, melcloud Not working after 11.5 Update

@Lantoit
Copy link

Lantoit commented Feb 5, 2024

Did you do a complete reboot, because it worked for me after a complete reboot!

Upgraded, complete reboot, still not functioning...

@GHA2036
Copy link

GHA2036 commented Feb 5, 2024

Same for me. I've tried to restore from a backup created just before update without succes. Complete reboot and reload of the integration doesn't solved the problem.

@tonicb78
Copy link

tonicb78 commented Feb 5, 2024

Same for me. I've tried to restore from a backup created just before update without succes. Complete reboot and reload of the integration doesn't solved the problem.

It is blocked from their site, they are blocking the users or IPs and only allow to use their sh*tty app. Seems they are doing a Haier.

@czubin
Copy link

czubin commented Feb 6, 2024

Well this is no fun. They also turned off the unit in my child's room. Luckily it didn't turn too coldly.

@dwindey1
Copy link

dwindey1 commented Feb 6, 2024

I use melcloud with NodeRed. Same issue here. It was polling at 5 minute rate. Seems to be too much.
Anyway not happy with it. My system is running 25% more efficient with my NodeRed integration. I need to consider controlling it localy... Will look into the ESP sollution.

@oywino
Copy link

oywino commented Feb 6, 2024

I have two HA instances connected to the same Mitsubishi AC using MELCloud, one HA instance is in Spain and the other is in Norway. Both use the same MELCloud account. The one in Norway is banned but the one in Spain works ok. For what its worth.
I disabled the Norwegian integration this morning and left it disabled all day, still no-go when I try to enable it again. (I've disabled polling)

@mafonso
Copy link

mafonso commented Feb 6, 2024

I guess that as soon as my "ban" is raised from the 1 minute polling, I will try to make it every ~10 minutes (with a +5/-5 random variation) so they don't understand it's automated. I will also probably suspend at night time. Kinda dumb having to go around their limitations just because they can't give us a local API.

I just did some testing after my ban was lifted (I was using it in NodeRed and HomeBridge also) and it tried to replay the Device/RequestRefresh command from the webapp a few times. I probably did more then 20 requests within a minute and was not triggered.
So the throttling logic seems to be looking at more than just request count. Maybe some custom headers like X-MitsContextKey and X-Requested-With are used in the logic. Or even Origin or Referer

@msolomos
Copy link

msolomos commented Feb 6, 2024

Guys, I disabled the integration for 2 hours and then it worked.!
I will report back how much it will last

@aphotrax
Copy link

aphotrax commented Feb 6, 2024

Same here, seems like they are facing the same issue as Haier had. Though there the community clearly made them rethink their decision:
Andre0512/hon#147

Hopefully we can get the same here, because a bit mess polling is ok, but it's shouldn't become to low. Especially for the type of appliances that would make it useless.

@miguelpruivo
Copy link

I guess that as soon as my "ban" is raised from the 1 minute polling, I will try to make it every ~10 minutes (with a +5/-5 random variation) so they don't understand it's automated. I will also probably suspend at night time. Kinda dumb having to go around their limitations just because they can't give us a local API.

I just did some testing after my ban was lifted (I was using it in NodeRed and HomeBridge also) and it tried to replay the Device/RequestRefresh command from the webapp a few times. I probably did more then 20 requests within a minute and was not triggered. So the throttling logic seems to be looking at more than just request count. Maybe some custom headers like X-MitsContextKey and X-Requested-With are used in the logic. Or even Origin or Referer

This seems interesting. That would make sense somehow, since I see it too much intrusive/bad experience to ban app users from using it if they are closing/opening the app a couple of times in a hour.

Maybe the headers are the key. It would be great to proxy the app client headers and check if there is something quite different there. We may then try to replicate it in the package.

@alexgraupera
Copy link

alexgraupera commented Feb 6, 2024

Looks like another Haier Gate :-) but in this case without threatening email. Just with a massive ban accounts.

I disabled the polling option in the integration System options and I created an automation that updates the (I have two hvac) entities every five minutes. I created it about an hour and it still working without ban (by the moment)

@piotrpawelptak
Copy link

I noticed that the app no longer asks for login every time I try to enter the controls of the device. Now it logs me out when I try to pull energy usage report.

@iamtheeric
Copy link

I guess that as soon as my "ban" is raised from the 1 minute polling, I will try to make it every ~10 minutes (with a +5/-5 random variation) so they don't understand it's automated. I will also probably suspend at night time. Kinda dumb having to go around their limitations just because they can't give us a local API.

I just did some testing after my ban was lifted (I was using it in NodeRed and HomeBridge also) and it tried to replay the Device/RequestRefresh command from the webapp a few times. I probably did more then 20 requests within a minute and was not triggered. So the throttling logic seems to be looking at more than just request count. Maybe some custom headers like X-MitsContextKey and X-Requested-With are used in the logic. Or even Origin or Referer

This seems interesting. That would make sense somehow, since I see it too much intrusive/bad experience to ban app users from using it if they are closing/opening the app a couple of times in a hour.

Maybe the headers are the key. It would be great to proxy the app client headers and check if there is something quite different there. We may then try to replicate it in the package.

It makes no sense trying to outsmart the melcloud system. If they don’t want us to use 3rd party apps there is not much we can do other than stop buying their products and tell ppl interested in home automation systems about this crappy Mitsubishi customer service.

@somatyi
Copy link

somatyi commented Feb 6, 2024

I turned off the integration for 2 hours and managed to get it work again. Everything was fine for exactly 4 hours, now I get the same message in the mobile app

"We have detected excessive traffic from your account, your access to the service has been limited for a few hours."

What email address do you think I should write to? I also believe if everyone of us will write an email we can make them change their mind.

Until then - what manual setting should I use to make the polls less frequent? Can you link a solution for such an automation? Thanks

@frenck
Copy link
Member

frenck commented Feb 6, 2024

Same here, seems like they are facing the same issue as Haier had. Though there the community clearly made them rethink their decision: Andre0512/hon#147

@aphotrax I want to ask you to be very conservative with making assumptions like that and expressing them that way. That makes other people think that this is the case: which it is not at this point (to be very clear on this).

../Frenck

@haraldhh
Copy link

haraldhh commented Feb 6, 2024

I get a different error now. I got some 503 not available an hour or two back, but now it is the energy reporting that fails;

aiohttp.client_exceptions.ClientResponseError: 429, message='This request has been throttled due to an excessive amount of traffic to our service.', url=URL('https://app.melcloud.com/Mitsubishi.Wifi.Client/EnergyCost/Report')

I feel that Melcloud is adjusting itself constantly right now.

Earlier I created a guest account in melcloud and put that into HA, that worked for a while but not anymore. The Melcloud App now works for both my main and that guest account, even though home-assistant.log still contains messages about throttling. Earlier when an account was throttled it was throttled both in HA and in the Melcloud App (android + webpage). So someone is tuning this throttling constantly right now. Please stop :)

@aphotrax
Copy link

aphotrax commented Feb 6, 2024

Seems like, should point out enough it's an assumption, no? ;)

I'm sure it's just a coincidence, though a nother assumption is that the cause for them to limit/adapt the API access is for the same reason. So a take down request is not the way to go and they didn't. But not communicating about what the limits are isn't very nice either. Would be nice if they would reach out instead of just set a limit like that. Or even better make local access possible. dreaming

@adamlonsdale
Copy link

I feel that Melcloud is adjusting itself constantly right now.

There are reports on twitter yesterday / overnight (GMT) of people saying they experience 500 errors in the MELCloud app / logging in without any mention of 3rd party integrations. If there are genuine load issues this could well be an automated performance monitoring / throttling system that keeps adjusting the app to maintain service availability.

@aphotrax
Copy link

aphotrax commented Feb 6, 2024

That would be "great" news. Though it seems like keeping service available has failed. Let's see in a few days of they will share more info.

@oakmountainsweden
Copy link

I get this strange message
image

Did you also had that? How did you solved that?

@frenck
Copy link
Member

frenck commented Feb 6, 2024

@oakmountainsweden That is what this whole issue is about... there is a lot of content here above your message which you may want to read/scan. 😉

@ISO-B
Copy link

ISO-B commented Feb 6, 2024

Guys, I disabled the integration for 2 hours and then it worked.! I will report back how much it will last

Did same thing and it is back to operating. While waiting for ban to lift I did some research and resolved headers that MelCloud android app uses. If I get "banned" again I am going to test with those even though it is not solution to problem, but just to see if those prevent getting banned.

@davidcd13
Copy link

Looks like another Haier Gate :-) but in this case without threatening email. Just with a massive ban accounts.

I disabled the polling option in the integration System options and I created an automation that updates the (I have two hvac) entities every five minutes. I created it about an hour and it still working without ban (by the moment)

Could you detail the detailed procedure to create this automation? I don't know which service to call when I create the automation (maybe the yaml code?). THANKS

@frenck
Copy link
Member

frenck commented Feb 6, 2024

That is out of scope for this issue. Please consult or documentation or pick up a discussion on our community forums for such things. Let's keep the issue on top of fixing the actual core part (and not a tutorial on building automations).

Thanks 👍

@Osconse
Copy link

Osconse commented Feb 6, 2024

Yesterday I disabled the integration and this morning, I regained control in the MelCloud app.
I removed the automatic polling of sensors and put them every 5 minutes. I also modified some automations going from /3 minutes to /5 minutes and today everything worked without problem.
The bad thing is that this is not tranquility and in the middle of winter, although very warm here in Spain, it is not cool nothing depends on these people

@PV-Web

This comment was marked as duplicate.

@OverWorldD

This comment was marked as off-topic.

@samboman
Copy link
Author

samboman commented Feb 6, 2024

What is the current polling intervall and can it be made configurable? For me it's ok to get the data every 10 or 20 minute. Maybe after changing values (eg. turning on/off or changing set point temperature) some extra polling could be done within the throttling-limits.

@durix75
Copy link

durix75 commented Feb 6, 2024

I created a guest account to set up in HA 6 hours ago.
It has just been throttled now :(
I will try to reduce the polling frequency now.
super annoying from Mitsubishi.

@miguelpruivo
Copy link

I am already unbanned again. Already tried with 1 minute polling and was banned after a while, now I’m in doubt whether I should use 10, 15 or 30 minutes. Anyone has an idea? 30 minutes starts to be too much for it to handle reliably when I turn on the unit with the controller. I’d say that anything beyond 30 minutes just make it quite unusable for its purpose.

@frenck
Copy link
Member

frenck commented Feb 6, 2024

Locking down this issue.

Many questions have been asked twice or more, and just as equally answered, many reported having the same issue (please don't do that in general...).

A fix has been merged, that adjusts the default polling rate. This is currently in beta and will be part of the 2024.2 release ( which will be shipping on Wed 7 Feb, tomorrow at the time of writing).

Please update to that release as soon as it is available to address the issue reported here.

@home-assistant home-assistant locked as too heated and limited conversation to collaborators Feb 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests