Thanks @marcel_verpaalen, I noted better descriptions but I am still on v3.1.1. Would the addon work on it?
Currently the vacuum is connected to Internet but ultimately I want to firewall it and do everything local. Is it possible to change the mode and maps?
I would assume the way to do it would be via the advanced channel, so therefore I asked @downloadme4free if he could share the rules so I could save some time.
maps changing… dunno. Maybe @downloadme4free already found the commands for it.
If not, these are the commands for your device known… best guess would be the get/set_map
@ DarkoG
I have no rules at all. I just install the binding, create the robot thing and channels in textual configuration files. All credits go to Marcel and his supporters, and it’s my pleasure to share with you. Here is my configuration:
Things file:
About maps: I still don’t know how to get the map list from Mi Home and set the current map. Currently I’m using Mi Home to set the map, which is an “acceptable solution” for me because I rarely need the robot to clean another room
OK, I just installed OHv3.2 and I was playing a bit with the vacuum, so I configured the vacuum as miio:generic device and used the channel ExecuteCommand to get the maps.
So sending
get_map
returns something like this
{"result":[{"name":"Kitchen","id":123456,"cur":true},{"name":"Living","id":1234567,"cur":false},{"name":"Hall en kids","id":12345678,"cur":false},{"name":"Upstairs","id":123456789,"cur":false},{"name":"KitchenNoLim","id":1234567890,"cur":false}],"id":123}
You can then change the maps by sending the command set_map with the id of the map. For example
2021-12-21 00:30:56.937 [INFO ] [internal.handler.MiIoAbstractHandler] - Mi Device model viomi.vacuum.v6 identified as: Viomi Cleaning Robot V-RVCLM21B (viomi.vacuum.v6). Does not match thingtype miio:generic. Changing thingtype to miio:basic
2021-12-21 00:30:56.956 [WARN ] [mon.registry.AbstractManagedProvider] - Could not update element with key miio:generic:CleaningRobotKitchen in ManagedThingProvider, because it does not exists.
EDIT 2
OK Installing MAP transformations solved the problem
@downloadme4free@DarkoG there is no functional difference between the generic and basic for your device. The generic type changes itself to the right type as soon as the first info message is successfully received. (this is what is happening when you see the log message you shared 2021-12-21 00:30:56.937 [INFO ] [internal.handler.MiIoAbstractHandler] - Mi Device model viomi.vacuum.v6 identified as: Viomi Cleaning Robot V-RVCLM21B (viomi.vacuum.v6). Does not match thingtype miio:generic. Changing thingtype to miio:basic
When using text config I recommend to use the right type directly.
The automatic discovery uses generic as for things where the token is not yet known, the binding does not know what type it will be. Hence it creates a generic one, waits for the token and the first message with the model and than changes itself to the right type (e.g. vacuum, basic, unsupported)
You can see in the thing code what is the real type it is using. like in the screenshot
@marcel_verpaalen hi mate. I updated to 3.2 and i created an empty “mapConfig.json” file in the miio folder.Then i restarted openhab but mapConfig.json remains empty…Any ideas?
Suggest to check the debug log… it should give some info on what is going on…
expect one of the below messages… it should also tell the exact location the binding is looking for the file
Vacuum map draw options file {} not found. Using defaults
Error reading vacuum map draw options file {}: {}
Write default map draw options to {}
thnx mate helped a lot.
i have another question .What is the easiest way to command vacuum to clean rooms from habpanel and from google assistnt using voice?I am thinking creating switches for every room and then with rules when switch on
I just got a careli.fryer.maf02. It gets discovered in OH3 UI, but only with a few basic channels.
After creating the thing the debug log says
Mi Device model careli.fryer.maf02 identified as: Unknown Mi IO Device (unknown). Does not match thingtype miio:generic. Changing thingtype to miio:unsupported