Xiaomi Robot Vacuum Binding

What I just did was deleting the JSONs, stopping the binding via console and restarting it. You’ll find the log attached.
I didn’t use any custom JSONs before.

Will investigate more once I get home, but maybe this helps.
miio.txt (232.2 KB)

Yes, I can see something is seriously wrong. Somehow OH is confused about what are the allowed parameters for the things. It seems to mix up the thing config for miio with some chatGPT related options that are defiantly not part of the binding. (it rejects the normal parameter option from miio like model)

few obeservations:
I see there is one local file /etc/openhab/misc/miio/careli.fryer.maf02-miot.json but that does not seem to have issues.
Likewise, seems no issues loading the info from the cloud
There is device on your networkwithout token No token discovered for device 80772758 - 04D07E96 but from the log seems you have not defined it as a thing, so that should not impact anything

I think the origin of the issue is the corruption where your openhab has somehow different parameters for the things than the binding has defined [ParameterOption [value="davinci", label="davinci"], ParameterOption [value="text-similarity-curie-001", label="text-similarity-curie-001"], ParameterOption [value="gpt-3.5-turbo-16k-0613", label="gpt-3.5-turbo-16k-0613"], etc
I have never seen that. I think the other issue Channel types or config descriptions for thing 'miio:generic:airfryer' are missing in the respective registry for more than 120s. In case it does not happen immediately after an upgrade, it should be fixed in the binding. is most likely an artifact of the same strange corruption

@mancer your issue is clear now.
You have or had chatGPT binding installed.
The ChatGPT binding changed the allowed values for all configuration options called model indifferent of which binding it belonged to. Fix is coded, but not yet merged.

Suggest to try to disable the chatGPT binding until the fix is merged.

That did the trick! Uninstalling the binding and re-enabling the things made everything work again. Thank you!

Hi @marcel_verpaalen

Thanks for your reply. I am running openhab on a PI 3B. Java version is openjdk version “17.0.7” 2023-04-18
It is persistent. I tryied to restart openhab already couple of times.

Not sure if I can to something wrong during the installation? Beyond the mentioned data everything is running smoothly.

I found here another user who seems to have similar issue. Unfortunately no reply…

Cheers

The only thing to try is maybe do a simple oh install with only the miio binding on a different laptop/computer to exclude your current oh setup as the issue.

That issue is rather different from yours, though you may also experience that issue.
In that case you can try the fixed version I posted last week in the forum until the fix is merged in the regular oh builds

Hi Marcel.

I simply installed oh in a clean new environment.
with the latest Snapshot my S7 is showing now the History data. Unfortunately the “Last Cleaning Details” are only missing. Its shows only NULL

I saw in the thread some people had similar issues but couldnt see the solution?
Can you advice, please?

Note:
Snip from the log:

2023-10-15 12:27:00.876 [WARN ] [e.internal.SseItemStatesEventBuilder] - Attempting to send a state update of an item which doesn't exist: Roborock_Q7_Max_Cleaning_Start
2023-10-15 13:05:07.240 [WARN ] [e.internal.SseItemStatesEventBuilder] - Attempting to send a state update of an item which doesn't exist: Roborock_Q7_Max_Total_Cleaning_Area
2023-10-15 13:05:15.610 [WARN ] [e.internal.SseItemStatesEventBuilder] - Attempting to send a state update of an item which doesn't exist: Roborock_Q7_Max_Total_Cleaning_Time
2023-10-15 13:05:47.711 [WARN ] [e.internal.SseItemStatesEventBuilder] - Attempting to send a state update of an item which doesn't exist: Roborock_Q7_Max_Cleaning_Start
2023-10-15 13:05:50.105 [WARN ] [e.internal.SseItemStatesEventBuilder] - Attempting to send a state update of an item which doesn't exist: Roborock_Q7_Max_Cleaning_Start
2023-10-15 13:05:58.406 [WARN ] [e.internal.SseItemStatesEventBuilder] - Attempting to send a state update of an item which doesn't exist: Roborock_Q7_Max_Cleaning_End
2023-10-15 13:07:28.253 [WARN ] [e.internal.SseItemStatesEventBuilder] - Attempting to send a state update of an item which doesn't exist: Roborock_Q7_Max_Cleaning_Duration

And still strange:

2023-10-15 13:19:11.362 [WARN ] [nal.transport.MiIoAsyncCommunication] - Could not parse '{"id":132,"result":{"life":35077,"model":"roborock.vacuum.a38","token":"4f575xxx76e","ipflag":1,"miio_ver":"0.0.9","uid":8208037505,"uptime":35089,"mac":"B0:xx:xx:xx:xx:28","fw_ver":"4.3.5_0906","hw_ver":"Linux","miio_client_ver":"4.3.5","VmPeak":9260,"VmSize":9260,"VmRSS":1768,"MemFree":99948,"ap":{"ssid":"dasd","bssid":"x:ss:ss:bb:ss:2e","rssi":"-19","freq":0},"netif":{"loc��>ܞ��|����9��
                                                                                              Ma�|�n���r�E/��d����ܦ�FoH���6C���彆��a���J�5���   ����NF�U�����ľ%�061]},"exe_time":2}' <- {"id":132,"method":"miIO.info","params":[]} (Device: 640219003) gave error com.google.gson.stream.MalformedJsonException: Expected ':' at line 1 column 499 path $.result.netif.loc��>ܞ��|����9��
                                                                                                                                                                            Ma�|�n���r�E/��d����ܦ�FoH���6C���彆��a���J�5���  ����NF�U�����ľ%�061]},
2023-10-15 13:20:41.348 [WARN ] [nal.transport.MiIoAsyncCommunication] - Could not parse '{"id":169,"result":[{"msg_ver":2,"msg_seq":1097,"state":8,"battery":100,"clean_time":2972,"clean_area":45002500,"error_code":0,"map_present":1,"in_cleaning":0,"in_returning":0,"in_fresh_state"���
��V�ɵ�Pat�9��żSz�-�&�L�(�%�+�7uV
p�U�,�uq೤e���                   ��T8�V� S\�1
''Vω�������#eql�_:�g�ng":0,"lock_status":0,"water_box_mode":203,"distance_off":60,"water_box_carriage_status":0,"mop_forbidden_enable":0,"adbumper_status":[0,0,0],"dock_type":5,"dust_collection_status":0,"auto_dust_collection":1,"debug_mode":0,"switch_map_mode":0,"dock_error_status":0,"charge_status":1}],"exe_time":12}' <- {"id":169,"method":"get_status","params":[]} (Device: 640219003) gave error com.google.gson.stream.MalformedJsonException: Expected ':' at line 1 column 194 path $.result[0].in_fresh_state
2023-10-15 21:06:04.333 [INFO ] [internal.handler.MiIoAbstractHandler] - Mi Device model roborock.vacuum.a38 identified as: Roborock Q7 Max (roborock.vacuum.a38). Does not match thingtype miio:generic. Changing thingtype to miio:vacuum

2023-10-15 23:43:56.701 [WARN ] [nal.transport.MiIoAsyncCommunication] - Could not parse '��d����P8�)�Rw��������YݷR��g��N�
Ke&���)�Ha
��i�b߃1�1�]��Ձ�K�XAR����_]��.�X2Pʫ�D�MU�u&fB�R&��V/srds":[1697031817,1696486642,1696320557,1696253060,1695833343,1695821201,1695619374,1695476013,1695457865,1695274110,1695014622,1694876238,1694860994,1694755927,1694526730,1694237806,1694161333,1693650299,1693459097,1693307537]},"exe_time":12}' <- {"id":769,"method":"get_clean_summary","params":[]} (Device: 640219003) gave error com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 2 column 2 path $
2023-10-15 23:48:26.771 [WARN ] [nal.transport.MiIoAsyncCommunication] - Could not parse '{"id":884,"result":{"life":72832,"model":"roborock.vacuum.a38","token":"sdasdfaeraaweas","ipflag":▒▒����s�&����j��,%[ a�t?��p"bssid":"e8:xx:ss:ss:s:2e","rssi":"-19","freq":0},"netif":{"localIp":"192.168.22.22","mask":"255.255.255.0","gw":"192.22.33.1"},"miio_times":[72831,14,0,72816]},"exe_time":2}' <- {"id":884,"method":"miIO.info","params":[]} (Device: 123456) gave error com.google.gson.stream.MalformedJsonException: Expected ':' at line 1 column 336 path $.result.miio_c�9���,O��@?d���p�Cr�H�y▒▒����s�&����j��,%[ a�t?��p
2023-10-15 23:48:26.792 [WARN ] [nal.transport.MiIoAsyncCommunication] - Could not parse 'm��t���]`�*�t�j�c��L� �j
�z?�4���J���Ⱦ�>�,�
                  ��7�F�E���H���E�?㠏��W�t-�)W�]�B}��":98880,"filter_element_work_time":0,"sensor_dirty_time":98632,"dust_collection_work_times":44}],"exe_time":10}' <- {"id":885,"method":"get_consumable","params":[]} (Device: 640219003) gave error com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 10 path $
��量?�=a.ϰh�|7!�h��t���Fswt����)[��l.transport.MiIoAsyncCommunication] - Could not parse 'I�� �('l��
&U�!L����l�|�v��C쟖�nTrQ��r�~n_area":45002500,"error_code":0,"map_present":1,"in_cleaning":0,"in_returning":0,"in_fresh_state":1,"lab_status":3,"water_box_status":1,"fan_power":104,"dnd_enabled":1,"map_status":3,"is_locating":0,"lock_status":0,"water_box_mode":203,"distance_off":60,"water_box_carriage_status":0,"mop_forbidden_enable":0,"adbumper_status":[0,0,0],"dock_type":5,"dust_collection_status":0,"auto_dust_collection":1,"debug_mode":0,"switch_map_mode":0,"dock_error_status":0,"charge_status":1}],"exe_time":11}' <- {"id":10428,"method":"get_status","params":[]} (Device: 640219003) gave error com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 8 path $

Your issues is different from the others, your responses are half readable half garbage.

Don’t know what can cause that. Maybe some bad Wifi connection or strange character encoding.

You could try to change the communication to cloud, maybe that provides a clean response.
As long as you get json parse errors you won’t get proper updates on openhab.

If all fails, check with python-miio if that is decoding proper or you see the same issues.

Thank you Marcel.
I tried already already the communication to cloud. Same result as with direct communication.

Strange is, that python-miio it is propoer working:

openhabian@openhabian:~ $  miiocli roborockvacuum --ip 192.168.x.x--token xyz status
Running command status
r-- State code (VacuumStatus.state_code): 8
r-- State (VacuumStatus.state): Charging
r-- Error code (VacuumStatus.error_code): 0
r-- Error string (vacuum:fault): No error
r-- Dock error code (VacuumStatus.dock_error_code): 0
r-- Dock error string (VacuumStatus.dock_error): No error
r-- Battery (battery:level): 99 %
rw- Mop scrub intensity (VacuumStatus.mop_intensity): 203
r-- Current clean duration (VacuumStatus.clean_time): 0:49:50 s
r-- Current clean area (VacuumStatus.clean_area): 45.4375 m²
rw- Current map (VacuumStatus.current_map_id): 0
r-- Water box attached (VacuumStatus.is_water_box_attached): True
r-- Mop attached (VacuumStatus.is_water_box_carriage_attached): True
rw- Auto dust collection (VacuumStatus.auto_dust_collection): True
r-- Error (VacuumStatus.got_error): False
r-- Main brush used (ConsumableStatus.main_brush): 1 day, 5:06:58 s
r-- Main brush left (ConsumableStatus.main_brush_left): 11 days, 6:53:02 s
r-- Side brush used (ConsumableStatus.side_brush): 1 day, 5:06:58 s
r-- Side brush left (ConsumableStatus.side_brush_left): 7 days, 2:53:02 s
r-- Filter used (ConsumableStatus.filter): 1 day, 5:06:58 s
r-- Filter left (ConsumableStatus.filter_left): 5 days, 0:53:02 s
r-- Sensor dirty used (ConsumableStatus.sensor_dirty): 1 day, 5:02:50 s
r-- Sensor dirty left (ConsumableStatus.sensor_dirty_left): 0:57:10 s
r-- Dustbin times auto-empty used (ConsumableStatus.dustbin_auto_empty_used): 46
r-- Do not disturb (DNDStatus.enabled): True
r-- Do not disturb start (DNDStatus.start): 22:00:00
r-- Do not disturb end (DNDStatus.end): 08:00:00
r-- Total clean duration (CleaningSummary.total_duration): 1 day, 5:02:50 s
r-- Total clean area (CleaningSummary.total_area): 1607.9625 m²
r-- Total clean count (CleaningSummary.count): 49
r-- Total dust collection count (CleaningSummary.dust_collection_count): 46
r-- Last clean start (CleaningDetails.start): 2023-10-24 07:49:32
r-- Last clean end (CleaningDetails.end): 2023-10-24 08:40:29
r-- Last clean duration (CleaningDetails.duration): 0:49:50 s
r-- Last clean area (CleaningDetails.area): 45.4375 m²

As you can see, Last clean infos are visible. Any clue what I could do further or doing wrong?

I have openhab 4.0.1 and just bought a Q Revo vacuum. But when I scan for this device I only get an unsupported device


What am I doing wrong?
I have a Roborock S5 Max as well, which works just fine.

As the binding indicates, it is an unsupported device.
Your new vacuum is very different from the robo rock ones.

Suggest to try the experimental - MIOT protocol option switch, that will try to create a device file for your device. With little luck you can control it then.
If successful / you know which channels work, please feedback than we can incorporate this device in OH as well.

I use this

Version of the Binding. Works fine for me with q revo.

As we wrote, you fixed it with the region settings. :slight_smile:

Btw. here you can find a 4.0.4 Version of the binding. You should be able to use it on 4.0.3 (at least I’m doing that) :slight_smile: I also added a channel for getting the dockingstation status.

org.openhab.binding.miio-4.0.4-SNAPSHOT.jar.rename.txt|attachment (529.1 KB)

Hello. Im using openhab 3 for second day. Im pretty new and a little confused by complexity.

My Vacuum Mop Essentials (Mb1808) was discovered as Mi Vacuum “thing1” and also as unknown MIOT “thing2”.
“Thing1” have some status RO channels, but they are nearly unusable. Most of them reading as NULL and never changes.

So im somehow had performed MIOT discovery and received *.json with channels definition. After reboot im been able to create “thing3” with usable control and status channels.

But they are not set well. Some have garbrage in titles, some R\W channels described as RO and etc.

Im wondering - mb1808 is pretty old machine. Maybe someone already have config.json for it? The whole openhab system is looked toooo huge for me now, i cant understand where it should be and where i may try to find it.

I have a new yeelight ceiling lamp which has also an integrated fan. I add it via web interface and it identifies as:

I wanted to add the channels via the experimental switch but I just have one channel:

How to proceed? If I remember correctly I could add it in openhab 3 but after a fresh install of openhab 4 it doesn’t seem to work anymore.
If I try to change the type it gives me a not allowed error message.

edit:
show advanced turned on:

The dreame.vacuum.mb1808 has no build in json file yet. The one you now have is automatically generated from the spec file published on the xiaomi site. The quality of it varies a lot by device/brand.

It is normal not all channels work. You can delete those from the json file and if you have the working ones we can add it to the binding for future use.

thing 1 and thing 2 can be deleted, if you have already a thing3… they can only interfere.

So, you can try to find back the json file if it was working before.
If not, best to try to build the experimental support miot ( I guess you tried the other (legacy) experimental add support channel)

Once you have proper working version, share the json so we can add your device to the regular binding.

Im tried experimental MIOT (not legacy).
Im already fix *.json how i could, but there are few very foundational functions\channels what i cant for now: MOPing power for somereason is RO for examples.

I can share it “as is” and you help me with other channels?

Yes, but best to first try yourself.
Take a look at this page, that may give a hint for the channels that are not working well for you:

Thank you works fine, but on the long term it would be great if @marcel_verpaalen would include the Q Revo to the official version of the binding