# Xiaomi Robot Vacuum Binding

**URL:** <https://community.openhab.org/t/xiaomi-robot-vacuum-binding/31317>\
**Category:** Bindings\
**Tags:** binding, vacuum, xiaomi\
**Created:** [July 9, 2017, 9:53pm UTC](https://community.openhab.org/t/xiaomi-robot-vacuum-binding/31317 "2017-07-09T21:53:18Z")\
**Posts on this page:** 20\
**Page:** 105

<div class="post-metadata">

**Author:** ![marcel\_verpaalen](https://community.openhab.org/user_avatar/community.openhab.org/marcel_verpaalen/32/56968_2.png) [@marcel\_verpaalen](https://community.openhab.org/u/marcel_verpaalen)\
**Post date:** [August 6, 2023, 9:43am UTC](https://community.openhab.org/t/xiaomi-robot-vacuum-binding/31317/2118 "2023-08-06T09:43:15Z")

</div>

> [@shuo](#):
>
> `transport.MiIoAsyncCommunication] - Could not parse ....... gave error com.google.gson.stream.MalformedJsonException: Unterminated object at line 1 column 316 path $.result.mac`

This is a not related to your above issue.

However it is rather odd response in the mac field with lot of garbage. Does this already happen?

---

<div class="post-metadata">

**Author:** ![mancer](https://community.openhab.org/letter_avatar_proxy/v4/letter/m/e95f7d/32.png) [@mancer](https://community.openhab.org/u/mancer)\
**Post date:** [August 7, 2023, 2:41pm UTC](https://community.openhab.org/t/xiaomi-robot-vacuum-binding/31317/2119 "2023-08-07T14:41:07Z")

</div>

A couple of days ago my MIIO things started throwing the following error:

```yaml
Failed to normalize configuration for thing 'miio:basic:moppiBasic': {thing/channel=Type description miio:IJAI_VACUUM_V19_actions for miio:basic:moppiBasic:actions not found, although we checked the presence before.}
Thing 'miio:basic:moppiBasic' changed from UNINITIALIZED (DISABLED) to UNINITIALIZED (HANDLER_CONFIGURATION_PENDING): {model=Der Wert ijai.vacuum.v19 ist nicht in den erlaubten Optionen enthalten. Erlaubte Optionen sind: [ParameterOption [value="text-davinci-001", label="text-davinci-001"], ParameterOption [value="text-search-curie-query-001", label="text-search-curie-query-001"], ParameterOption [value="davinci", label="davinci"], ParameterOption [value="text-babbage-001", label="text-babbage-001"], ParameterOption [value="curie-instruct-beta", label="curie-instruct-beta"], ParameterOption [value="text-davinci-003", label="text-davinci-003"], ParameterOption [value="davinci-similarity", label="davinci-similarity"], ParameterOption [value="code-davinci-edit-001", label="code-davinci-edit-001"], ParameterOption [value="text-similarity-curie-001", label="text-similarity-curie-001"], ParameterOption [value="text-embedding-ada-002", label="text-embedding-ada-002"], ParameterOption [value="ada-code-search-text", label="ada-code-search-text"], ParameterOption [value="text-search-ada-query-001", label="text-search-ada-query-001"], ParameterOption [value="babbage-search-query", label="babbage-search-query"], ParameterOption [value="ada-similarity", label="ada-similarity"], ParameterOption [value="gpt-3.5-turbo", label="gpt-3.5-turbo"], ParameterOption [value="whisper-1", label="whisper-1"], ParameterOption [value="text-search-ada-doc-001", label="text-search-ada-doc-001"], ParameterOption [value="text-search-babbage-query-001", label="text-search-babbage-query-001"], ParameterOption [value="code-search-ada-code-001", label="code-search-ada-code-001"], ParameterOption [value="curie-search-document", label="curie-search-document"], ParameterOption [value="text-search-davinci-query-001", label="text-search-davinci-query-001"], ParameterOption [value="text-search-curie-doc-001", label="text-search-curie-doc-001"], ParameterOption [value="gpt-3.5-turbo-0301", label="gpt-3.5-turbo-0301"], ParameterOption [value="babbage-search-document", label="babbage-search-document"], ParameterOption [value="babbage-code-search-text", label="babbage-code-search-text"], ParameterOption [value="davinci-instruct-beta", label="davinci-instruct-beta"], ParameterOption [value="davinci-search-query", label="davinci-search-query"], ParameterOption [value="text-similarity-babbage-001", label="text-similarity-babbage-001"], ParameterOption [value="text-davinci-002", label="text-davinci-002"], ParameterOption [value="code-search-babbage-text-001", label="code-search-babbage-text-001"], ParameterOption [value="babbage", label="babbage"], ParameterOption [value="text-search-davinci-doc-001", label="text-search-davinci-doc-001"], ParameterOption [value="code-search-ada-text-001", label="code-search-ada-text-001"], ParameterOption [value="gpt-3.5-turbo-16k-0613", label="gpt-3.5-turbo-16k-0613"], ParameterOption [value="gpt-3.5-turbo-16k", label="gpt-3.5-turbo-16k"], ParameterOption [value="ada-search-query", label="ada-search-query"], ParameterOption [value="text-similarity-ada-001", label="text-similarity-ada-001"], ParameterOption [value="ada-code-search-code", label="ada-code-search-code"], ParameterOption [value="ada", label="ada"], ParameterOption [value="text-davinci-edit-001", label="text-davinci-edit-001"], ParameterOption [value="davinci-search-document", label="davinci-search-document"], ParameterOption [value="curie-search-query", label="curie-search-query"], ParameterOption [value="babbage-similarity", label="babbage-similarity"], ParameterOption [value="ada-search-document", label="ada-search-document"], ParameterOption [value="text-ada-001", label="text-ada-001"], ParameterOption [value="text-similarity-davinci-001", label="text-similarity-davinci-001"], ParameterOption [value="curie", label="curie"], ParameterOption [value="curie-similarity", label="curie-similarity"], ParameterOption [value="gpt-3.5-turbo-0613", label="gpt-3.5-turbo-0613"], ParameterOption [value="babbage-code-search-code", label="babbage-code-search-code"], ParameterOption [value="code-search-babbage-code-001", label="code-search-babbage-code-001"], ParameterOption [value="text-search-babbage-doc-001", label="text-search-babbage-doc-001"], ParameterOption [value="text-curie-001", label="text-curie-001"]]}

```

The log content is - apart from the name of the MIIO thing - always the same and it happens to all MIIO things.  
I did try removing and re-adding the thing and also re-installing the binding, but nothing helped.

Weird thing is that happened pretty much “out of the blue” - I did update to OH4 a couple of weeks ago, but this only happened a couple of days ago.  
There’s already a discussion on this as some other bindings run into those issues as well (see at [openHAB 4.0 Milestone discussion - #278 by glen\_m](https://community.openhab.org/t/openhab-4-0-milestone-discussion/145133/278)), maybe @marcel_verpaalen you have an idea what’s causing this and/or how it can be fixed.

Thanks in advance

---

<div class="post-metadata">

**Author:** ![marcel\_verpaalen](https://community.openhab.org/user_avatar/community.openhab.org/marcel_verpaalen/32/56968_2.png) [@marcel\_verpaalen](https://community.openhab.org/u/marcel_verpaalen)\
**Post date:** [August 11, 2023, 7:07am UTC](https://community.openhab.org/t/xiaomi-robot-vacuum-binding/31317/2120 "2023-08-11T07:07:28Z")

</div>

Yes indeed, this seems to be something recently introduced, not specific related to the binding.

> <https://github.com/openhab/openhab-addons/issues/14954>
>
> Some bindings implementing dynamic thing types, channel types or channel group t…ypes are now initialized with a delay of 2 minutes. The thing status is UNINITIALIZED/NOT\_YET\_READY during this delay. After this delay, you got these warning in logs and the thing finally goes ONLINE:
> \`\`\`
> 20:25:31.807 \[INFO \] \[org.openhab.core.Activator \] - Starting openHAB 4.0.0 (build Build #3453)
> 
> 20:25:47.197 \[INFO \] \[re.automation.internal.RuleEngineImpl\] - Rule engine started.
> 
> 20:27:44.279 \[WARN \] \[.core.thing.internal.ThingManagerImpl\] - Channel types or config descriptions for thing 'remoteopenhab:server:prod' 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.
> 20:27:44.290 \[WARN \] \[.core.thing.internal.ThingManagerImpl\] - Failed to normalize configuration for thing 'remoteopenhab:server:prod': {thing/channel=Type description remoteopenhab:itemString1 for remoteopenhab:server:prod:SonosSalonRadio not found, although we checked the presence before.}
> 20:27:44.313 \[INFO \] \[hab.event.ThingStatusInfoChangedEvent\] - Thing 'remoteopenhab:server:prod' changed from UNINITIALIZED (NOT\_YET\_READY) to INITIALIZING
> 20:27:44.319 \[INFO \] \[hab.event.ThingStatusInfoChangedEvent\] - Thing 'remoteopenhab:server:prod' changed from INITIALIZING to UNKNOWN
> 20:27:45.598 \[INFO \] \[hab.event.ThingStatusInfoChangedEvent\] - Thing 'remoteopenhab:server:prod' changed from UNKNOWN to ONLINE
> \`\`\`
> See issue openhab/openhab-core#3394
> PR openhab/openhab-core#3407 introduces \`AbstractStorageBasedTypeProvider\` to reduce this problem.
> It has now to be used in the bindings with dynamic type providers showing this delay at startup.
> 
> Bindings implementing ThingTypeProvider:
> 
> \- \[\] digitalstrom
> \- \[\] homematic
> \- \[\] mqtt.generic
> \- \[x\] netatmo =\> no change required
> \- \[x\] systeminfo =\> PR #14501 
> 
> Bindings implementing ChannelTypeProvider:
> 
> \- \[\] bluetooth.generic
> \- \[\] digitalstrom
> \- \[x\] guntamatic =\> change required =\> PR #17901
> \- \[x\] harmonyhub =\> PR #14507 
> \- \[\] homematic
> \- \[\] km200
> \- \[\] miio
> \- \[\] mqtt.generic
> \- \[x\] netatmo =\> no change required
> \- \[\] networkupstools
> \- \[x\] remoteopenhab =\> PR #14956 
> \- \[x\] resol =\> no change required
> \- \[\] sensibo : change required
> \- \[x\] smartmeter : PR #19146
> \- \[\] solarwatt
> \- \[\] tacmi
> \- \[x\] tr064 =\> no change required
> \- \[\] wundergroundupdatereceiver
> \- \[\] yamahareceiver : change required
> 
> Bindings implementing ChannelGroupTypeProvider:
> 
> \- \[\] evcc : requires dynamic channel groups per \`loadpoint\` and \`vehicle\`. not yet implemented
> \- \[x\] harmonyhub =\> PR #14507 
> \- \[\] homematic
> \- \[\] km200
> \- \[\] mqtt.generic
> \- \[\] sensibo : to be removed as the binding does not use channel groups

It is unclear how (from the binding side) I could do anything to prevent this. The dynamic creation of channels is rather fundamental to be able to support the over 350 different miio devices

I have not seen it with my devices yet, but will keep eye on it

---

<div class="post-metadata">

**Author:** ![mancer](https://community.openhab.org/letter_avatar_proxy/v4/letter/m/e95f7d/32.png) [@mancer](https://community.openhab.org/u/mancer)\
**Post date:** [August 11, 2023, 9:57pm UTC](https://community.openhab.org/t/xiaomi-robot-vacuum-binding/31317/2121 "2023-08-11T21:57:25Z")

</div>

Same thing happens when I create the thing via text file… I have no idea how I can use my Xiaomi devices in OH at this point 😕

---

<div class="post-metadata">

**Author:** ![Wikibear](https://community.openhab.org/user_avatar/community.openhab.org/wikibear/32/50394_2.png) [@Wikibear](https://community.openhab.org/u/Wikibear)\
**Post date:** [August 12, 2023, 2:30pm UTC](https://community.openhab.org/t/xiaomi-robot-vacuum-binding/31317/2122 "2023-08-12T14:30:16Z")

</div>

Miio Binding crash my openhab after upgrade to OH4. I have uninstalled everything and started new. Seems to be running now. But i get everytime a new device in my inbox. Is there only a way to ignore? Why will this find again and again when it’s created?

---

<div class="post-metadata">

**Author:** ![Wikibear](https://community.openhab.org/user_avatar/community.openhab.org/wikibear/32/50394_2.png) [@Wikibear](https://community.openhab.org/u/Wikibear)\
**Post date:** [August 12, 2023, 8:38pm UTC](https://community.openhab.org/t/xiaomi-robot-vacuum-binding/31317/2123 "2023-08-12T20:38:33Z")

</div>

```php
23-08-12 22:20:31.162 [WARN] [core.thing.internal.ThingManagerImpl] - Chan
nel types or config descriptions for thing 'miio:generic:RobbyBubble' are mis
sing in the respective registry for more than 120s. In case it does not happe
n immediately after an upgrade, it should be fixed in the binding.
2023-08-12 22:20:31.346 [WARN] [core.thing.internal.ThingManagerImpl] - Fail
ed to normalize configuration for thing 'miio:generic:RobbyBubble': {thing/ch
annel=Type description miio:DREAME_VACUUM_MC1808_vacuumaction for miio:generi
c:RobbyBubble:vacuumaction not found, although we checked the presence before
.}

```

Openhab stops working again and after restart I get this into my log.

---

<div class="post-metadata">

**Author:** ![J-N-K](https://community.openhab.org/user_avatar/community.openhab.org/j-n-k/32/19276_2.png) [@J-N-K](https://community.openhab.org/u/J-N-K)\
**Post date:** [August 12, 2023, 8:48pm UTC](https://community.openhab.org/t/xiaomi-robot-vacuum-binding/31317/2124 "2023-08-12T20:48:39Z")

</div>

Have a look at the two reference implementations of the storage based thing/channel type provider. Essentially, you need to create a provider for the thing/channel types, so that they are available when the thing manager tried to initialize the things.

---

<div class="post-metadata">

**Author:** ![shuo](https://community.openhab.org/letter_avatar_proxy/v4/letter/s/5daacb/32.png) [@shuo](https://community.openhab.org/u/shuo)\
**Post date:** [August 17, 2023, 11:08am UTC](https://community.openhab.org/t/xiaomi-robot-vacuum-binding/31317/2125 "2023-08-17T11:08:25Z")

</div>

> [@marcel\_verpaalen](#):
>
> I’m not sure a GitHub issue already exist for it, but if not, would be helpful to log the issue with accompanied by a debug log that shows the vacuum response during the refresh

Thank you Marcel. I hope it is not stupid, but how to log? What is the prefered message? The above mentioned log isnt enough?  
Shall I open a thread in GitHub?

---

<div class="post-metadata">

**Author:** ![marcel\_verpaalen](https://community.openhab.org/user_avatar/community.openhab.org/marcel_verpaalen/32/56968_2.png) [@marcel\_verpaalen](https://community.openhab.org/u/marcel_verpaalen)\
**Post date:** [August 19, 2023, 11:42am UTC](https://community.openhab.org/t/xiaomi-robot-vacuum-binding/31317/2126 "2023-08-19T11:42:42Z")

</div>

Think it is in the readme, but in summary:  
In the console type `log:set DEBUG org.openhab.binding.miio`

Log a minute or so, then you normally have a full refresh fully captured

Indeed, pls make a GitHub issue as then it is tracked.

---

<div class="post-metadata">

**Author:** ![Constantinos\_Contis](https://community.openhab.org/letter_avatar_proxy/v4/letter/c/e19b73/32.png) [@Constantinos\_Contis](https://community.openhab.org/u/Constantinos_Contis)\
**Post date:** [August 22, 2023, 2:43pm UTC](https://community.openhab.org/t/xiaomi-robot-vacuum-binding/31317/2127 "2023-08-22T14:43:35Z")

</div>

Hi guys, i just got today a SmartMi circulation fan 2 .I tried everything but i cant connect it to Mi Home app (china server,it is not available to eu server yet…)I find it in the app ,i reset the fan,the app scans but nothing is found.The fan’s accesspoint wifi name is all chinese letters…I just want to control it ,even for on/off from my openhab.What can i do?I own 2 other Smartmi fans and they work great with openhab…

The fan only connects normally with SmartMi Link App.Any ideas?

---

<div class="post-metadata">

**Author:** ![shuo](https://community.openhab.org/letter_avatar_proxy/v4/letter/s/5daacb/32.png) [@shuo](https://community.openhab.org/u/shuo)\
**Post date:** [August 23, 2023, 1:45pm UTC](https://community.openhab.org/t/xiaomi-robot-vacuum-binding/31317/2128 "2023-08-23T13:45:05Z")

</div>

Hi Marcel,

I created a githup-ticket. Hope the log-file is enough?

> <https://github.com/openhab/openhab-addons/issues/15490>
>
> Some Information are not received correctly:
> 
> history#total\_clean\_area
> histor…y#total\_clean\_time
> history#total\_clean\_count
> cleaning#last\_clean\_start\_time
> cleaning#last\_clean\_end\_time
> cleaning#last\_clean\_area
> cleaning#last\_clean\_duration
> cleaning#last\_clean\_error
> cleaning#last\_clean\_finish
> 
> Debugging shows an parsing issue. Probably the owner could implement some smarter decoding which works for both old and new models for these field:
> 
> \`
> 2023-08-01 09:15:20.707 \[WARN \] \[nal.transport.MiIoAsyncCommunication\] - Could not parse '�@^�#�5�u��\>Zft":\[{"main\_brush\_work\_time":33577,"side\_brush\_work\_time":33577,"filter\_work\_time":33577,"filter\_element\_work\_time":0,"sensor\_dirty\_time":33329,"dust\_collection\_work\_times":16}\],"exe\_time":10}' \<- {"id":764,"method":"get\_consumable","params":\[\]} (Device: xx21XX90x) gave error com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 6 path $
> 2023-08-01 09:54:29.867 \[WARN \] \[nal.transport.MiIoAsyncCommunication\] - Could not parse '{"id":13180,"result":{"life":227�0|�U��v
> 2023-08-01 09:58:29.349 \[WARN \] \[nal.transport.MiIoAsyncCommunication\] - Could not parse '��FoL�\*�J 0M��,��/��w�U�
> 2023-08-01 10:13:02.547 \[WARN \] \[nal.transport.MiIoAsyncCommunication\] - Could not parse '���A�?��3消©�~�
> 2023-08-01 10:24:03.312 \[WARN \] \[nal.transport.MiIoAsyncCommunication\] - Could not parse '{"id":13917,"result":{"clean\_time":33329,"clean\_area":485050000,"clean\_count":18,"dust\_collectio�����8�#�-&����Hk�\>\>�\*SA'�Ei����	�ۀn�,�C���R������L��)�"J9̇�h�\[�#�~�ؼ�nt�N�cNF���i.���690399564,1690376977,1690350219,1690273708,1690269919,1690265267,1689962776,1689952018,1689800851,1689800750\]},"exe\_time":10}' \<- {"id":13917,"method":"get\_clean\_summary","params":\[\]} (Device: xx21XX90x) gave error com.google.gson.stream.MalformedJsonException: Expected ':' at line 1 column 164 path $.result.dust\_collectio�����8�#�-&����Hk�\>\>�\*SA'�Ei����	�ۀn�,�C���R������L��)�
> 2023-08-01 11:13:44.091 \[WARN \] \[nal.transport.MiIoAsyncCommunication\] - Could not parse '{"id":153,"result":{"clean\_time":33329,"clean\_area":485050000,"clean\_count":18,"V����5 i
> A��@ G�j�?"�u
> u�q��#�V�G��ߋ�%U!Yj�֯7
> �� �nxN�An,{�5i����&w�q�K��P�Ą��Kd�.\]a�CN~=�0Y7,1690443056,1690399564,1690376977,1690350219,1690273708,1690269919,1690265267,1689962776,1689952018,1689800851,1689800750\]},"exe\_time":11}' \<- {"id":153,"method":"get\_clean\_summary","params":\[\]} (Device: xx21XX90x) gave error com.google.gson.stream.MalformedJsonException: Expected ':' at line 2 column 14 path $.result.V����5 i
> A��@ G�j�?
> 2023-08-01 11:23:14.162 \[WARN \] \[nal.transport.MiIoAsyncCommunication\] - Could not parse '{"id":392,"result":\[{"msg\_ver":2,"msg\_seq":786,"state":8,"battery":100,"clean\_time":2585,"clean\_area":41365000,"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":106,"dnd\_enabled":0,"map\_status":7,"is\_locatin\*�/ے� Dj��L�	��Aa;eOz��#%��8Ν\[�g��c���'4��8���\`p	|��o"h9.��P,�Dh��Y�ry\]&�+Sw��ٞ!�d�anh}k�'�(A: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":10}' \<- {"id":392,"method":"get\_status","params":\[\]} (Device: xx21XX90x) gave error com.google.gson.stream.MalformedJsonException: Expected ':' at line 1 column 351 path $.result\[0\].is\_locatin\*�/ے� Dj��L�	��Aa;eOz��#%��8Ν\[�g��c���'4��8���\`p	|��o
> 2023-08-01 14:05:38.477 \[WARN \] \[nal.transport.MiIoAsyncCommunication\] - Could not parse '��u��X�zƁ���9勋U\\���^K	���\>�Dq��T����L�9\*,�i�?9��Mr;�ċ�Cp8 \_���s�WB�)��)��H��	�Xӄ#�{�	��ݳ\\E\_element\_work\_time":0,"sensor\_dirty\_time":36669,"dust\_collection\_work\_times":17}\],"exe\_time":11}' \<- {"id":3371,"method":"get\_consumable","params":\[\]} (Device: xx21XX90x) gave error com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 17 path $
> 2023-08-01 14:18:10.388 \[WARN \] \[nal.transport.MiIoAsyncCommunication\] - Could not parse '{"id":4870,"result":{"life":38617,"model":"roborock.vacuum.a38","token":"4f5758412345678900ß635zrt44545246e","ipflag":1,"miio\_ver":"0.0.9","uid":8208037505,"uptime":38629,"mac":"B0:4A:39:71:74:2%6J~ ��O�ƙZoޟ0��I.�C�\[�ŵ�\>R��/=A��WoW��������ӳ����:�\<eF%Q��X�7�J�Q��X�q�G��4�@冬�(�k�#p�\<PV��&+��^�f��9":{"ssid":"blabla","bssid":"e1:d2:73:b3:45:5d","rssi":"-14","freq":0},"netif":{"localIp":"192.168.178.11","mask":"255.255.255.0","gw":"192.168.178.1"},"miio\_times":\[38616,15,0,38600\]},"exe\_time":1}' \<- {"id":4870,"method":"miIO.info","params":\[\]} (Device: xx21XX90x) gave error com.google.gson.stream.MalformedJsonException: Unterminated object at line 1 column 316 path $.result.mac
> 2023-08-01 15:53:27.826 \[WARN \] \[nal.transport.MiIoAsyncCommunication\] - Could not parse '{"id":7246,"result":{"life":44334,"model":"roborock.vacuum.a38","token":"4f5758412345678900ß635zrt44545246e","ipflag":1,"miio\_ver":"0.0.9","uid":8208037505,"uptime":44346,"mac":"B0:4A:39:71:74:28","fw\_ver":"4.3.5\_0906","hw\_ver":"Linux","miio\_�2� �3�;1mB��!��26��{�6�b7�N$p�����.��(@�	�"VmRSS":1760,"MemFree":24856,"ap":{"ssid":"blabla"a;g�!�4�S��l�nn�\`����	LͰ��Q�g�	4�Sh�Lq\<C)9 +}�Kz2��calIp":"192.168.178.11","mask":"255.255.255.0","gw":"192.168.178.1"},"miio\_times":\[44334,15,0,44318\]},"exe\_time":1}' \<- {"id":7246,"method":"miIO.info","params":\[\]} (Device: xx21XX90x) gave error com.google.gson.stream.MalformedJsonException: Expected ':' at line 1 column 291 path $.result.miio\_�2� �3�;1mB��!��26��{�6�b7�N$p�����.��(@�	�
> 2023-08-01 16:24:40.747 \[WARN \] \[nal.transport.MiIoAsyncCommunication\] - Could not parse '�&��Y۷x?���@�Q?+0׆��.���RD���="H���e��x�Xf�
> \`�=P\*��Ȑ�.&V�O�X%P�274673644564432763532776e","ipflag":1,"miio\_ver":"0.0.9","uid":8208037505,"uptime":46219,"mac":"B0:4A:39:71:74:28","fw\_ver":"4.3.5\_0906","hw\_ver":"Linux","miio\_client\_ver":"4.3.5","VmPeak":9260,"VmSize":9260,"VmRSS":1760,"MemFree":24204,"ap":{"ssid":"blabla","bssid":"e1:d2:73:b3:45:5d","rssi":"-14","freq":0},"netif":{"localIp":"192.168.178.11","mask":"255.255.255.0","gw":"192.168.178.1"},"miio\_times":\[46207,15,0,46191\]},"exe\_time":2}' \<- {"id":8022,"method":"miIO.info","params":\[\]} (Device: xx21XX90x) gave error com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 36 path $
> 2023-08-01 16:42:45.975 \[WARN \] \[nal.transport.MiIoAsyncCommunication\] - Could not parse '{"id":8472,"result":\[{"msg\_ver":2,"msg\_seq":2229�ĝ7q"kֽ^�{�֯H��O1I��ViX2�V�W���߳.�ľ�Z�N"����$���N��dc�E�� wS ��n����\[�\]Pg.T�.ƒRho���z�ƳmD�
> hc�"in\_returning":0,"in\_fresh\_state":1,"lab\_status":3,"water\_box\_status":1,"fan\_power":104,"dnd\_enabled":0,"map\_status":3,"is\_locating":0,"lock\_status":0,"water\_box\_mode":203,"distance\_off":60,"water\_box\_carriage\_status":1,"mop\_forbidden\_enable":1,"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":10}' \<- {"id":8472,"method":"get\_status","params":\[\]} (Device: xx21XX90x) gave error com.google.gson.stream.MalformedJsonException: Unterminated object at line 1 column 60 path $.result\[0\].msg\_seq
> 2023-08-01 16:53:16.780 \[WARN \] \[nal.transport.MiIoAsyncCommunication\] - Could not parse '{"id":4874,"result":{"life":47923,"model":"roborock.vacuum.a38","token":"4f5758412345678900ß635zrt44545246e","ipflag":1,"miio\_ver":"0.0.9","uid":8208037505,"uptime":47935,"mac":"B0:4A:39:71:74:28","fw\_ver":"4.3.5\_0906","hw\_ver":"Linux","miio\_client\_ver":"4.3.5","VmPeak":9260,"VmSize":9260,"VmRSS":1760,"MemFree":22624,"ap":{"ssid":"blabla","bssid":"e1:d2:73:b3:45:5d","rssi":"-14","freq":0},"netif":{"lox��6�\]�X��9{��EY�G2f�=�
> 9h��8-�a��v��\]���ߜ��o~!�8�.�\\�(�2�#�� �%�o�t�ʈ��\>J�b@��D�M�g�A\>hZ�yb�":1}' \<- {"id":4874,"method":"miIO.info","params":\[\]} (Device: xx21XX90x) gave error com.google.gson.stream.MalformedJsonException: Invalid escape sequence at line 2 column 35 path $.result.netif.
> 2023-08-01 17:02:49.518 \[WARN \] \[nal.transport.MiIoAsyncCommunication\] - Could not parse '{"id":8973,"result":{"life":48496,"model":"roborock.vacuum.a38","token":"4f5758412345678900ß635zrt44545246e","ipflag":1,"miio\_ver":"0.0.9","uid":8208037505,"uptime":48508,"mac":"B0:4A:39:71:74:28","fw\_ver":"4.3.5\_0906","hw\_ver":"Linux","miio\_client\_ver":"4.3.5","VmPeak":9260,"VmSize":9260,"VmRSS":1760,"MemFree":23068,"ap":{"ssid":"blabla","bssid":"e1:d2:73:b3:45:5d","rs�w'���H�z�Ck���HU�r��^����Ѷ��G�ݱik�h�����3����0\_�4��\["255.255.255.0","gw":"192.168.178.1"},"miio\_times":\[48496,15,0,48480\]},"exe\_time":2}' \<- {"id":8973,"method":"miIO.info","params":\[\]} (Device: xx21XX90x) gave error com.google.gson.stream.MalformedJsonException: Expected ':' at line 1 column 433 path $.result.ap.rs�w'���H�z�Ck���HU�r��^����Ѷ��G�ݱik�h�����3����0\_�4��\[
> 2023-08-01 17:07:19.579 \[WARN \] \[nal.transport.MiIoAsyncCommunication\] - Could not parse '���Ft;�L&!��xlt":\[{"start\_hour":22,"start\_minute":0,"end\_hour":8,"end\_minute":0,"enabled":1}\],"exe\_time":11}' \<- {"id":9083,"method":"get\_dnd\_timer","params":\[\]} (Device: xx21XX90x) gave error com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 9 path $
> 2023-08-01 17:33:24.020 \[WARN \] \[nal.transport.MiIoAsyncCommunication\] - Could not parse '{"id":5236,"result":\[{"main\_brush\_work\_time":36917,"side\_brush\_work\_time":36917,"filter\_work\_tim!��2��|�5��j j �"/�)//����fB��j\>6��d��@ؤe^����ݰj���\`ж#5��?�3��-��C6���f�D� ��P!݃l���t�����/�' \<- {"id":5236,"method":"get\_consumable","params":\[\]} (Device: xx21XX90x) gave error com.google.gson.stream.MalformedJsonException: Expected ':' at line 1 column 118 path $.result\[0\].filter\_work\_tim!��2��|�5��j j �
> 2023-08-01 18:01:56.387 \[WARN \] \[nal.transport.MiIoAsyncCommunication\] - Could not parse 'Z�Zbd�J�J7Y9Iult":{"life":52043,"model":"roborock.vacuum.a38","token":"4f5758412345678900ß635zrt44545246e","ipflag":1,"miio\_ver":"0.0.9","uid":8208037505,"uptime":52055,"mac":"B0:4A:39:71:74:28","fw\_ver":"4.3.5\_0906","hw\_ver":"Linux","miio\_client\_ver":"4.3.5","VmPeak":9260,"VmSize":9260,"VmRSS":1760,"MemFree":19684,"ap":{"ssid":"blabla","bssid":"e1:d2:73:b3:45:5d","rssi":"-14","freq":0},"netif":{"localIp":"192.168.178.11","mask":"255.255.255.0","gw":"192.168.178.1"},"miio\_times":\[52042,15,0,52026\]},"exe\_time":2}' \<- {"id":10449,"method":"miIO.info","params":\[\]} (Device: xx21XX90x) gave error com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 22 path $
> 2023-08-01 18:38:09.670 \[WARN \] \[nal.transport.MiIoAsyncCommunication\] - Could not parse '{"id":5814,"result":{"clean\_time":36669,"clean\_a�|BW\]%�9��06����
> Bˮ��e�u�djhi�}R��! (��QE �X{E��S�w�Vln�9a�0}���^�� l�{ɥ�h���t
> �B�3$��(=��i" \`���cF���%��/^���mm(�20521150,1690521145,1690446447,1690443056,1690399564,1690376977,1690350219,1690273708,1690269919,1690265267,1689962776,1689952018,1689800851,1689800750\]},"exe\_time":11}' \<- {"id":5814,"method":"get\_clean\_summary","params":\[\]} (Device: xx21XX90x) gave error com.google.gson.stream.MalformedJsonException: Expected ':' at line 2 column 86 path $.result.clean\_a�|BW\]%�9��06����
> Bˮ��e�u�djhi�}R��! (��QE �X{E��S�w�Vln�9a�0}���^�� l�{ɥ�h���t
> �B�3$��(=��i
> 2023-08-01 18:51:12.619 \[WARN \] \[nal.transport.MiIoAsyncCommunication\] - Could not parse '����m0X�@j�r���ک6�B�%\\�����?m◸�m�ΪQ.F)�":F��Y\<˘#p{���VR���\_\< ״:0,"enabled":1}\],"exe\_time":11}' \<- {"id":5930,"method":"get\_dnd\_timer","params":\[\]} (Device: xx21XX90x) gave error com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 26 path $
> 2023-08-01 18:53:12.602 \[WARN \] \[nal.transport.MiIoAsyncCommunication\] - Could not parse '{"id":11725,"result":{"life":55119,"model":"roborock.vacuum.a38","token":"4f5758412345678900ß635zrt44545246e","ipflag":1,"miio\_ver":"0.0.9","uid":8208037505,"uptime":55131,"mac":"B0:4A:39:71:74:28","fw\_ver":"4.3.5\_0906","hw\_ver":"Linux","miio\_client\_ver":"4.3.5","VmPeak":9260,"VmSize":926017�V�\>y��\_e�sl��3��;�TkT��z��f��^����Z����h���{=�j�z����لnhkN�
> ��y���\]\`��#��kfl��
> ���4p9\<S����!�fOT�QYE���.178.118","mask":"255.255.255.0","gw":"192.168.178.1"},"miio\_times":\[55118,15,0,55102\]},"exe\_time":1}' \<- {"id":11725,"method":"miIO.info","params":\[\]} (Device: xx21XX90x) gave error com.google.gson.stream.MalformedJsonException: Expected ':' at line 1 column 340 path $.result.�TkT��z��f��^����Z����h���
> 2023-08-01 18:56:12.628 \[WARN \] \[nal.transport.MiIoAsyncCommunication\] - Could not parse 'Z\[�RE�^�i7�3M��}��C|\*pt+;�̄�j��\`�ۢ���)ܴ	b'���G;�X��Vp8\_�u�U&�3~�Wl��cL��Ē(\\�j�b6��-D�R� ��x���\]�ҹ\_element\_work\_time":0,"sensor\_dirty\_time":36669,"dust\_collection\_work\_times":17}\],"exe\_time":11}' \<- {"id":5978,"method":"get\_consumable","params":\[\]} (Device: xx21XX90x) gave error com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 3 path $
> 2023-08-01 19:05:17.688 \[WARN \] \[nal.transport.MiIoAsyncCommunication\] - Could not parse '3\\�x��0���W��P��,��Y������}�1uOd��ݏC�˙�K\_F���M9�%�����������j���'��k�9��D�&Qw
> x63532776e","ipflag":1,"miio\_ver":"0.0.9","uid":8208037505,"uptime":55856,"mac":"B0:4A:39:71:74:28","fw\_ver":"4.3.5\_0906","hw\_ver":"Linux","miio\_client\_ver":"4.3.5","VmPeak":9260,"VmSize":9260,"VmRSS":1760,"MemFree":30664,"ap":{"ssid":"blabla","bssid":"e1:d2:73:b3:45:5d","rssi":"-14","freq":0},"netif":{"localIp":"192.168.178.11","mask":"255.255.255.0","gw":"192.168.178.1"},"miio\_times":\[55843,15,0,55827\]},"exe\_time":2}' \<- {"id":6059,"method":"miIO.info","params":\[\]} (Device: xx21XX90x) gave error com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 3 path $
> 2023-08-01 19:38:55.800 \[WARN \] \[nal.transport.MiIoAsyncCommunication\] - Could not parse '{"id":6359,"result":{"clean\_time����C�|t��:
> �9%8�G�&��f��SVK�cz�}�p ɻ��.�G�ׇ��J��X4�C��c�������1�)Z~ZmW�%��e�����g�~���G�X&��W�Se��/�C~ϝ��E|t�6��J�
> �I\\0521150,1690521145,1690446447,1690443056,1690399564,1690376977,1690350219,1690273708,1690269919,1690265267,1689962776,1689952018,1689800851,1689800750\]},"exe\_time":10}' \<- {"id":6359,"method":"get\_clean\_summary","params":\[\]} (Device: xx21XX90x) gave error com.google.gson.stream.MalformedJsonException: Invalid escape sequence at line 2 column 127 path $.result.
> 2023-08-01 19:44:55.891 \[WARN \] \[nal.transport.MiIoAsyncCommunication\] - Could not parse '{"id":6415,"result":{"life":58222,"model":"roborock.vacuum.a38","token":"4f5758412345678900ß635zrt44545246e","ipflag":1,"miio\_ver":"0.0.9","uid":8208037505,"uptime":58234,"mac":"B0:4A:39:71:74:28","fw\_ver":"4.3.5\_0906","hw\_verQ|�j��@s�Z��#i�)';"�1�(DrJ�"3sl�'� ���tA����j���w�	π{���g˥G��I!y�� ΂4+�ۋ̺��гR��!XS��Bd�,"bssid":"e1:d2:73:b3:45:5d","rssi":"-14","freq":0},"netif":{"localIp":"192.168.178.11","mask":"255.255.255.0","gw":"192.168.178.1"},"miio\_times":\[58222,15,0,58206\]},"exe\_time":2}' \<- {"id":6415,"method":"miIO.info","params":\[\]} (Device: xx21XX90x) gave error com.google.gson.stream.MalformedJsonException: Expected ':' at line 1 column 248 path $.result.hw\_verQ|�j��@s�Z��#i�)';
> 2023-08-01 19:48:25.907 \[WARN \] \[nal.transport.MiIoAsyncCommunication\] - Could not parse '�ó{��:���
> \`

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![mancer](https://community.openhab.org/letter_avatar_proxy/v4/letter/m/e95f7d/32.png) [@mancer](https://community.openhab.org/u/mancer)\
**Post date:** [September 1, 2023, 9:48am UTC](https://community.openhab.org/t/xiaomi-robot-vacuum-binding/31317/2129 "2023-09-01T09:48:54Z")

</div>

Sorry, I didn’t see your reply in reference to the issue. Is that something I can do or would @marcel_verpaalen implement it within the binding?

---

<div class="post-metadata">

**Author:** ![marcel\_verpaalen](https://community.openhab.org/user_avatar/community.openhab.org/marcel_verpaalen/32/56968_2.png) [@marcel\_verpaalen](https://community.openhab.org/u/marcel_verpaalen)\
**Post date:** [September 12, 2023, 7:47pm UTC](https://community.openhab.org/t/xiaomi-robot-vacuum-binding/31317/2130 "2023-09-12T19:47:26Z")

</div>

hallo @shuo ,

Thanks for the logfile, it indeed clarifies at least why the data is not visible: the decoded data is corrupt and therefore not recognized as json. As it requires valid json for the further processing to fill the data that fails.

Note that is very different from earlier reports about not populated fields, as that issue has to do with different versions of the robot provide different values in the status json, and the binding is not smart enough to process all of the versions well.

The more intriguing question is how is it possible that the data is decoded partially right. I would either expect total garbage (which points to errors in the decryption method or key) or a valid json. Yours is something in between readable decoded characters and garbage.

Likewise the place in the string where it becomes garbage is inconsistent… I have no clue yet what is going wrong at your install.  
On what sort of device are you running it? What java are you using? Is it persistent, when you restart openhab?

---

<div class="post-metadata">

**Author:** ![marcel\_verpaalen](https://community.openhab.org/user_avatar/community.openhab.org/marcel_verpaalen/32/56968_2.png) [@marcel\_verpaalen](https://community.openhab.org/u/marcel_verpaalen)\
**Post date:** [September 12, 2023, 8:45pm UTC](https://community.openhab.org/t/xiaomi-robot-vacuum-binding/31317/2131 "2023-09-12T20:45:35Z")

</div>

@mancer I saw your issue in my dev environment.  
It was related to items that were defined in openhab, but no longer had a json config file associated with them and/or the channel name was changed causing some misgrief.

Can it be that this is similar for you, something like a renamed channel…  
What happens if you remove the linkage to the channel and restart OH?

---

<div class="post-metadata">

**Author:** ![Pedro\_Liberal](https://community.openhab.org/user_avatar/community.openhab.org/pedro_liberal/32/113638_2.png) [@Pedro\_Liberal](https://community.openhab.org/u/Pedro_Liberal)\
**Post date:** [September 12, 2023, 10:03pm UTC](https://community.openhab.org/t/xiaomi-robot-vacuum-binding/31317/2132 "2023-09-12T22:03:10Z")

</div>

@marcel_verpaalen hello friend!  
Two quick questions: is this topic only for the vaccums or for all devices that use MI Io?  
And  
Are you aware of the rate limit imposed to the polling rate and what value do you suggest I should put so that I don’t get soft banned by xiaomi again 🙂

Loving your work!

---

<div class="post-metadata">

**Author:** ![marcel\_verpaalen](https://community.openhab.org/user_avatar/community.openhab.org/marcel_verpaalen/32/56968_2.png) [@marcel\_verpaalen](https://community.openhab.org/u/marcel_verpaalen)\
**Post date:** [September 13, 2023, 7:15am UTC](https://community.openhab.org/t/xiaomi-robot-vacuum-binding/31317/2133 "2023-09-13T07:15:20Z")

</div>

hall @Pedro_Liberal the aim for this topic is vacuums, for other devices I suggest to open a different topic.

but answering your question:  
Yes, I am aware of the rate polling, but would not know the exact value hat is set by Xiaomi.  
For miio binding the polling is typically set conservative ~30 seconds. Which for most devices works okay. The mihome app is depending on the task quite network intensive, e.g. during vacuuming it requests update every 2nd second.

The main challenge is with the newer devices some with 50 different channels, if you pull all of those and /or you have several of those devices and/or you have several devices set to cloud instead of direct local communication you can imagine you get hundreds of requests each minute, I think you will exceed the limits.

My suggestion:

- ensure you only select cloud communication if really needed (there is only handful of devices that require this)
- for devices with very high amounts of channels, decrease the refresh rate, or enable less channels. Note: if you still want both high refresh rate and loads of channels you can try the following: go to github and fetch the file of your device from `org.openhab.binding.miio/src/main/resources/database` and increase the value in `"maxProperties": 3,` e.g. to 5 or 10. My setting there is conservative many devices accept a much higher amount. This will also reduce the number of requests.

---

<div class="post-metadata">

**Author:** ![mancer](https://community.openhab.org/letter_avatar_proxy/v4/letter/m/e95f7d/32.png) [@mancer](https://community.openhab.org/u/mancer)\
**Post date:** [September 13, 2023, 7:51am UTC](https://community.openhab.org/t/xiaomi-robot-vacuum-binding/31317/2134 "2023-09-13T07:51:53Z")

</div>

@marcel_verpaalen thanks for your reply. So I did the following:

- Removed all channel linkings for 1 thing, rebooted OpenHABian → no change (still “ **HANDLER\_CONFIGURATION\_PENDING** ” and all the follwing text for that thing
- Removed a thing I created via text file and added it to the inbox via MainUI with no channels linked at all → thing instantly goes into **HANDLER\_CONFIGURATION\_PENDING** state

Could one “bad” linking in 1 thing cause this for all the things / the whole binding?  
If you think this might be the case I’d remove all the things, otherwise I’d refrain from that for now…

---

<div class="post-metadata">

**Author:** ![marcel\_verpaalen](https://community.openhab.org/user_avatar/community.openhab.org/marcel_verpaalen/32/56968_2.png) [@marcel\_verpaalen](https://community.openhab.org/u/marcel_verpaalen)\
**Post date:** [September 13, 2023, 8:40pm UTC](https://community.openhab.org/t/xiaomi-robot-vacuum-binding/31317/2135 "2023-09-13T20:40:30Z")

</div>

> [@mancer](#):
>
> Could one “bad” linking in 1 thing cause this for all the things / the whole binding?

no, that is unlikely.  
Now I have seen it once here, let me try to somehow reproduce it once more

---

<div class="post-metadata">

**Author:** ![mancer](https://community.openhab.org/letter_avatar_proxy/v4/letter/m/e95f7d/32.png) [@mancer](https://community.openhab.org/u/mancer)\
**Post date:** [September 13, 2023, 8:51pm UTC](https://community.openhab.org/t/xiaomi-robot-vacuum-binding/31317/2137 "2023-09-13T20:51:58Z")

</div>

Let me know if I can be of any help (debug files etc)

---

<div class="post-metadata">

**Author:** ![marcel\_verpaalen](https://community.openhab.org/user_avatar/community.openhab.org/marcel_verpaalen/32/56968_2.png) [@marcel\_verpaalen](https://community.openhab.org/u/marcel_verpaalen)\
**Post date:** [September 14, 2023, 6:40am UTC](https://community.openhab.org/t/xiaomi-robot-vacuum-binding/31317/2138 "2023-09-14T06:40:03Z")

</div>

yes, one thing came to my mind that would be good to understand your setup bit better as your issue is not widespread it seems:

- How are you creating your things and items: are they by text file or by the UI or some mix of that.
- Are you using custom json files for the miio items or the build in.
- Please delete any info in the /userdata/miio folder, esp the files that come from the cloud. We need to see them sucessfully being re-created at the binding start

If you are using text config, can you try once without text config for the thing and items → do it competely via the ui.(I think you were already doing that based on your message above. )  
be sure to reboot openhab between removing the thing based on text file as ui & text seems sometimes out of wack)

A debug log of the start of the binding may indeed be useful. including the new thing you created that goes into config pending. (config pending typically means for a new thing it has not established communication, so does not know yet all the detailed config. Likely this is a an issue with the decryption keys coming from the cloud)

[Previous page](https://community.openhab.org/t/xiaomi-robot-vacuum-binding/31317.md?page=104)

[Next page](https://community.openhab.org/t/xiaomi-robot-vacuum-binding/31317.md?page=106)
