Xiaomi Vacuum Control

It does not matter what you prefer, we have community rules regarding use of language.

Problem solved. just enter the itemname in the prefix without _

How can you change the FrameWork7 icons to Material icons?
I tried changing: iconF7: =loop.roomChunk.icon, but that didn’t work. Can you give an example?

Didn’t try it myself, but from the documentation, you should be able to use material icons by changing

iconF7: =loop.roomChunk.icon

to

iconMaterial: =loop.roomChunk.icon

and - for sure - using a material icon definition in the room-json.

Hope that helps.

Yep, thanks. I think I had a typo when I first tried.

This Widget look great! Can you please explain how to use it?
I created a new Widget in OpenHab (“Developer Tools” → “Widgets”) and copied the text from the yaml-File into that form. How can I get it visible within the HUBPanel?

The widget looks amazing and I would like to use it but what items should I add in the widget settings?
These are my items:
thanks!

Hi guys, first of all mega respect for the awesome widget. :star_struck:
I have a beginner question about it.
Probably for some of you quite banal.

Where do I have to copy the code for the JSON object?
I’m kind of at a loss here.

@razserv2010

…but what items should I add in the widget settings?

The widget uses many items - and as I’am quite lazy, I use a item prefix (just a string, no real item) within the widget configuration.

So just look in your items for the vaccuum items and configure the widget with everything before the underscore. (If required, I can add screenshots later, right now I don’t have access)

Maybe the response OH3 Custom Widget - Xiaomi Vacuum Control - #15 by Peter3 helps you as well

@snoopatroopa
@boozzz explained it quite good here: OH3 Custom Widget - Xiaomi Vacuum Control - #21 by boozzz

@boozzz the widget is only for main ui of OH3 (or however the UI is called) HABPanel is something different and afaik can’t use the widget.

@Tetsuo Ok…my question is more where do I add these lines:

[
  {"icon":"bed_double", "roomId": 16, "label": "Schlafzimmer" },
  {"icon":"chat_bubble_2", "roomId": 17, "label": "Wohnzimmer" },
  {"icon":"dial", "roomId":18, "label": "Küche" },
  {"icon":"moon_zzz", "roomId":19, "label": "Gästezimmer" },
  {"icon":"drop", "roomId":20, "label": "Badezimmer" },
  {"icon":"person", "roomId": 22, "label": "Gäste-WC" },
  {"icon":"table", "roomId": 23, "label": "Abstellkammer" },
  {"icon":"device_laptop", "roomId": 24, "label": "Arbeitszimmer" }
]

Oh, sure. If you add the widget to your page, you have the configuration where you also add the item prefix.

There you have to put it into the rooms field.

Sorry, right now I don’t have access to my hab instance - so I can’t post screenshots.

Oh man…thank you very much. Now that I read it again, I should have thought of it too!
:roll_eyes:

1 Like

Hey Guys,

first and foremost thank you for that amazing widget, basically exactly what i was looking for, raises the WAF immensly! :slight_smile:

i’m wondering if i did something wrong, because the room-cleaning actions don’t work for me. i added the widget as usual and added the json array to the config where i placed the widget (i created an extra site). now if i select a room and hit “ausführen” nothing happens… do i need intermediate objects or could it be that the command i need to send is different for the s6 maxv? i do have an object called “Vacuum Room [room#]” which i used before to send commands to the robot (i just made a dummy item for each room which would get added to an array after 30 seconds delay, that array would be sent to that object)

it would be amazing if someone could help me! thank you guys!

Hi Silvan,

not sure if I’m able to help, but try these two hints:

  • Room numbers in JSON, have you tried if the room numbers in the json match the configuration of your Roborock? I did that by writing a simple script with the app_segment_clean[16] command
  • Item-prefix-configuration. As stated in the configuration hint, search in your items for (i.e.) _CleaningMap and use the prefix (everything before the underscore) in the configuration
    image

Hope it helps
Jan

Hi Jan,

thanks for your quick reply. Sadly i (at least think) have configured everything the way it should be. what model roborock are you using? i’m just wondering if it might have something to do with different commands on the different models…
Robot is called Dobby and every element has the Prefix Dobby…

Or did i mess up something with the JSON Object?

thank you very much,
Silvan

I’ve got a S6 - so I don’t think they have different commands.

Hard to tell if there’s something wrong with your JSON, you can try to paste it here to see it is at least well formed.

You can also check if the items used in the widget are available. As my installation is German, I have a mixture of item names:

The following items are used:

  • _Batterieladung
  • _ControlVacuum
  • _CleaningDuration
  • _ControlFanLevel
  • _ExecuteCommand

The last one is the most important one, as the commands are sent to this item.

Not sure how I can be of any more help here - good luck! :wink:

Regards
Jan

There we go!!
I didn’t have the _ExecuteCommand Item, i used to use the CleanRoom [room#] item. now it’s working just fine! thank you very much!

P.S. you don’t happen to know how i can tell the robot to go to a specific point (for example to empty the dustbin)?

Glad to hear!

The “go to spot” is on my wishlist as well, haven’t found time to figure it out but I will add it to the widget as soon as I found a solution on how to find the coordinates to move to.

The github repo here contains all the info required.

With app_goto_target[x,y] you can move your roborock.

you can examine the source code of the offline robomap viewer (in the oh github) to understand the logic… but it is kind of tricky/non-intuitive

If you just occasionally want to find a coordinate, you can use that tool or use the easy startable version of that tool which is posted on the forum

1 Like

Thank you for your hint. Motivated by the previous conversation, I already found your mentioned thread and used the Map Viewer to find the coordinates. Should be enough for this widget.

Added the feature to “empty the bin” yesterday and doing other minor tweaks and testing it currently.