The version 2024.08.0 of the Camera will be fully packed and include the āreset_trimsā service as well a Camera āreloadā Service. It also fixes from the tests done the binary data conversion issues faced in the new versions of Home Assistant (due to an update miss interpretation from my side of the new decoding specs of MQTT).
As per there was several changes in the last month, and I couldnāt honestly fully test the Rand256, the robot just now booted with Rand and hopefully 2024.08.0 will also correct the issues that are facing up since the 2024.07.x versions of the Camera.
Note that to beta test the Camera your Home Assistant should be min. 2024.8.0b0.
This are new āActionsā that are now available with the version 2024.08.0 of our Camera. The reset_trims action is the one that will automatically reset the images trims (when you for example reset/change the vacuums maps) and reload the Camera automatically.
We got also Rand256 to work again, and once again sorry for taking so long
Pillow dependencies are right now a little on the large, but this give the possibility to the users that will not update HA to still run our updates. The aim is to keep it woking and improving it not forcing anyone in the endā¦ ānever touch a running systemā is the role one
No more binary Warning / conversions errors from MQTT with this new version.
I have a query on the āactionā/service for resetting image trims - will this carry-out/run the same task as the āReset Map Trimsā option under the advanced options?
The reason I ask is because Iām using the valetudo map-loader (GitHub - pkoehlers/maploader: Map loader for Dreame robot vacuums running Valetudo) addon to switch valetudo maps so that I can move the robot from one floor to another in my home. When I reload the vacuum camera, the vacuum map is trimmed/clipped and only part of it shows. If I use the āReset Map Trimsā option, this fixes it. So, it would be great to have that available as a service/āactionā if thatās possible
@FireCheetah you are really welcome, yes in theory it should do the same. There is although some issue right now ā it looks it isnāt working as expected. I will do my best to make it fully functional on the 2024.08.1 next week. There is a discussion on the Camera GitHub page that can give you more details of it.
reset_trims āActionā is design to do the same operations required for āReset Map Trimsā including reload the camera. In the case you use only one vacuum this should work. Mainly I noticed that sometimes the reload fails, but as I stated above I will make sure it woks in full by next week.
@FireCheetah I just released the version 2024.08.1 that fixes a couple of thinks on the āActionsā.
With this version the āspecificationsā for the Actions are now fixed.
Action āreloadā = All MQTT Vacuum Cameras are reload no need to specify witch one.
Action āreset-trimsā All auto_crop*.json will be deleted from the storage folder, also here no need to specify the camera. This āActionā will invoke the reload one while executing (no need to reload the camera afterword).
So to invoke the action reset_trims:
action: mqtt_vacuum_camera.reset_trims
data: {}
Those changes ensures that when needed also using map-loader is possible to configure a script to manage those scenarios, and the Camera should render the maps correctly.
Another point, is that the auto_crop data will be written only when the vacuum is ādockedā.
For those that didnāt yet update the camera the version compatible with Home Assistant 2024.8.x is >= 2024.08.0. If you are running the Camera version 2024.06.3 or earlier, please do not hesitate to let me know, but in generalā¦
Update the MQTT Vacuum Camera to at least 2024.08.0
If you do not want to use / canāt use the 2024.06.4 to migrateā¦ some other users had just updated the HACS url for the repository and manually setup the Camera, you off course would need to remove the Valetudo_Vacuum_Camera once you are done (this is automatically done with the 2024.06.4 migration procedure).
@gsca075 Thanks for the update - the reset-trims action is working perfectly .
Iāve included below my scripts for running maploader and the reset-trims actions in case it helps anyone, although theyāre quite simple - I included a 20 second pause between both steps as that seems to be enough time for maploader to finish and for the map files on the robot to be updated.
Then for the Xiaomi Vacuum Interactive Map Card Iām using the following code twice with a different segments and the card visibility settings depending on the maploader floor status. I included a menu selection (menu_id: House Floor Map) to switch between each floor map.
The new 2024.08.2 version of the camera is enabling the Auto Zoom functionality also for Rand256 users.
Did also made a substantial refactor of the rrpaser.py mainly to make it more pythonic (easy to read). Also updated the docs.
With almost 600 download of the previous version, if you appreciate this camera, please star this project on our GitHub Repository if you didnāt yet. This would be really appreciated and also help us to grow up this project.
Hi, thank you for your hard work! Reading this thread and your github, I understand the bug Iām hitting is identified. The map doesnāt seem to update dynamically (roborock s5, latest valetudo), unless I call the āreloadā action. I guess the refactoring mentionned on github is, amongst others, about fixing this? Or should I report it as an issue?
Yep, in order to load the camera a little faster I had to write down the maps trimsā¦ this is why in the last versions I introduced the reset_trims action.
I hope to found a solution a little more friendly for it. As well when the maps of the vacuums will change the camera will probably detect it and do this reset_trims automatically (not store them till the vacuum is again docked). What Iām currently working out is although going to be publish on the 2024.10.0 as there will be a lot of changes that are going a little slow due to personal reasons. I opened an issue as per Iām aware of this āinconvenienceā. Anyhow once the maps are defined in the vacuumā¦ the camera operate normally, isnāt it also in your case? I mean how often you rescan the complete floor? With Rand256 actually is possible to save (with the S5) the maps if you need to change often the maps. I will create on the next version a service that will do this (for the Rand256 vacuums, not clear with the official one is possible).
Thanks in any cases for using this camera, you are really welcome whenever you want or need to open issues, request new features or cooperate actively on this development.
Well our flat has a one step stair in the middle of it, so I have two parts (lower, higher). So saving map is not a option for me,as it should remember two different āfloorsā knowing that the charger is only in one of them.
So once the whole area is mapped, itās perfect. But before that, walls donāt update, or map doesnāt extend progressively to the extensive map, unless of course I call the reload action.
Okay I got itā¦ so just for curiosity, your S5 is mapping with the Start command correct? thatās just to understand if I can solve this or I need to add an enable / disable the store trim to cover this case
But when it finish the cycle, if the dock is not on the second levelā¦ and there are no maps predefinedā¦ mmmmm how the vacuum stop? Manually? you can build a kind of slide for the vacuum to go up and down from the step of course I joke.
Anyhow I think we can work on a solution for this especially because I donāt like it too that the walls are missing and it is necessary to reload constantly. Surely this will be fix on next version, please give me the time to complete it okay?
Well probably you can use HA to detect when the vacuum is in returning to stop it and send it a precise pointā¦I mean it looks it is a really particular scenario.
The vacuum has no problem to locate itself and works perfectly like it used to when connected to the Xiaomi cloud. Itās exactly like having two or three floors in an house and one vacuum.The issue is only being able to follow how it is cleaning and if all the floor has been cleaned. I can do it via the Valetudo interface (webserver), not in homeassistant.
I know where I put it where I launch it on the chargerless floor and it will always return to the point, itās fine.
At the beginning, the s5 was not able to save maps so it used to re scan the whole floor every time, even the one where the dock is.
I will work on it and soon release a beta version so that you can test if the re-scan works as it should be. I donāt know how I can finish to update the 2024.10.0 but I will do my best to help you with the initial issue you are facing
@hayvan96 I just released 2024.10.0b1 that include the attempt to fix the refresh issue. Note that when the vacuum start to clean you must run the reset_trims action in order to clear the trims_data. I repeat the vacuum start and then reset_trims is the correct sequence. The issue was closed automatically from GitHub but please feel free to comment on GitHub if this fix works or not. The camera will refresh the images every 5 frames if no trims_data are set.