nqkdev / home-assistant-vacuum-styj02ym

161 stars 134 forks source link

Send_command and xiaomi_clean_zone not working #16

Closed suxarik closed 4 years ago

suxarik commented 4 years ago

First of all thanks for work you've done. I've made this integration in my supervised docker home assistant system.

Problem Every command seems to work (start, stop, return to base, pause,..) except for send_command and clean_zone.

What I expect Send_command works

System HomeAssistant supervised 0.110.5 on docker nqkdev/home-assistant-vacuum-styj02ym latest

Symptoms On send_command and clean_zone I get response timeout. It is strange since I can use all other commands.

2020-06-11 10:45:55 DEBUG (MainThread) [homeassistant.core] Service did not complete before timeout: <ServiceCall vacuum.send_command (c:ee4117629eef4f9099a2cd369c9a15e4): entity_id=['vacuum.vacuum_robot'], command=app_goto_target, params=[25500, 25500]>

2020-06-11 10:45:55 DEBUG (SyncWorker_4) [miio.miioprotocol] Retrying with incremented id, retries left: 2

2020-06-11 10:45:55 DEBUG (SyncWorker_4) [miio.protocol] Unable to decrypt, returning raw bytes: b''

2020-06-11 10:45:55 DEBUG (SyncWorker_4) [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\x12k\x16\x1f^\xe1\xe13' (total 16)

        value = Container: 

            length = 32

            unknown = 0

            device_id = b'\x12k\x16\x1f' (total 4)

            ts = 2020-06-11 07:45:55

        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)
2020-06-11 10:45:55 DEBUG (SyncWorker_4) [miio.miioprotocol] Discovered 126b161f with ts: 2020-06-11 07:45:55, token: b'ffffffffffffffffffffffffffffffff'

2020-06-11 10:45:55 DEBUG (SyncWorker_4) [miio.miioprotocol] 192.168.10.179:54321 >>: {'id': 613, 'method': 'app_goto_target', 'params': [25500, 25500]}

Any idea what am I doing wrong? Thanks.

nqkdev commented 4 years ago

Hi there, there is no app_goto_target for styj02ym. If you have the coordinates, you can try xiaomi_clean_point with

{"point": [25500, 25500]}

or xiaomi_clean_zone with

{"zone" : [[x1, y2, x2, y1], [x1, y2, x2, y1]], "repeats": 1}
suxarik commented 4 years ago

Hi there, there is no app_goto_target for styj02ym. If you have the coordinates, you can try xiaomi_clean_point with

{"point": [25500, 25500]}

or xiaomi_clean_zone with

{"zone" : [[x1, y2, x2, y1], [x1, y2, x2, y1]], "repeats": 1}

Thanks. It's seems to be working. Are you planning to implement goto_target or segment_clean command?

raress96 commented 4 years ago

Check #14, it may support what you need.

suxarik commented 4 years ago

Check #14, it may support what you need.

Thanks, will try.

sheminasalam commented 3 years ago

Hi there, there is no app_goto_target for styj02ym. If you have the coordinates, you can try xiaomi_clean_point with

{"point": [25500, 25500]}

or xiaomi_clean_zone with

{"zone" : [[x1, y2, x2, y1], [x1, y2, x2, y1]], "repeats": 1}

Thanks. It's seems to be working. Are you planning to implement goto_target or segment_clean command?

Can you advise me the best option to retrieve coordinates of different areas from styj02ym vacuum?