Valetudo Vacuums Map Camera for Home Assistant

Seems to be a generous guy, but a little strange. :slight_smile: But who isnā€™t? :laughing:

Anyway, Valetudo is a cool software, and fortunately it is well maintained. Maybe heā€™s on a nerd level way above us. :joy: :rofl:

I imagine it would get quite frustrating dealing with demands by users for such a popular project. You only have to look at this quote he has on his github home page:

Running a successful open source project is just Good Will Hunting in reverse, where you start out as a respected genius and end up being a janitor who gets into fights. - Byrne Hobart

Still, no excuse for deleting well constructed issue reports without comment.

1 Like

Why do I get the feeling I know that from somewhereā€¦ :thinking:

:+1:

I think this is to be discuss with HA, as per, ā€¦Valetudo comes as it is and donā€™t get me wrong, apparently the guys from HA core are much more cooperative and probably there we can work out a more practical solution.
In the end once again the errors are coming from the MQTT integration. That was an Error in the pastā€¦ so this mean there is to understand how MQTT.sensors can actually receiveā€¦ a different value that isnā€™t binary (what exposed functions are available). Rand256 has also some ā€œissuesā€ with deprecated schemas and actually not support many new types and only one vendor.

Not according to the HA team:

Yes according to them it soā€¦ again, I will test also this option and see if it fixā€™s the problemā€™s, if not I think I should re-discuss the issue.

I know it is a kind of odd. And honestly I hope is clear that Iā€™m trying to understand the phenomenon so that, we can together discuss it, either with the core guys or with Valetudo guys.

For the time be I take the responsibility for it. This is why I felt right to open an issue for it on my sideā€¦

Obviously as per, it is mentioned in that comment, nothing has changed but later on MQTT Exception raised while updating state of sensor BatteryStateAttribute/level' with payload: b'88' Ā· Issue #118629 Ā· home-assistant/core Ā· GitHub

There was some changes on the sensors, this is what Iā€™m talking about now.

@tom_l I changed significantly the connector and I will observe it for a couple of days to see if there is still ā€œbinaryā€ conversions error.
I did also commented, on the ā€œclosedā€ issue in HA, as per, either the casesā€¦ Binary (None Encoding as it was before, or DEFAULT_ENCODING) or Strings the values are just Subscribedā€¦ so why MQTT.sensor is raising the warning when the Camera do not publish Sensors data?
Hopefully, this changes on the Camera code, will solve this warnings :wink: this is all that matters in the end :slight_smile:

Let me know if you want me to test it. Though I think I have the same model vacuum as you (S5).

1 Like

Thanks will do :slight_smile: Iā€™m still working on a couple of things, and I guess will release a couple of betaā€™s next week. I need to wait for the HA betas as well before to release the 2024.08.0.

1 Like

@tom_l and @paddy0174 I did release the 2024.08.0b0 that included the fix for the binary data and some improvements on the snapshots. Hope you guys are willing to test this pre-release and please do not hesitate to open an issue when facing problems.

Thanks! :slight_smile: I for one am willing, but not able to for a few daysā€¦ :frowning: My ā€œElseā€1 isnā€™t available, I needed to unplug her: Weā€™re painting the walls and ceiling, and she wasnā€™t very helpful in the beginning :joy:

But I promise, I will do after the coming weekend! :slight_smile:

1 I named my vacuum after a famous german TV janitor, ā€œElse Klingā€. She played the janitor in a TV series (Lindenstrasse), that ran for 35 years. Thought that would be appropriate. Donā€™t tell me, you havenā€™t named your vacuum robotā€¦ :thinking:

1 Like

Installed. Will let you Know how it goes after my scheduled vacuum later today.

1 Like

Well honestlyā€¦ I guess each one renamed the vacuums, had cool ideas for that. I found the names that they get with the firmwares quite interesting. The ā€œV1ā€ is Silent Tepid Stinkbug, and the ā€œS5ā€ Glossy Hard to Found Narwhal, quite original names I need to sayā€¦ looks interesting :slight_smile: so. ā€œStinkbugā€ and ā€œNarwhalā€, will probably be them after I will change the flat/town later this summer, indeed is cool to give them a little personality and if there is a background is even better :wink:

1 Like

I added large googly-eyes and moustache stickers to my two, but I have not named them.

Good news, no binary mqtt message warnings!

1 Like

Super :slight_smile: then we solved the problem :face_with_peeking_eye: in the end it was the decoding of the payload as I wrote earlier. So just few new adjustments and when Home Assistant 2024.8.0 come out and we can test the Camera with the beta releases we should be able to release the 2024.08.0. As there are issues for the guys using one vacuum on multi floors (using maploader) I will add an option to create the pre-loaded trims file or not, this means old way reload (warning can occur) or new stile with pre-loaded trims (no warnings) will be selectable.
Edit: I would need also to re-flash the S5 with Rand256 to make sure that also this firmware works this is also why this will take time :wink:

1 Like

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.

2 Likes

Screenshot 2024-08-03 at 10.43.04

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 :wink:

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 :slight_smile:

No more binary Warning / conversions errors from MQTT with this new version.

Thank-you very much for making this integration.

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ā€¦

  1. Update the Camera to 2024.06.4.
  2. Follow the instruction for the migration process.
  3. Update HACS repository of this integration to MQTT_Vacuum_Camera
  4. 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).