rytilahti / python-miio

Python library & console tool for controlling Xiaomi smart appliances
https://python-miio.readthedocs.io
GNU General Public License v3.0
3.68k stars 552 forks source link

Error: No response from the device viomi.vacuum.v8 #750

Closed v0d0r closed 1 year ago

v0d0r commented 4 years ago

I am unable to connect to my Xiaomi Mijia STYJ02YM vacuum. I installed the older version of the Mi Home app and extracted the token from the log file. In fact I did this a few times to confirm the token is the same. From the log file I also got the model number "model":"viomi.vacuum.v8"

My vacuum is on Firmware version. : 3.5.3_0017

I tried installing mirobo / miiocli on two different Linux installations both with the same result ending up in a timeout. I also performed a portscan on the Vacuum and only find port 53 open. I can even telnet to this and get a response.

Any other suggestions or am I missing something? I believe my firmware version is the most recent as I only got this vacuum recently so I am not sure if anybody can confirm this version firmware works and/or Xaiomi patched something in this release preventing connections?

Any help would be appreciated. More details below.

mirobo --version mirobo, version 0.5.2

PORT STATE SERVICE 53/tcp open domain

miiocli viomivacuum --ip 10.0.0.10 --token xxxxxxxxxxxxxxxxxxxxxxxxxxxx info ERROR:miio.miioprotocol:Got error when receiving: timed out

mirobo --ip 10.0.0.10 --token xxxxxxxxxxxxxxxxxxxxxxxxxxxx info ERROR:miio.miioprotocol:Got error when receiving: timed out Error: No response from the device

rytilahti commented 4 years ago

If you turn on the debug mode (-d flag), do you see if the device is responsive to the initial handshake?

v0d0r commented 4 years ago

Not 100% sure what response is confirmation for the handshake but the full debug log is below. I assume its this piece? ":Got a response: Container"

Also in my initial post I did a tcp scan and not udp. Doing UDP I can see 54321 open so I guess its not closed.

Not shown: 998 closed ports PORT STATE SERVICE 5353/udp open|filtered zeroconf 54321/udp open|filtered bo2k MAC Address: 5C:E5:0C:81:46:4B (Unknown)

  mirobo --ip 10.0.0.10 --token xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -d info
INFO:miio.vacuum_cli:Debug mode active
DEBUG:miio.vacuum_cli:Connecting to 10.0.0.10 with token xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
DEBUG:miio.protocol:Unable to decrypt, returning raw bytes: b''
DEBUG:miio.miioprotocol:Got a response: Container:
    data = Container:
        data = b'' (total 0)
        value = b'' (total 0)
        offset1 = 32
        offset2 = 32
        length = 0
    header = Container:
        data = b'!1\x00 \x00\x00\x00\x00\x12n\xbb\xd7_\x05\xacE' (total 16)
        value = Container:
            length = 32
            unknown = 0
            device_id = unhexlify('126ebbd7')
            ts = 2020-07-08 11:21:41
        offset1 = 0
        offset2 = 16
        length = 16
    checksum = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' (total 16)
DEBUG:miio.miioprotocol:Discovered 126ebbd7 with ts: 2020-07-08 11:21:41, token: b'ffffffffffffffffffffffffffffffff'
DEBUG:miio.miioprotocol:10.0.0.10:54321 >>: {'id': 1, 'method': 'miIO.info', 'params': []}
DEBUG:miio.miioprotocol:Retrying with incremented id, retries left: 3
DEBUG:miio.protocol:Unable to decrypt, returning raw bytes: b''
DEBUG:miio.miioprotocol:Got a response: Container:
    data = Container:
        data = b'' (total 0)
        value = b'' (total 0)
        offset1 = 32
        offset2 = 32
        length = 0
    header = Container:
        data = b'!1\x00 \x00\x00\x00\x00\x12n\xbb\xd7_\x05\xacK' (total 16)
        value = Container:
            length = 32
            unknown = 0
            device_id = unhexlify('126ebbd7')
            ts = 2020-07-08 11:21:47
        offset1 = 0
        offset2 = 16
        length = 16
    checksum = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' (total 16)
DEBUG:miio.miioprotocol:Discovered 126ebbd7 with ts: 2020-07-08 11:21:47, token: b'ffffffffffffffffffffffffffffffff'
DEBUG:miio.miioprotocol:10.0.0.10:54321 >>: {'id': 102, 'method': 'miIO.info', 'params': []}
DEBUG:miio.miioprotocol:Retrying with incremented id, retries left: 2
DEBUG:miio.protocol:Unable to decrypt, returning raw bytes: b''
DEBUG:miio.miioprotocol:Got a response: Container:
    data = Container:
        data = b'' (total 0)
        value = b'' (total 0)
        offset1 = 32
        offset2 = 32
        length = 0
    header = Container:
        data = b'!1\x00 \x00\x00\x00\x00\x12n\xbb\xd7_\x05\xacP' (total 16)
        value = Container:
            length = 32
            unknown = 0
            device_id = unhexlify('126ebbd7')
            ts = 2020-07-08 11:21:52
        offset1 = 0
        offset2 = 16
        length = 16
    checksum = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' (total 16)
DEBUG:miio.miioprotocol:Discovered 126ebbd7 with ts: 2020-07-08 11:21:52, token: b'ffffffffffffffffffffffffffffffff'
DEBUG:miio.miioprotocol:10.0.0.10:54321 >>: {'id': 203, 'method': 'miIO.info', 'params': []}
DEBUG:miio.miioprotocol:Retrying with incremented id, retries left: 1
DEBUG:miio.protocol:Unable to decrypt, returning raw bytes: b''
DEBUG:miio.miioprotocol:Got a response: Container:
    data = Container:
        data = b'' (total 0)
        value = b'' (total 0)
        offset1 = 32
        offset2 = 32
        length = 0
    header = Container:
        data = b'!1\x00 \x00\x00\x00\x00\x12n\xbb\xd7_\x05\xacU' (total 16)
        value = Container:
            length = 32
            unknown = 0
            device_id = unhexlify('126ebbd7')
            ts = 2020-07-08 11:21:57
        offset1 = 0
        offset2 = 16
        length = 16
    checksum = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' (total 16)
DEBUG:miio.miioprotocol:Discovered 126ebbd7 with ts: 2020-07-08 11:21:57, token: b'ffffffffffffffffffffffffffffffff'
DEBUG:miio.miioprotocol:10.0.0.10:54321 >>: {'id': 304, 'method': 'miIO.info', 'params': []}
ERROR:miio.miioprotocol:Got error when receiving: timed out
DEBUG:miio.click_common:Exception: No response from the device
Traceback (most recent call last):
  File "/home/pi/.local/lib/python3.7/site-packages/miio/miioprotocol.py", line 182, in send
    data, addr = s.recvfrom(1024)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/pi/.local/lib/python3.7/site-packages/miio/miioprotocol.py", line 182, in send
    data, addr = s.recvfrom(1024)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/pi/.local/lib/python3.7/site-packages/miio/miioprotocol.py", line 182, in send
    data, addr = s.recvfrom(1024)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/pi/.local/lib/python3.7/site-packages/miio/miioprotocol.py", line 182, in send
    data, addr = s.recvfrom(1024)
socket.timeout: timed out

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/pi/.local/lib/python3.7/site-packages/miio/click_common.py", line 59, in __call__
    return self.main(*args, **kwargs)
  File "/home/pi/.local/lib/python3.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/pi/.local/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/pi/.local/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/pi/.local/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/pi/.local/lib/python3.7/site-packages/click/decorators.py", line 73, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/home/pi/.local/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/pi/.local/lib/python3.7/site-packages/miio/vacuum_cli.py", line 416, in info
    res = vac.info()
  File "/home/pi/.local/lib/python3.7/site-packages/miio/device.py", line 182, in info
    return DeviceInfo(self.send("miIO.info"))
  File "/home/pi/.local/lib/python3.7/site-packages/miio/device.py", line 147, in send
    command, parameters, retry_count, extra_parameters=extra_parameters
  File "/home/pi/.local/lib/python3.7/site-packages/miio/miioprotocol.py", line 226, in send
    extra_parameters=extra_parameters,
  File "/home/pi/.local/lib/python3.7/site-packages/miio/miioprotocol.py", line 226, in send
    extra_parameters=extra_parameters,
  File "/home/pi/.local/lib/python3.7/site-packages/miio/miioprotocol.py", line 226, in send
    extra_parameters=extra_parameters,
  File "/home/pi/.local/lib/python3.7/site-packages/miio/miioprotocol.py", line 230, in send
    raise DeviceException("No response from the device") from ex
miio.exceptions.DeviceException: No response from the device
Error: No response from the device
thangtq139 commented 4 years ago

Mine v7. Also received timeout sometime. Quick fix was mentioned on https://github.com/rytilahti/python-miio/issues/550#issuecomment-557818151

FYI: directly change retry_count to bigger number (20 for example) https://github.com/rytilahti/python-miio/blob/master/miio/device.py#L128

meteo88 commented 4 years ago

Hi,

i have the same problem. i have an Xiaomi Mi Vacuum Cleaner Pro with Firmware Version: 3.5.3_0017

With the command: /usr/local/bin/mirobo discover --handshake 1

i get as answer: INFO:miio.miioprotocol:Sending discovery to <broadcast> with timeout of 5s.. INFO:miio.miioprotocol: IP 192.168.1.6 (ID: 139df008) - token: b'ffffffffffffffffffffffffffffffff' INFO:miio.miioprotocol:Discovery done

But any other command leads to a timeout....

Did you solved your issue?

Thanks and best regards, Dominik

v0d0r commented 4 years ago

@meteo88 no sorry my issue still persist. I also tried changing the timeout values but I get the same result. We are both on the same firmware version. Would be interesting to know if there is anybody with this version firmware that is working.

rytilahti commented 4 years ago

Viomi vacuums cannot be controlled with mirobo, but you have to use miiocli viomivacuum for those.

A good way to test if the the token is correct and the communications are working fine, you can simply execute miiocli device --ip <ip addr> --token <token> info. If that executes correctly, you get the device model information. To my knowledge, only those with rockrobo can be used with mirobo/miiocli vacuum.

meteo88 commented 4 years ago

@rytilahti

Thanks for the hint!!(btw i am using Version 0.5.3)

With: miiocli viomivacuum --ip 192.168.1.6 --token TOKEN status

i get a valid response:

Mode: ViomiMode.Vacuum
Error: Unknown error 2105
Battery: 100
Fan speed: ViomiVacuumSpeed.Silent
Box type: ViomiBinType.Vacuum
Mop type: 0
Clean time: 0:00:00
Clean area: 0.91
Water grade: ViomiWaterGrade.Medium
Remember map: True
Has map: False
Has new map: False
Mop mode: ViomiMode.Vacuum

But there is also a weird Error Code 2105?

The only thing is, that the command executes very slow, sometimes it lasts more than 10seconds until the command is executed, do you know why?

Can you please explain me the difference between vacuum and viomivacuum? Is it correct that i cannot control any Xiamoi Mi Vacuum Robot with the miiocli vacuum command?

That would be sad, because there are a ton more options with the miiocli vacuum command compared to the miiocli viomivacuum.

Thanks for your explanation! Best regards, Dominik

rytilahti commented 4 years ago

Hi Dominik,

No worries, glad you got it working! The 'vacuum' plugin implements the protocol used by rockrobo (there are different manufacturers behind xiaomi vacuums: rockrobo, viomi, dreame, ..), which implement their own control protocols. If there is some command that is missing, which you can control using the official app, then it'd be possible to add that to viomivacuum.

The currently known errors are listed here https://github.com/rytilahti/python-miio/blob/master/miio/viomivacuum.py#L18, so if you know what does that error code mean we could add it to the list of known codes.

Regarding to the slowness of responses, that could be related to the currently missing saving of sequence id when using miiocli. The device may think that a sequential request is a duplicate when the sequence id is the same the previous one. If that happens, miiocli will try to bump the sequence number and retry, which would explain the delays.

rumpeltux commented 3 years ago

If it helps here’s a provisioning command I once sniffed:

{"id":1574455607,"method":"miIO.config_router","params":{"ssid":"WIFISSID","passwd":"WIFIPASSWORD","uid":6…,"config_type":"app","gmt_offset":3600,"tz":"Europe/Berlin"}}
rytilahti commented 3 years ago

Provision command is implemented already (https://github.com/rytilahti/python-miio/blob/master/miio/device.py#L215), the problem is that as soon as you execute that, the token will be reseted -> no more access using the current token. I'm unaware of ways to get the new token.

edit: if there are parameters missing from the linked command, please feel free to create a PR :-)

rumpeltux commented 3 years ago

Once you have root (https://itooktheredpill.irgendwo.org/2020/rooting-xiaomi-vacuum-robot/) you can extract the token from /etc/miio/device.token.

Neuroquila-n8fall commented 3 years ago

Almost the same issues here but with a different flavor. The basics are working for me which is great but I've encountered several "blind spots" with the viomivacuum commands like for example set_moproute which results in the "decrypt" error and/or timeouts like described here and consumables appears to not reveal any "live" info. What I also discovered is that my app won't show me the mop pattern selection which is really strange. I've got the v8 Model EU version. My next approach was to sniff out the network traffic through my firewall (sophos) and also directly from the phone (through pcapdroid) but the only thing i got was a truckload of TLS encrypted messages. Any way that info could be useful to you?

Info: Model: viomi.vacuum.v8 Hardware version: Linux Firmware version: 3.5.3_0017

Status: State: ViomiVacuumState.Docked Mode: ViomiMode.Vacuum Error: Fully charged Battery: 100 Fan speed: ViomiVacuumSpeed.Medium Box type: ViomiBinType.Vacuum Mop type: 0 Clean time: 0:00:07 Clean area: 5.81 Water grade: ViomiWaterGrade.High Remember map: True Has map: True Has new map: False Mop mode: ViomiMode.Vacuum

set_moproute.txt carpet_mode.txt

rytilahti commented 3 years ago

@Neuroquila-n8fall you may be interested in taking a look at #808 by @titilambert and giving it a try (and commenting on your findings on that PR :-), he's done several improvements to viomi vacuum support in that PR.

The TLS traffic (destined to the cloud service, I presume?) is not that useful without decrypting the connection, only capturing the local connectivity (from phone to the device on port 54321) could be useful.

Neuroquila-n8fall commented 3 years ago

@Neuroquila-n8fall you may be interested in taking a look at #808 by @titilambert and giving it a try (and commenting on your findings on that PR :-), he's done several improvements to viomi vacuum support in that PR.

The TLS traffic (destined to the cloud service, I presume?) is not that useful without decrypting the connection, only capturing the local connectivity (from phone to the device on port 54321) could be useful.

Thanks for the hint. I'll give it a shot! Well I've got a lot of UDP traffic as well. It's strange that I could only see those messages when probing from the firewall interface. I have also recorded UDP engrams that were sent directly from the mother ship.

jeremysherriff commented 3 years ago

@Neuroquila-n8fall you may be interested in taking a look at #808 by @titilambert and giving it a try (and commenting on your findings on that PR :-), he's done several improvements to viomi vacuum support in that PR.

I am watching that PR closely, it will be great to have room-specific cleaning capability in the viomi v8!

ant0nwax commented 3 years ago

HI All

I am trying to integrate my viomi.vacuum.v8 into Home Assistant running in iocage on TrueNAS (FreeBSD)

THIS IS OK I have one integration up and running which is this one: https://github.com/PiotrMachowski/lovelace-xiaomi-vacuum-map-card

THIS IS NOT WORKING I struggle with getting another integration to run because of the same issue you guys seem to have here https://github.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor

I get following issues:

ESC[31m2021-03-06 19:34:57 ERROR (SyncWorker_3) [miio.miioprotocol] Got error when receiving: timed outESC[0m
ESC[33m2021-03-06 19:35:01 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05ESC[0m

Debug Level Logs:

ESC[36m2021-03-06 19:24:54 DEBUG (SyncWorker_3) [miio.miioprotocol] Discovered 16581cc7 with ts: 2021-03-06 18:24:54, token: b'ffffffffffffffffffffffffffffffff'ESC[0m
ESC[36m2021-03-06 19:24:54 DEBUG (SyncWorker_3) [miio.miioprotocol] 192.168.1.208:54321 >>: {'id': 304, 'method': 'get_map_v1', 'params': []}ESC[0m
ESC[31m2021-03-06 19:24:59 ERROR (SyncWorker_3) [miio.miioprotocol] Got error when receiving: timed outESC[0m
ESC[33m2021-03-06 19:24:59 WARNING (SyncWorker_3) [custom_components.xiaomi_cloud_map_extractor.camera] Got exception while fetching the state: No response from the deviceESC[0m
ESC[36m2021-03-06 19:24:59 DEBUG (SyncWorker_3) [miio.miioprotocol] 192.168.1.208:54321 >>: {'id': 305, 'method': 'get_map_v1', 'params': []}ESC[0m
ESC[36m2021-03-06 19:25:04 DEBUG (SyncWorker_3) [miio.miioprotocol] Retrying with incremented id, retries left: 3ESC[0m
ESC[36m2021-03-06 19:25:04 DEBUG (SyncWorker_3) [miio.miioprotocol] Got a response: Container:
    data = Container:
        data = b'' (total 0)
        value = b'' (total 0)
        offset1 = 32
        offset2 = 32
        length = 0
    header = Container:
        data = b'!1\x00 \x00\x00\x00\x00\x16X\x1c\xc7`C\xc9\x01' (total 16)
        value = Container:
            length = 32
            unknown = 0
            device_id = b'\x16X\x1c\xc7' (total 4)
            ts = 2021-03-06 18:25:05
        offset1 = 0
        offset2 = 16
        length = 16
    checksum = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' (total 16)ESC[0m
ESC[36m2021-03-06 19:25:04 DEBUG (SyncWorker_3) [miio.miioprotocol] Discovered 16581cc7 with ts: 2021-03-06 18:25:05, token: b'ffffffffffffffffffffffffffffffff'ESC[0m
ESC[36m2021-03-06 19:25:04 DEBUG (SyncWorker_3) [miio.miioprotocol] 192.168.1.208:54321 >>: {'id': 406, 'method': 'get_map_v1', 'params': []}ESC[0m
ESC[36m2021-03-06 19:25:09 DEBUG (SyncWorker_7) [miio.miioprotocol] 192.168.1.208:54321 >>: {'id': 3, 'method': 'get_prop', 'params': ['run_state', 'mode', 'err_state', 'battary_life', 'box_type', 'mop_type', 's_time', 's_area', 'suction_grade', 'water_grade', 'remember_map', 'has_map', 'is_mop', 'has_newmap']}ESC[0m
ESC[36m2021-03-06 19:25:09 DEBUG (SyncWorker_7) [miio.miioprotocol] 192.168.1.208:54321 (ts: 2021-03-06 18:25:09, id: 3) << {'result': [5, 0, 2105, 100, 1, 0, 1, 1.5, 3, 12, 1, 1, 0, 1], 'id': 3}ESC[0m
ESC[36m2021-03-06 19:25:09 DEBUG (SyncWorker_3) [miio.miioprotocol] Retrying with incremented id, retries left: 2ESC[0m
ESC[36m2021-03-06 19:25:10 DEBUG (SyncWorker_3) [miio.miioprotocol] Got a response: Container:
    data = Container:
        data = b'' (total 0)
        value = b'' (total 0)
        offset1 = 32
        offset2 = 32
        length = 0
    header = Container:
        data = b'!1\x00 \x00\x00\x00\x00\x16X\x1c\xc7`C\xc9\x06' (total 16)
        value = Container:
            length = 32
            unknown = 0
            device_id = b'\x16X\x1c\xc7' (total 4)
            ts = 2021-03-06 18:25:10
        offset1 = 0
        offset2 = 16
        length = 16
    checksum = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' (total 16)ESC[0m
ESC[36m2021-03-06 19:25:10 DEBUG (SyncWorker_3) [miio.miioprotocol] Discovered 16581cc7 with ts: 2021-03-06 18:25:10, token: b'ffffffffffffffffffffffffffffffff'ESC[0m
ESC[36m2021-03-06 19:25:10 DEBUG (SyncWorker_3) [miio.miioprotocol] 192.168.1.208:54321 >>: {'id': 507, 'method': 'get_map_v1', 'params': []}ESC[0m
ESC[36m2021-03-06 19:25:15 DEBUG (SyncWorker_3) [miio.miioprotocol] Retrying with incremented id, retries left: 1ESC[0m
ESC[36m2021-03-06 19:25:15 DEBUG (SyncWorker_3) [miio.miioprotocol] Got a response: Container:
    data = Container:
        data = b'' (total 0)
        value = b'' (total 0)
        offset1 = 32
        offset2 = 32
        length = 0
    header = Container:
        data = b'!1\x00 \x00\x00\x00\x00\x16X\x1c\xc7`C\xc9\x0b' (total 16)
        value = Container:
            length = 32
            unknown = 0
            device_id = b'\x16X\x1c\xc7' (total 4)
            ts = 2021-03-06 18:25:15
        offset1 = 0
        offset2 = 16
        length = 16
    checksum = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' (total 16)ESC[0m
ESC[36m2021-03-06 19:25:15 DEBUG (SyncWorker_3) [miio.miioprotocol] Discovered 16581cc7 with ts: 2021-03-06 18:25:15, token: b'ffffffffffffffffffffffffffffffff'ESC[0m
ESC[36m2021-03-06 19:25:15 DEBUG (SyncWorker_3) [miio.miioprotocol] 192.168.1.208:54321 >>: {'id': 608, 'method': 'get_map_v1', 'params': []}ESC[0m
ESC[31m2021-03-06 19:25:20 ERROR (SyncWorker_3) [miio.miioprotocol] Got error when receiving: timed outESC[0m
ESC[36m2021-03-06 19:25:20 DEBUG (SyncWorker_3) [miio.miioprotocol] 192.168.1.208:54321 >>: {'id': 609, 'method': 'get_map_v1', 'params': []}ESC[0m
ESC[36m2021-03-06 19:25:25 DEBUG (SyncWorker_3) [miio.miioprotocol] Retrying with incremented id, retries left: 3ESC[0m
ESC[36m2021-03-06 19:25:25 DEBUG (SyncWorker_3) [miio.miioprotocol] Got a response: Container:

Hope someone finds a solution one day :)

PS, i posted also here: https://github.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor/issues/82#issuecomment-792024346

it seems that the viomi.vacuum.v8 does not work with map extractor (yet) i volunteer as a tester :)

rumpeltux commented 3 years ago

get_map_v1 is a Roborock command IIRC. Here’s my implementation for viomi map parsing: https://github.com/Hypfer/Valetudo/blob/master/lib/ViomiMapParser.js set_uploadmap only works on the cloud interface not the local one (or rather the get_presigned_url commands aren’t received on the local interface).

alex3s commented 2 years ago

@rumpeltux , how do I use this to do the provisioning? So far I have been able to communicate with my vacuum like this, but I don't know how to use your json format miiocli viomivacuum --ip 192.168.1.112 --token xxxxxx ....

If it helps here’s a provisioning command I once sniffed:

{"id":1574455607,"method":"miIO.config_router","params":{"ssid":"WIFISSID","passwd":"WIFIPASSWORD","uid":6…,"config_type":"app","gmt_offset":3600,"tz":"Europe/Berlin"}}
alex3s commented 2 years ago

Provision command is implemented already

@rytilahti , I have site-packages/miio/device.py: return self.send("miIO.config_router", params) how do I use this to do the provisioning? So far I have been able to communicate with my vacuum like this, but I don't know how to use your json format miiocli viomivacuum --ip 192.168.1.112 --token xxxxxx .... Any help will be appreciated as I don't have maps. Everything else seems to be working just with a huge delay.