Closed kimme1024 closed 1 year ago
Same problem here as well
scan_interval: 30 looks like it did a trick for me... I see the map again. I will observe and report later :)
scan_interval: 30 looks like it did a trick for me... I see the map again. I will observe and report later :)
Even with 60 im apparently still flooding the API, as mine is down again. I think we really need a different way of organizing the image, and maybe at least save the last image until the newest one is resolved successfully. As without a map you can't even plan cleaning anymore, as you lack the room selection etc.
scan_interval: 30 looks like it did a trick for me... I see the map again. I will observe and report later :)
Also added scan_interval: 30 last evening, but sadly maps gone now in the morning again.
I'm on a 120 interval, I added back the camera:
configuration block yesterday afternoon. And this morning the map is unable to load on the Xiaomi App (and it's not even loaded on HA Dashboard).
For me it's working again the last 2-3 days, only used the blueprint to disable the update while docked.
What is the best way to get map working again after a failure. First time I just restarted the vaccuum, but now I cannot get it working again (not even on phone)?
@sergicm the blueprint from @YoMan12 ?
I still doesn't understand one point : this integration pull the map as soon as it's included in the configuration.yml or only when added as a card on a dashboard?
What is the best way to get map working again after a failure. First time I just restarted the vaccuum, but now I cannot get it working again (not even on phone)?
Wait until the limit is reset (https://blog.axway.com/learning-center/apis/basics/api-rate-limits) it doesn't have anything to do with the vacuum cleaner locally, everything is related to the Roborock API now enforcing rate limits on their cloud services.
What is the best way to get map working again after a failure. First time I just restarted the vaccuum, but now I cannot get it working again (not even on phone)?
Wait until the limit is reset (https://blog.axway.com/learning-center/apis/basics/api-rate-limits) it doesn't have anything to do with the vacuum cleaner locally, everything is related to the Roborock API now enforcing rate limits on their cloud services.
Thanks, Do we know what the limit reset time is for Roborock?
Seems my automations I uploaded here were removed ?
So I will place them again as I think this is a better solution than the blueprint to disable the camera completely. One automation will enable or disable the second automation if the roborock is either docker or not. The second automation will update the camera service every 15 seconds.
You will need to set the scan_interval in the configuration.yaml to a high value like 14400 ( 4 hours )
alias: start/stop xiaomi fast scan interval
description: ""
trigger:
- platform: state
entity_id:
- vacuum.roborock_s6
condition: []
action:
- if:
- condition: state
entity_id: vacuum.roborock_s6
state: docked
then:
- service: automation.turn_off
data: {}
target:
entity_id: automation.update_xiaomi_map_extractor
else:
- service: automation.turn_on
data: {}
target:
entity_id: automation.update_xiaomi_map_extractor
mode: single
alias: update xiaomi map extractor
description: ""
trigger:
- platform: time_pattern
seconds: "15"
condition: []
action:
- service: homeassistant.update_entity
data: {}
target:
entity_id: camera.xiaomi_cloud_map_extractor
initial_state: "off"
mode: restart
@cosmos1978 they were not removed, you just posted them in a completely different thread.
I will adjust the blueprint to support different scan intervals later today/tomorrow
@cosmos1978 they were not removed, you just posted them in a completely different thread.
I will adjust the blueprint to support different scan intervals later today/tomorrow
Ok sorry about that :-)
What is the best way to get map working again after a failure. First time I just restarted the vaccuum, but now I cannot get it working again (not even on phone)?
Wait until the limit is reset (https://blog.axway.com/learning-center/apis/basics/api-rate-limits) it doesn't have anything to do with the vacuum cleaner locally, everything is related to the Roborock API now enforcing rate limits on their cloud services.
Thanks, Do we know what the limit reset time is for Roborock?
Killed the map updates from HA about 8 hours ago, still cannot get the map on Xiaomi Phone App, any feeling how long Roborock locks you out?
Answer from support, not very helpful
I understand it may have something to do with API rate limits, do you know the limit reset time for roborock? So we can adjust the home assistant integration accordingly?
«Thank you for taking the time to reach back out to Roborock Support and for updating us on the situation. Under these circumstances we suggest you disconnect robot from home assist or disable its map feature have a try, which should solve the issue.»
What is the best way to get map working again after a failure. First time I just restarted the vaccuum, but now I cannot get it working again (not even on phone)?
Wait until the limit is reset (https://blog.axway.com/learning-center/apis/basics/api-rate-limits) it doesn't have anything to do with the vacuum cleaner locally, everything is related to the Roborock API now enforcing rate limits on their cloud services.
Thanks, Do we know what the limit reset time is for Roborock?
Killed the map updates from HA about 8 hours ago, still cannot get the map on Xiaomi Phone App, any feeling how long Roborock locks you out?
For me, map came back immetiately in phone app after killing integration in home assistant, and then long reboot of roborock.
@AseKarlsson wait until next day.
@cosmos1978 solution seems to do the job. Thank you !
@cosmos1978 one suggestion regarding your automation: at this moment it refreshes the camera every minute, to make it work every 15s you have to use seconds: "/15"
@cosmos1978, Added your automation yesterday evening, GREAT!!!. Got back my map today morning. In the afternoon I tried to start a cleaning and found out that HA could not load the map anymore, but Mi Home still could. Restarted HA and could see the map again, just a glitch?
Great automation, also had to change: from: initial_state: "off" to: initial_state: false in the code to not get an error
Have anyone tried to go down to 5 seconds during vacuum or do we get banned again?
@PiotrMachowski, What a great integration you made, what kind of thoughts do you have for going forward?
And today I got the error again. failed to retrieve map from vacuum. So even with my automation it still fails after some time.
And today I got the error again. failed to retrieve map from vacuum. So even with my automation it still fails after some time.
And what is even weirder is that when I restart the virtual machine my home assistant is running in it fixes the map. But a home assistant restart does nothing. I am beginning to doubt if the problem is only related to the cloud API. A restart of the home assistant OS should not fix the map if it was an API related issue.
What a great integration you made, what kind of thoughts do you have for going forward?
@AseKarlsson any suggestions? 😄 Right now I try (and fail a bit) to keep up. I have made too many repos to maintain
@cosmos1978 I think that restart might clear some stuff in python cache, which might make Xiaomi recognize the integration as a different device
@PiotrMachowski, Cannot give any suggestions from my knowledge level of coding, I am happy that you are on it and seeking a solution for us all!
Do we know the API overflow limit of Roborock at the moment?
Next release preferable without need of external solutions and can your own BluePrint be included in the code as well by default?
Keep up the good work!
Next release preferable without need of external solutions and can your own BluePrint be included in the code as well?
I think I would prefer to keep variable intervals as a blueprint to keep it easy to modify without changing the code.
About other changes, I'd try to merge all pull requests, fix some issues, improve stability, extract map parsing to a dedicated packages. Maybe someday I'll make a config flow. That is my general plan, but nothing is guaranteed ;)
Not a bad idea, but seeking for the BluePrint did not happen before I was cought i in the problems
I have created a new blueprint that should handle all possible cases. It is not mentioned in a documentation at this moment, I will add it there later.
I have created a new blueprint that should handle all possible cases. It is not mentioned in a documentation at this moment, I will add it there later.
Question: Should not theese times be the other way around (default:10 and default: 1800)?
Camera's update interval that should be used when the vacuum is docked.
Not used in `Turn off when docked` and `Default when docked` modes.
selector:
number:
max: 10000
min: 1
unit_of_measurement: s
default: 10
interval_cleaning:
name: Interval cleaning
description: |-
Camera's update interval that should be used when the vacuum is cleaning.
Not used in `Turn off when docked` and `Default when cleaning` modes.
selector:
number:
max: 10000
min: 1
unit_of_measurement: s
default: 1800
I have exactly the same question. Default values seem to be set the other way around :)
There seems to be a mismatch in the labels. The way it is configured is the way that works correctly even if it doesn't make sense.
I tried blueprint but it wont solve map missing problem.
@AseKarlsson @witooski you are correct, I have adjusted it (this is what you get when you code at 4AM...)
@oksakoor you have to disable camera's automatic updates first with auto_update: false
in its config. Also it might take some time to recover on Xiaomi Cloud.
Any idea how long it takes to recover access to Xiaomi Cloud? Disabled the camera hours ago and the map is still not loading in the Xiaomi Home app...
@trizmark you can try rebooting the vacuum
Did that, no luck. I guess I'll have to be more patient.
Did that, no luck. I guess I'll have to be more patient.
Same here.
Yeah, if you look at earlier messages in this thread, people even reach 24+ hours.
But you could try the tips given earlier in this thread.
It's been unavailable for me for a couple of days but I was out so I left it as is. Today I added the blueprint and changed the configuration.yaml file. After that I rebooted the vacuums and it worked immediately. So far it still works after a couple of hours but the vacuums didn't run yet so the biggest test will be during the night so I'll have to check again tomorrow. The only thing that's messed up right now is the map orientation. Somehow it's changed so I'll have to fiddle around with that to get it nice again on my dashboards.
Thanks for the support and hopefully it's fixed this way!
@PiotrMachowski, BluePrint Imported and looks good now for a couple of hours. Great work done, thanks!
This is my config bottom part. Thats correct?
draw: ["all"]
attributes:
- calibration_points
auto_update: false
So far tried reboot robot cleaner and restart HA but no luck.
Yes, it's correct. Now you have to wait
It took me about 4-5 hours before I could reach my vacuum. Re-enabled the map extractor with the new automation and now everything works like a charm! Awesome work @PiotrMachowski !
Thanks for confirming. I made 5 hours ago those steps. Now i have an inner peace that i don't wait blindly with wrong config etc :)
Thanks for confirming. I made 5 hours ago those steps. Now i have an inner peace that i don't wait blindly with wrong config etc :)
Just wait over midnight was the tip I received earlier on the same question and that was the case!
Unfortunatelly I haven't time to make more investigation during the weekend (unexpected ;) ) and I can see that some solutions are made :) Just to enlarge the knowledge I can say that basing on my logs I found out that in my case "reset" is made at 3:20 and block is coming at ca. 18:00 (17:56, 18:01, 18:02 - checked on three following days). I set up scan_interaval to 30s so it makes about 1700-1800 API questions for a day but as it was written here some of You have made bigger intervals and the problem appeared as well so maybe it is kind of more complicated algorithm. I will check new blueprint as well. BTW: similar problem seems to be with Xiaomi cameras. Somebody has found out the solution?
Just here to report that with: auto_update: false - camera settings in configuration.yaml and imported blueprint with chosen option "Default when cleaning" and Interval docked set to 3600, I haven't had any map problems since couple of hours. Thanks for the fix! 😊
Unfortunately, my map broke at 3am this morning with 20s / 1800s settings. ☹️
I waited 19h but nothing. What is recommended settings in blueprint?
Unfortunately, my map broke at 3am this morning with 20s / 1800s settings. ☹️
Broken here as well
I waited 19h but nothing. What is recommended settings in blueprint?
I went with 20s / 1800s, but that doesn't seem to work (for me at least). The default is 10/1800. When (and hopefully not if) I regain access, I simply add a button to refresh the map manually as and when I need it. It's far from ideal, but that should work.
Checklist
The problem
First of all thanks for this great integration! I've been using it for more than a year now without any issues. However for the last couple of days I don't receive any maps anymore. I only see "Failed to retrieve map from vacuum" for both my vacuums (S5 &S7). I've checked the logs but nothing's showing. I only have the custom integration error about that it's not tested by Home Assistant. But after that, nothing at all. Always difficult when something breaks when you didn't change anything...
Any idea's?
What version of an integration has described problem?
v2.2.0
What was the last working version of an integration?
v2.2.0
What vacuum model do you have problems with?
S5 and S7
What version of Home Assistant do you use?
2023.3.6
What type of installation are you running?
Home Assistant Core
Camera's configuration
Errors shown in the HA logs (if applicable)
Additional information
No response