homeassistant-roborock
homeassistant-roborock copied to clipboard
HACS Integration get IP blocked by Roborock
Hi,
I had my Roborock working fine for a few months. 2 weeks ago everything stopped working - the mobile app as well as the HACS Home Assistant integration. What I have noticed is that if I tried to login while on 4G (in the mobile app) it worked (but of course no Roborock vacuum that way). On my WIFI it did not work and always errored out with "Network Unavailable" error.
Lots of troubleshooting resulted in the conclusion that everything on my network works as it should and it was the Robock end that was blocking my IP address. So i email support and included very detailed information and how I arrived at my conclusion that it was their infrastructure that was blocking my IP address. A few emails back and forth (including screenshots and videos) and finally they come back to me with this (please keep in mind that I have never told them in my conversations with them anything about Home Assistant):
"Hi,
Thank you for your video.
Could you tell us if you are using Home Assistant to control the vacuum cleaner?
If yes, it is Roborock APP server detecting that Home Assistant has tried to visit it for too many times in a short period and ban it temporarily to protect server. You can wait for 24 hours and all will work again. But we suggest you disable Home Assistant to avoid it happens again in the future."
So there it is - confirmation from Roborock that IPs do get banned if connecting too often. What is too often? I have no idea.
Can you please look at this issue?
I have static IP so I cannot jump to another unblocked IP nor hide my connections to Roborock between different IPs.
This is something we are aware of as it has happened in the past. Roborock has never responded to me in the past when I have attempted to work with them to ensure we stay within limits and give users the best experience. If they can share what the limits are, we can ensure we stay under that rate.
But - I would recommend using the local api client and not the cloud client for Roborock on Home Assistant. Local client has no time outs. But it does still need to use the cloud client for the map
@Lash-L
I switched my setting to local because off this issue and since then my roborock camera stream is not available anymore. Need the camera option the cloud setting enabled?
By camera stream do you mean the actual camera on the vacuum? Or the map which is represented in a camera entity?
Sorry for the confusion. I mean the camera live stream not the map.
Below is my conversation with them:
Me:
Hi,
I tested the mobile app now and yes it is working as it should. So the issue was the Home Assistant integration.
Can you please let me know what are the rate limits that this integration needs to stay within? I believe it will be in the best interest of everyone (end users and Roborock too) if we can fix the issue with exceeding connections. This way everybody will be happy and less support calls will be generated too.
Many thanks
and their reply
Hi,
Thank you for writing back.
Please don't connect and disconnect to server exceed 100 times per hour. The server automatically adjusts based on load. If it is detected that the client (whether it is a mobile app, a home assistant or a sweeper) repeatedly tries to reconnect to the server, this behavior will be considered by default to be attacking the server, and the server will block him.
@Lash-L Hopefully this gives you some meaningful information to work with?
This exact same situation has happened to me as well. It appears my external IP address has been blocked from accessing all of the hosts which are behind api-eu.roborock.com (CNAME to api-slb-219078777.eu-central-1.elb.amazonaws.com)
However mine has been blocked for over a week now. I have a support case open with Roborock but they are still at the stage of suggesting DNS, wifi issues etc... despite me pointing out that it appears to be a block.
Any ideas how I can get my IP ublocked?
Cheers Mark
I had mine blocked for more than 3 weeks. First step - disable the integration in HA.
Then you have to tell them that you had vacuum working for a number of days/weeks before everything stopped. Tell them that you did not make any changes to your devices. Try and access the mobile app from 4G. Login and then logout. If it works then go on your WIFI and then try to login (it never worked for me). Repeat the process and take a video of the whole thing. Share the video out them so they can see that on 4G all works and on your wifi it does not. I did the above and the next email asked me about HA and if I used it. I replied and told them that yes I use it and 24h later it all started working again. Good luck.
Thanks I will try that. I definitely get the same behaviour as you - I can log in and out of the app when on 4G, VPN, friends internet connection, but as soon as I'm on my home Wifi I get "Network Unavailable"
Cheers Mark
Below is my conversation with them:
Me:
Hi, I tested the mobile app now and yes it is working as it should. So the issue was the Home Assistant integration. Can you please let me know what are the rate limits that this integration needs to stay within? I believe it will be in the best interest of everyone (end users and Roborock too) if we can fix the issue with exceeding connections. This way everybody will be happy and less support calls will be generated too. Many thanks
and their reply
Hi, Thank you for writing back. Please don't connect and disconnect to server exceed 100 times per hour. The server automatically adjusts based on load. If it is detected that the client (whether it is a mobile app, a home assistant or a sweeper) repeatedly tries to reconnect to the server, this behavior will be considered by default to be attacking the server, and the server will block him.
@Lash-L Hopefully this gives you some meaningful information to work with?
The 100 times per hour metric is helpful, but may be difficult to achieve. I can try my best, but the way their request are set up, a lot of request need to be made just to get the data we have on the frontend.
Since you are currently getting communication - you can let them know the developer for the Roborock Home Assistant integration will attempt to lower the request made to under 100 an hour, but also let them know that if they have someone on their team who would be willing to answer some questions regarding the api, I would be able to ensure that the end-users are having a good experience and that Roborock servers are not being unnecessarily taxed. If that is something they are willing to do - they can contact me at [email protected]
@Lash-L - I am afraid to lose them if I ask them to contact you. Maybe I keep them engaged and you post the question here? Hopefully this way I can keep the communication channel open with them. So just ask your questions here and I will email them and paste the answers in here once I get them (hopefully they will keep replying to my questions). Does this sound good?
@Lash-L - I am afraid to lose them if I ask them to contact you. Maybe I keep them engaged and you post the question here? Hopefully this way I can keep the communication channel open with them. So just ask your questions here and I will email them and paste the answers in here once I get them (hopefully they will keep replying to my questions). Does this sound good?
So the issue with that is that the topics I would like to discuss are lower level things that I don't think a typical customer support representative would have an answer to anyways. If you would like to ask, go ahead - I just ask that you include my email and state that I am happy to communicate directly with anyone on the team.
-
Is there a way to call the GET_MAP mqtt request without using the cloud? This is one of the only mqtt commands that we are unable to replicate locally, and is the cause for most of the requests that users make
-
Is there a mqtt command to get multiple pieces of information at once? i.e. if we could call get_status and get_consumable at the same time, and get the results together, we could greatly decrease our call count.
-
Is there any kind of api call we could make to know when rate limiting is becoming active? So we can further prevent doing anything to get ip banned for 24 hours?
We have around 20 thousand users who use home Assistant to control their Roborock, we would love to make sure that their experience is as good as possible, while also not being a burden on your servers. Most of our calls are done locally, but local calls are not always an option for some set ups and some commands.
I am more than happy to communicate with anyone on the team to make sure we are operating with in your standards. My email is [email protected]
Done. You were CC-ed in my reply to them. Lets hope they will continue to talk.
This issue just started happening to me yesterday. I have another Roborock S5 using the xiaomi integration where a similar issue was happening about a month ago. The S5 issue was fixed by changing the scan interval of the camera to 4 hours and then adding automations to scan every 15 seconds only while the vacuum was "undocked".
Check out the solution marked in the first post here.
Is there a way to set up scan intervals for the Roborock integration?
@Lash-L Hello there, Concerning the 100 request per hour, I have a suggestion I saw your post here as well as in the python-roborock page. Based on your input, it seems pretty much impossible, so I'm going to a different direction. I've looked at the code of python-roborock and could see that there is an offline/local network client, and an online client. Features are then provided by both implementation. I haven't seen if there is a way to simply disable the online client and only rely on the local one. Given some customer having been banned, perhaps a switch in the python library as well as in the home assistant library to toggle the cloud would be implemented ? User would have the choice of local only or local and cloud.
- that could prevent future ban if local only
- may or may not increase privacy - people still need to know that the vacuum need to connect to the cloud server to be reachable locally beacuse it toggle wifi in case of error
Otherwise I don't have much realistic ideas. Perhaps a detection if the user is actively looking at the map ? If the user is not looking at, the pooling rate can be lowered to refresh once every ten minutes or every hour. I don't think home assistant support that kind of thing. For sensors it would not make much senses, because home assistant keep historical data. But for map data, it's more like a data pipeline/signal and it not that useful to keep everything forever. Updating it with a lower rate might not be a big issue if nobody is looking at it and no historical data is useful/collected.
Done. You were CC-ed in my reply to them. Lets hope they will continue to talk.
Can you follow up with them about the email I sent back asking for clarification
I sent a follow up email. Hopefully they will reply with something.
Any updates on this?
I had the Home Assistant addon installed and running fine, it just packed up one day and since then the app won't even work on my personal network. If I switch to mobile some of it works. I had to switch to the Mi Home app just to get things to come back to life.
Interestingly the "100 times per hour" would suggest that after 1 hour the rate limiting resets but it doesn't appear to. As far as I can tell my IP is fully blocked from Roborock servers - even images on the wizards for connecting to a device won't load until I switch my phone's wifi off (disconnecting from my presumably blocked ip)
Whilst I can get by and eventually I'm sure I can force my internet IP lease to renew and get myself a new IP, I'm hesitant to install the addon again for fear of it causing more blockages.
The suggestion about polling for map updates when in view may work, but would prevent people leaving it on dashboards etc so might not be the best solution. Perhaps just a toggle to turn off map polling in the mean time and users may utilise the other features like sensors and create automations etc but just not use the map for the time being?
Any updates on this?
I had the Home Assistant addon installed and running fine, it just packed up one day and since then the app won't even work on my personal network. If I switch to mobile some of it works. I had to switch to the Mi Home app just to get things to come back to life.
Interestingly the "100 times per hour" would suggest that after 1 hour the rate limiting resets but it doesn't appear to. As far as I can tell my IP is fully blocked from Roborock servers - even images on the wizards for connecting to a device won't load until I switch my phone's wifi off (disconnecting from my presumably blocked ip)
Whilst I can get by and eventually I'm sure I can force my internet IP lease to renew and get myself a new IP, I'm hesitant to install the addon again for fear of it causing more blockages.
The suggestion about polling for map updates when in view may work, but would prevent people leaving it on dashboards etc so might not be the best solution. Perhaps just a toggle to turn off map polling in the mean time and users may utilise the other features like sensors and create automations etc but just not use the map for the time being?
If you're concerned use the core integration with local only control. It does not currently include the map logic
I had the core integration initially but it was only providing a handful of entities and was essentially useless for the s8. Perhaps it's changed now, I'll look again - ultimately this addon is a far more useful offering.
Was just wondering if there had been any updates from Roborock around the matter as this thread went quiet 3 weeks ago
I'm not sure what changed but everything started working for me again. It's been working like normal for the past three weeks.
Hi,
There were no more updates from Roborock. I guess that is all the information we have (at least for now) - 100 hits per hour.
Hi Is there anything new here? Roborock also blocks my IP (according to Roborock Support).
Is there a way that Roborock can send less than 100 requests per hour to the servers and I can still use the live map?
or is there the possibility that the card does not do a live comparison? so that the map is displayed and I can send the roborock into a room, but don't see where it currently is? would this reduce the number of server requests?