Problem with miio Binding for Vacuum 1C STYTJ01ZHM (dreame.vacuum.mc1808)

Tags: #<Tag:0x00007f616d796ca8>

Hi everyone,

i bought a Xiaomi Vacuum 1C STYTJ01ZHM (dreame.vacuum.mc1808) and try to connect it with openhab with the miio binding.
the Problem is i find no way to activate him with openhab. i see some Infos like the overallcleaning minutes in the basicui but i find no way to activate him.

has anyone experience with this robo?

Thanks

This vacuum has indeed some ‘experimental’ support in OH, it uses a new communication way called ‘miot’. Hence indeed things may not work well.

Would be great if you can send a debug log when a refresh is happening to see the actual responses from this device (you can send it by PM)

To start vacuuming you could try to send the command (via the command channel):

action [{"did":"startvac","siid":18,"aiid":1,"in":[{"piid":1,"value":2}]}]

to stop cleaning i expect the command to be:
action [{"did":"stopvac","siid":18,"aiid":2,"in":[{"piid":1,"value":2}]}]

if that does not work, you can also try to replace the piece after the in with [] so it would be like in: []

1 Like

If anyone else has the log, or knows / can test if the values behind the in: are required, please let me know and share debug log

To find all the existing actions for the device, look here: https://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:vacuum:0000A006:dreame-mc1808:1

Would like to help and get this working

I was able to get the information from the vacuum like Battery Level, Brush Left time etc.
for the vacuum command I have this item

String VaccumCommand “Vacuum Command” (G_vacuum) {channel=“miio:generic:XXXXXXXX:actions#commands”}

when I tried to put the comands
‘action {“did”:“startvac”,“siid”:18,“aiid”:1,“in”:[{“piid”:1,“value”:2}]}’

I got the error below

2020-09-12 23:45:41.214 [WARN ] [nal.transport.MiIoAsyncCommunication] - Send command ‘‘action {“did”:“startvac”,“siid”:18,“aiid”:1,“in”:’ with parameters [{“piid”:1,“value”:2}]}’ -> 192.168.X.XX (Device: XXXXXXXX) gave error com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 24 path $
2020-09-12 23:45:41.214 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method ‘ThingHandler.handleCommand()’ on ‘org.openhab.binding.miio.internal.handler.MiIoBasicHandler@915f27a’: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 24 path $
com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 24 path $

If I recall right, it needs another set of square brackets.
action [{"did":"startvac","siid":18,"aiid":1,"in":[{"piid":1,"value":2}]}]

btw, in the latest snapshot builds there is improved support for this vacuum incl a vacuumcommand channel to which you can simply send commands: ‘vacuum, dock, pause’

I’m upgrading from 2.2, I had lots of issues specially with MQTT… so created a new VM (ubuntu 18) then install Openhab 2.5.9 snapshot with the Xiaomi Mi IO Binding 2.5.9Snapshot

I tried change things from here, even the Vacuum Action… My Vacuum isn’t responding. But I don’t see any error in the /var/log/openhab2/openhab.log

2020-09-13 12_08_36-Paper UI

I tried this to put in the Vacuum Command
‘action [{“did”:“startvac”,“siid”:18,“aiid”:1,“in”:[{“piid”:1,“value”:2}]}]’

I get the error

I think it is an issue due to the ," smartness" of the forum/Windows during copy / paste
The quotes are changed from double quotes to open & close quotes…
Hard to see, tricky but gives this error

Txt version…

2020-09-13 16:16:57.307 [WARN ] [nal.transport.MiIoAsyncCommunication] - Send command ‘‘action’ with parameters [{“did”:“startvac”,“siid”:18,“aiid”:1,“in”:[{“piid”:1,“value”:2}]}]’ -> 192.168.xx.xx (Device: XXXXXXX) gave error com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 69 path $
2020-09-13 16:16:57.307 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method ‘ThingHandler.handleCommand()’ on ‘org.openhab.binding.miio.internal.handler.MiIoBasicHandler@6797a067’: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 69 path $
com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 69 path $
at com.google.gson.JsonParser.parse(JsonParser.java:65) ~[bundleFile:?]
at com.google.gson.JsonParser.parse(JsonParser.java:45) ~[bundleFile:?]
at org.openhab.binding.miio.internal.transport.MiIoAsyncCommunication.queueCommand(MiIoAsyncCommunication.java:145) ~[?:?]
at org.openhab.binding.miio.internal.handler.MiIoAbstractHandler.sendCommand(MiIoAbstractHandler.java:218) ~[?:?]
at org.openhab.binding.miio.internal.handler.MiIoBasicHandler.handleCommand(MiIoBasicHandler.java:114) ~[?:?]
at jdk.internal.reflect.GeneratedMethodAccessor84.invoke(Unknown Source) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:152) [bundleFile:?]
at org.eclipse.smarthome.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [bundleFile:?]
at com.sun.proxy.$Proxy1235.handleCommand(Unknown Source) [?:?]
at org.eclipse.smarthome.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:74) [bundleFile:?]
at org.eclipse.smarthome.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:48) [bundleFile:?]
at jdk.internal.reflect.GeneratedMethodAccessor83.invoke(Unknown Source) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:152) [bundleFile:?]
at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 69 path $
at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1568) ~[bundleFile:?]
at com.google.gson.stream.JsonReader.checkLenient(JsonReader.java:1409) ~[bundleFile:?]
at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:542) ~[bundleFile:?]
at com.google.gson.stream.JsonReader.peek(JsonReader.java:425) ~[bundleFile:?]
at com.google.gson.JsonParser.parse(JsonParser.java:60) ~[bundleFile:?]
… 21 more

Looks like the wrong double quotes are still there. At least in your text copy/paste

After the copy/paste manually replace all double quotes. That is the only way to ensure they are the right ones

Apologies I’m not following

I’ve tried to replace the open/quotes to double quotes

2020-09-14 09:27:13.494 [WARN ] [nal.transport.MiIoAsyncCommunication] - Send command ‘‘action’ with parameters [{“did”:“startvac”,“siid”:18,“aiid”:1,“in”:[{“piid”:1,“value”:2}]}]’ -> 192.168.3.110 (Device: 15BF7AEB) gave error com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 69 path $
2020-09-14 09:27:13.495 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method ‘ThingHandler.handleCommand()’ on ‘org.openhab.binding.miio.internal.handler.MiIoBasicHandler@6797a067’: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 69 path $
com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 69 path $

And also

Any reason why its not working? not giving any errors as well

2020-09-14 09_29_20-Paper UI

Okay… I can see from the screenshot the quotes look right… If you remove the single quotes at start and end it probably works.

Is the vacuum channel below not working? It should send the same command

removing the single quotes at both ends did not give an error.
but it did not work as well. Vacuum did not respond

The Vaccum Action is not working as well
image

Can you try to put the binding in debug logging, so we can see what is the actual communication / response from the device. (in console type: log:set debug org.openhab.binding.miio than type log:tail org.openhab.binding.miio )

As I look once more in the screenshot, it seems actually part of the command is missing I was expecting:
action [{"did":"startvac","siid":18,"aiid":1,"in":[{"piid":1,"value":2}]}]
but I don’t see the ‘:1, “in”’ in your screenshot

Response from Vacuum Command

08:57:33.343 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:9492,“method”:“action”,“params”:[{“did”:“startvac”,“siid”:18,“aiid”:1,“in”:[{“piid”:1,“value”:2}]}]} -> 192.168.XXX.XXX (Device: XXXXXXXX token: 4B47446AXXXXXXXXXXXXXXXX3670654E Queue: 1)
08:57:33.345 [DEBUG] [iio.internal.handler.MiIoBasicHandler] - Locating action for channel ‘actions#commands’: ‘action [{“did”:“startvac”,“siid”:18,“aiid”:1,“in”:[{“piid”:1,“value”:2}]}]’
08:57:33.347 [DEBUG] [iio.internal.handler.MiIoBasicHandler] - Channel Id actions#commands not in mapping.
08:57:33.348 [DEBUG] [iio.internal.handler.MiIoBasicHandler] - Periodic update for ‘miio:generic:XXXXXXXX’ (miio:basic)
08:57:33.349 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:9493,“method”:“get_properties”,“params”:[{“did”:“battery-level”,“siid”:2,“piid”:1},{“did”:“charging-state”,“siid”:2,“piid”:2}]} -> 192.168.XXX.XXX (Device: XXXXXXXX token: 4B47446AXXXXXXXXXXXXXXXX3670654E Queue: 1)
08:57:33.349 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:9494,“method”:“get_properties”,“params”:[{“did”:“firmware-revision”,“siid”:1,“piid”:4},{“did”:“manufacturer”,“siid”:1,“piid”:1}]} -> 192.168.XXX.XXX (Device: XXXXXXXX token: 4B47446AXXXXXXXXXXXXXXXX3670654E Queue: 2)
08:57:33.350 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:9495,“method”:“get_properties”,“params”:[{“did”:“model”,“siid”:1,“piid”:2},{“did”:“serial-number”,“siid”:1,“piid”:3}]} -> 192.168.XXX.XXX (Device: XXXXXXXX token: 4B47446AXXXXXXXXXXXXXXXX3670654E Queue: 3)
08:57:33.350 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:9496,“method”:“get_properties”,“params”:[{“did”:“fault”,“siid”:3,“piid”:1},{“did”:“status”,“siid”:3,“piid”:2}]} -> 192.168.XXX.XXX (Device: XXXXXXXX token: 4B47446AXXXXXXXXXXXXXXXX3670654E Queue: 4)
08:57:33.351 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:9497,“method”:“get_properties”,“params”:[{“did”:“brush-left-time”,“siid”:26,“piid”:1},{“did”:“brush-life-level”,“siid”:26,“piid”:2}]} -> 192.168.XXX.XXX (Device: XXXXXXXX token: 4B47446AXXXXXXXXXXXXXXXX3670654E Queue: 5)
08:57:33.352 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:9498,“method”:“get_properties”,“params”:[{“did”:“filter-life-level”,“siid”:27,“piid”:1},{“did”:“filter-left-time”,“siid”:27,“piid”:2}]} -> 192.168.XXX.XXX (Device: XXXXXXXX token: 4B47446AXXXXXXXXXXXXXXXX3670654E Queue: 6)
08:57:33.352 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:9499,“method”:“get_properties”,“params”:[{“did”:“brush-left-time1”,“siid”:28,“piid”:1},{“did”:“brush-life-level1”,“siid”:28,“piid”:2}]} -> 192.168.XXX.XXX (Device: XXXXXXXX token: 4B47446AXXXXXXXXXXXXXXXX3670654E Queue: 7)
08:57:33.353 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:9500,“method”:“get_properties”,“params”:[{“did”:“work-mode”,“siid”:18,“piid”:1},{“did”:“area”,“siid”:18,“piid”:4}]} -> 192.168.XXX.XXX (Device: XXXXXXXX token: 4B47446AXXXXXXXXXXXXXXXX3670654E Queue: 8)
08:57:33.353 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:9501,“method”:“get_properties”,“params”:[{“did”:“timer”,“siid”:18,“piid”:5},{“did”:“mode”,“siid”:18,“piid”:6}]} -> 192.168.XXX.XXX (Device: XXXXXXXX token: 4B47446AXXXXXXXXXXXXXXXX3670654E Queue: 9)
08:57:33.354 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:9502,“method”:“get_properties”,“params”:[{“did”:“total-clean-time”,“siid”:18,“piid”:13},{“did”:“total-clean-times”,“siid”:18,“piid”:14}]} -> 192.168.XXX.XXX (Device: XXXXXXXX token: 4B47446AXXXXXXXXXXXXXXXX3670654E Queue: 10)
08:57:33.354 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:9503,“method”:“get_properties”,“params”:[{“did”:“total-clean-area”,“siid”:18,“piid”:15},{“did”:“clean-log-start-time”,“siid”:18,“piid”:16}]} -> 192.168.XXX.XXX (Device: XXXXXXXX token: 4B47446AXXXXXXXXXXXXXXXX3670654E Queue: 11)
08:57:33.355 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:9504,“method”:“get_properties”,“params”:[{“did”:“button-led”,“siid”:18,“piid”:17},{“did”:“task-done”,“siid”:18,“piid”:18}]} -> 192.168.XXX.XXX (Device: XXXXXXXX token: 4B47446AXXXXXXXXXXXXXXXX3670654E Queue: 12)
08:57:33.355 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:9505,“method”:“get_properties”,“params”:[{“did”:“life-sieve”,“siid”:19,“piid”:1},{“did”:“life-brush-side”,“siid”:19,“piid”:2}]} -> 192.168.XXX.XXX (Device: XXXXXXXX token: 4B47446AXXXXXXXXXXXXXXXX3670654E Queue: 13)
08:57:33.356 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:9506,“method”:“get_properties”,“params”:[{“did”:“life-brush-main”,“siid”:19,“piid”:3},{“did”:“enable”,“siid”:20,“piid”:1}]} -> 192.168.XXX.XXX (Device: XXXXXXXX token: 4B47446AXXXXXXXXXXXXXXXX3670654E Queue: 14)
08:57:33.356 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:9507,“method”:“get_properties”,“params”:[{“did”:“start-time”,“siid”:20,“piid”:2},{“did”:“stop-time”,“siid”:20,“piid”:3}]} -> 192.168.XXX.XXX (Device: XXXXXXXX token: 4B47446AXXXXXXXXXXXXXXXX3670654E Queue: 15)
08:57:33.357 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:9508,“method”:“get_properties”,“params”:[{“did”:“map-view”,“siid”:23,“piid”:1},{“did”:“volume”,“siid”:24,“piid”:1}]} -> 192.168.XXX.XXX (Device: XXXXXXXX token: 4B47446AXXXXXXXXXXXXXXXX3670654E Queue: 16)
08:57:33.357 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:9509,“method”:“get_properties”,“params”:[{“did”:“voice-packets”,“siid”:24,“piid”:3},{“did”:“time-zone”,“siid”:25,“piid”:1}]} -> 192.168.XXX.XXX (Device: XXXXXXXX token: 4B47446AXXXXXXXXXXXXXXXX3670654E Queue: 17)

Response from Vacuum Action (VACUUM)

08:59:09.568 [DEBUG] [iio.internal.handler.MiIoBasicHandler] - Locating action for channel ‘vacuumaction’: ‘1’
08:59:09.570 [DEBUG] [iio.internal.handler.MiIoBasicHandler] - Conditional command action[] not send, condition ‘matchValue’ not met
08:59:09.571 [DEBUG] [iio.internal.handler.MiIoBasicHandler] - Conditional command action[] not send, condition ‘matchValue’ not met
08:59:09.572 [DEBUG] [iio.internal.handler.MiIoBasicHandler] - Conditional command action[] not send, condition ‘matchValue’ not met
08:59:09.573 [DEBUG] [iio.internal.handler.MiIoBasicHandler] - Conditional command action[] not send, condition ‘matchValue’ not met
08:59:09.573 [DEBUG] [iio.internal.handler.MiIoBasicHandler] - Conditional command action[] not send, condition ‘matchValue’ not met
08:59:09.574 [DEBUG] [iio.internal.handler.MiIoBasicHandler] - Periodic update for ‘miio:generic:XXXXXXXX’ (miio:basic)
08:59:09.574 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:9562,“method”:“get_properties”,“params”:[{“did”:“battery-level”,“siid”:2,“piid”:1},{“did”:“charging-state”,“siid”:2,“piid”:2}]} -> 192.168.XXX.XXX (Device: XXXXXXXX token: 4B47446AXXXXXXXXXXXXXXXX3670654E Queue: 1)
08:59:09.575 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:9563,“method”:“get_properties”,“params”:[{“did”:“firmware-revision”,“siid”:1,“piid”:4},{“did”:“manufacturer”,“siid”:1,“piid”:1}]} -> 192.168.XXX.XXX (Device: XXXXXXXX token: 4B47446AXXXXXXXXXXXXXXXX3670654E Queue: 2)
08:59:09.575 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:9564,“method”:“get_properties”,“params”:[{“did”:“model”,“siid”:1,“piid”:2},{“did”:“serial-number”,“siid”:1,“piid”:3}]} -> 192.168.XXX.XXX (Device: XXXXXXXX token: 4B47446AXXXXXXXXXXXXXXXX3670654E Queue: 3)
08:59:09.576 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:9565,“method”:“get_properties”,“params”:[{“did”:“fault”,“siid”:3,“piid”:1},{“did”:“status”,“siid”:3,“piid”:2}]} -> 192.168.XXX.XXX (Device: XXXXXXXX token: 4B47446AXXXXXXXXXXXXXXXX3670654E Queue: 4)
08:59:09.576 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:9566,“method”:“get_properties”,“params”:[{“did”:“brush-left-time”,“siid”:26,“piid”:1},{“did”:“brush-life-level”,“siid”:26,“piid”:2}]} -> 192.168.XXX.XXX (Device: XXXXXXXX token: 4B47446AXXXXXXXXXXXXXXXX3670654E Queue: 5)
08:59:09.577 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:9567,“method”:“get_properties”,“params”:[{“did”:“filter-life-level”,“siid”:27,“piid”:1},{“did”:“filter-left-time”,“siid”:27,“piid”:2}]} -> 192.168.XXX.XXX (Device: XXXXXXXX token: 4B47446AXXXXXXXXXXXXXXXX3670654E Queue: 6)
08:59:09.577 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:9568,“method”:“get_properties”,“params”:[{“did”:“brush-left-time1”,“siid”:28,“piid”:1},{“did”:“brush-life-level1”,“siid”:28,“piid”:2}]} -> 192.168.XXX.XXX (Device: XXXXXXXX token: 4B47446AXXXXXXXXXXXXXXXX3670654E Queue: 7)
08:59:09.578 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:9569,“method”:“get_properties”,“params”:[{“did”:“work-mode”,“siid”:18,“piid”:1},{“did”:“area”,“siid”:18,“piid”:4}]} -> 192.168.XXX.XXX (Device: XXXXXXXX token: 4B47446AXXXXXXXXXXXXXXXX3670654E Queue: 8)
08:59:09.579 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:9570,“method”:“get_properties”,“params”:[{“did”:“timer”,“siid”:18,“piid”:5},{“did”:“mode”,“siid”:18,“piid”:6}]} -> 192.168.XXX.XXX (Device: XXXXXXXX token: 4B47446AXXXXXXXXXXXXXXXX3670654E Queue: 9)
08:59:09.579 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:9571,“method”:“get_properties”,“params”:[{“did”:“total-clean-time”,“siid”:18,“piid”:13},{“did”:“total-clean-times”,“siid”:18,“piid”:14}]} -> 192.168.XXX.XXX (Device: XXXXXXXX token: 4B47446AXXXXXXXXXXXXXXXX3670654E Queue: 10)
08:59:09.580 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:9572,“method”:“get_properties”,“params”:[{“did”:“total-clean-area”,“siid”:18,“piid”:15},{“did”:“clean-log-start-time”,“siid”:18,“piid”:16}]} -> 192.168.XXX.XXX (Device: XXXXXXXX token: 4B47446AXXXXXXXXXXXXXXXX3670654E Queue: 11)
08:59:09.580 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:9573,“method”:“get_properties”,“params”:[{“did”:“button-led”,“siid”:18,“piid”:17},{“did”:“task-done”,“siid”:18,“piid”:18}]} -> 192.168.XXX.XXX (Device: XXXXXXXX token: 4B47446AXXXXXXXXXXXXXXXX3670654E Queue: 12)
08:59:09.581 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:9574,“method”:“get_properties”,“params”:[{“did”:“life-sieve”,“siid”:19,“piid”:1},{“did”:“life-brush-side”,“siid”:19,“piid”:2}]} -> 192.168.XXX.XXX (Device: XXXXXXXX token: 4B47446AXXXXXXXXXXXXXXXX3670654E Queue: 13)
08:59:09.581 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:9575,“method”:“get_properties”,“params”:[{“did”:“life-brush-main”,“siid”:19,“piid”:3},{“did”:“enable”,“siid”:20,“piid”:1}]} -> 192.168.XXX.XXX (Device: XXXXXXXX token: 4B47446AXXXXXXXXXXXXXXXX3670654E Queue: 14)
08:59:09.582 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:9576,“method”:“get_properties”,“params”:[{“did”:“start-time”,“siid”:20,“piid”:2},{“did”:“stop-time”,“siid”:20,“piid”:3}]} -> 192.168.XXX.XXX (Device: XXXXXXXX token: 4B47446AXXXXXXXXXXXXXXXX3670654E Queue: 15)
08:59:09.582 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:9577,“method”:“get_properties”,“params”:[{“did”:“map-view”,“siid”:23,“piid”:1},{“did”:“volume”,“siid”:24,“piid”:1}]} -> 192.168.XXX.XXX (Device: XXXXXXXX token: 4B47446AXXXXXXXXXXXXXXXX3670654E Queue: 16)
08:59:09.583 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:9578,“method”:“get_properties”,“params”:[{“did”:“voice-packets”,“siid”:24,“piid”:3},{“did”:“time-zone”,“siid”:25,“piid”:1}]} -> 192.168.XXX.XXX (Device: XXXXXXXX token: 4B47446AXXXXXXXXXXXXXXXX3670654E Queue: 17)
08:59:09.597 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for XXXXXXXX type: GET_PROPERTIES, result: [{“siid”:2,“did”:“battery-level”,“piid”:1,“value”:100,“code”:0},{“siid”:2,“did”:“charging-state”,“piid”:2,“value”:4,“code”:0}], fullresponse: {“result”:[{“siid”:2,“did”:“battery-level”,“piid”:1,“value”:100,“code”:0},{“siid”:2,“did”:“charging-state”,“piid”:2,“value”:4,“code”:0}],“id”:9562}
08:59:09.603 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for XXXXXXXX type: GET_PROPERTIES, result: [{“siid”:1,“did”:“firmware-revision”,“code”:0},{“siid”:1,“did”:“manufacturer”,“code”:0}], fullresponse: {“result”:[{“siid”:1,“did”:“firmware-revision”,“code”:0},{“siid”:1,“did”:“manufacturer”,“code”:0}],“id”:9563}
08:59:09.603 [DEBUG] [iio.internal.handler.MiIoBasicHandler] - Error updating miio:generic:XXXXXXXX property FirmwareRevision with ‘null’ : java.lang.NullPointerException: null
08:59:09.604 [DEBUG] [iio.internal.handler.MiIoBasicHandler] - Error updating miio:generic:XXXXXXXX property Manufacturer with ‘null’ : java.lang.NullPointerException: null
08:59:09.609 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for XXXXXXXX type: GET_PROPERTIES, result: [{“siid”:1,“did”:“model”,“code”:0},{“siid”:1,“did”:“serial-number”,“code”:0}], fullresponse: {“result”:[{“siid”:1,“did”:“model”,“code”:0},{“siid”:1,“did”:“serial-number”,“code”:0}],“id”:9564}
08:59:09.610 [DEBUG] [iio.internal.handler.MiIoBasicHandler] - Error updating miio:generic:XXXXXXXX property Model with ‘null’ : java.lang.NullPointerException: null
08:59:09.610 [DEBUG] [iio.internal.handler.MiIoBasicHandler] - Error updating miio:generic:XXXXXXXX property SerialNumber with ‘null’ : java.lang.NullPointerException: null
08:59:09.616 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for XXXXXXXX type: GET_PROPERTIES, result: [{“siid”:3,“did”:“fault”,“piid”:1,“value”:0,“code”:0},{“siid”:3,“did”:“status”,“piid”:2,“value”:2,“code”:0}], fullresponse: {“result”:[{“siid”:3,“did”:“fault”,“piid”:1,“value”:0,“code”:0},{“siid”:3,“did”:“status”,“piid”:2,“value”:2,“code”:0}],“id”:9565}
08:59:09.621 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for XXXXXXXX type: GET_PROPERTIES, result: [{“siid”:26,“did”:“brush-left-time”,“piid”:1,“value”:290,“code”:0},{“siid”:26,“did”:“brush-life-level”,“piid”:2,“value”:96,“code”:0}], fullresponse: {“result”:[{“siid”:26,“did”:“brush-left-time”,“piid”:1,“value”:290,“code”:0},{“siid”:26,“did”:“brush-life-level”,“piid”:2,“value”:96,“code”:0}],“id”:9566}
08:59:09.626 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for XXXXXXXX type: GET_PROPERTIES, result: [{“siid”:27,“did”:“filter-life-level”,“piid”:1,“value”:93,“code”:0},{“siid”:27,“did”:“filter-left-time”,“piid”:2,“value”:140,“code”:0}], fullresponse: {“result”:[{“siid”:27,“did”:“filter-life-level”,“piid”:1,“value”:93,“code”:0},{“siid”:27,“did”:“filter-left-time”,“piid”:2,“value”:140,“code”:0}],“id”:9567}
08:59:09.632 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for XXXXXXXX type: GET_PROPERTIES, result: [{“siid”:28,“did”:“brush-left-time1”,“piid”:1,“value”:190,“code”:0},{“siid”:28,“did”:“brush-life-level1”,“piid”:2,“value”:95,“code”:0}], fullresponse: {“result”:[{“siid”:28,“did”:“brush-left-time1”,“piid”:1,“value”:190,“code”:0},{“siid”:28,“did”:“brush-life-level1”,“piid”:2,“value”:95,“code”:0}],“id”:9568}
08:59:09.637 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for XXXXXXXX type: GET_PROPERTIES, result: [{“siid”:18,“did”:“work-mode”,“piid”:1,“value”:14,“code”:0},{“siid”:18,“did”:“area”,“piid”:4,“value”:"",“code”:0}], fullresponse: {“result”:[{“siid”:18,“did”:“work-mode”,“piid”:1,“value”:14,“code”:0},{“siid”:18,“did”:“area”,“piid”:4,“value”:"",“code”:0}],“id”:9569}
08:59:09.646 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for XXXXXXXX type: GET_PROPERTIES, result: [{“siid”:18,“did”:“timer”,“piid”:5,“value”:"",“code”:0},{“siid”:18,“did”:“mode”,“piid”:6,“value”:0,“code”:0}], fullresponse: {“result”:[{“siid”:18,“did”:“timer”,“piid”:5,“value”:"",“code”:0},{“siid”:18,“did”:“mode”,“piid”:6,“value”:0,“code”:0}],“id”:9570}
08:59:09.652 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for XXXXXXXX type: GET_PROPERTIES, result: [{“siid”:18,“did”:“total-clean-time”,“piid”:13,“value”:592,“code”:0},{“siid”:18,“did”:“total-clean-times”,“piid”:14,“value”:21,“code”:0}], fullresponse: {“result”:[{“siid”:18,“did”:“total-clean-time”,“piid”:13,“value”:592,“code”:0},{“siid”:18,“did”:“total-clean-times”,“piid”:14,“value”:21,“code”:0}],“id”:9571}
08:59:09.666 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for XXXXXXXX type: GET_PROPERTIES, result: [{“siid”:18,“did”:“total-clean-area”,“piid”:15,“value”:597,“code”:0},{“siid”:18,“did”:“clean-log-start-time”,“piid”:16,“value”:1599630783,“code”:0}], fullresponse: {“result”:[{“siid”:18,“did”:“total-clean-area”,“piid”:15,“value”:597,“code”:0},{“siid”:18,“did”:“clean-log-start-time”,“piid”:16,“value”:1599630783,“code”:0}],“id”:9572}
08:59:09.674 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for XXXXXXXX type: GET_PROPERTIES, result: [{“siid”:18,“did”:“button-led”,“piid”:17,“value”:0,“code”:0},{“siid”:18,“did”:“task-done”,“piid”:18,“value”:1,“code”:0}], fullresponse: {“result”:[{“siid”:18,“did”:“button-led”,“piid”:17,“value”:0,“code”:0},{“siid”:18,“did”:“task-done”,“piid”:18,“value”:1,“code”:0}],“id”:9573}
08:59:09.680 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for XXXXXXXX type: GET_PROPERTIES, result: [{“siid”:19,“did”:“life-sieve”,“piid”:1,“value”:“9000-8408”,“code”:0},{“siid”:19,“did”:“life-brush-side”,“piid”:2,“value”:“12000-11408”,“code”:0}], fullresponse: {“result”:[{“siid”:19,“did”:“life-sieve”,“piid”:1,“value”:“9000-8408”,“code”:0},{“siid”:19,“did”:“life-brush-side”,“piid”:2,“value”:“12000-11408”,“code”:0}],“id”:9574}
08:59:09.686 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for XXXXXXXX type: GET_PROPERTIES, result: [{“siid”:19,“did”:“life-brush-main”,“piid”:3,“value”:“18000-17408”,“code”:0},{“siid”:20,“did”:“enable”,“piid”:1,“value”:false,“code”:0}], fullresponse: {“result”:[{“siid”:19,“did”:“life-brush-main”,“piid”:3,“value”:“18000-17408”,“code”:0},{“siid”:20,“did”:“enable”,“piid”:1,“value”:false,“code”:0}],“id”:9575}
08:59:09.692 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for XXXXXXXX type: GET_PROPERTIES, result: [{“siid”:20,“did”:“start-time”,“piid”:2,“value”:“22:00”,“code”:0},{“siid”:20,“did”:“stop-time”,“piid”:3,“value”:“8:00”,“code”:0}], fullresponse: {“result”:[{“siid”:20,“did”:“start-time”,“piid”:2,“value”:“22:00”,“code”:0},{“siid”:20,“did”:“stop-time”,“piid”:3,“value”:“8:00”,“code”:0}],“id”:9576}
08:59:09.697 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for XXXXXXXX type: GET_PROPERTIES, result: [{“siid”:23,“did”:“map-view”,“piid”:1,“value”:“tmp”,“code”:0},{“siid”:24,“did”:“volume”,“piid”:1,“value”:75,“code”:0}], fullresponse: {“result”:[{“siid”:23,“did”:“map-view”,“piid”:1,“value”:“tmp”,“code”:0},{“siid”:24,“did”:“volume”,“piid”:1,“value”:75,“code”:0}],“id”:9577}
08:59:09.703 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for XXXXXXXX type: GET_PROPERTIES, result: [{“siid”:24,“did”:“voice-packets”,“piid”:3,“value”:“EN”,“code”:0},{“siid”:25,“did”:“time-zone”,“piid”:1,“value”:“Australia/Sydney”,“code”:0}], fullresponse: {“result”:[{“siid”:24,“did”:“voice-packets”,“piid”:3,“value”:“EN”,“code”:0},{“siid”:25,“did”:“time-zone”,“piid”:1,“value”:“Australia/Sydney”,“code”:0}],“id”:9578}

Thanks for the log

One thing I see is that I made error with the vacuum channel… It expects a text like ‘vacuum’ but the channel maps to a number :frowning: I’ll fix that in the coming days.

Unfortunately the response to your custom command is not in the attached logfile.

Did I do something different? Let me know.
what I did was copy the command with the correct format, then click the check mark. This is reponse I got from sending the command (debug mode). but in normal log, it did not do anything.

Thanks

I made a quick fix version with improved string channel

you can download it here https://verpaalen.com/openhab2/org.openhab.binding.miio-2.5.9-SNAPSHOT.jar

Before installing (dropping it in the addons folder), ensure to uninstall the existing version of the binding.

Please test it and let me know if it works. I anyway would appreciate a debug log to see what the device actually responds to these commands.

Wrt to the log: It seems the responses section starts bit late, the command id = 9492 but the first response is nr 9562… hence looks like (the relevant) part of the log is missing. For the rest the type of logging is the right one. Maybe you can surround it with ``` type of quotes (3 of them) as than the quotes are not transformed and be kept how they are really in the screen…
Your text will appear greyish like this when surrounded (Or use the </> icon in the edit screen)

Hi,

I hope this helps

Miio.log (324.2 KB)