al-one / hass-xiaomi-miot

Automatic integrate all Xiaomi devices to HomeAssistant via miot-spec, support Wi-Fi, BLE, ZigBee devices. 小米米家智能家居设备接入Hass集成
https://miot-spec.com
Apache License 2.0
4.4k stars 615 forks source link

Viomi SE v.19 not supported coordinates #1010

Open Cigareoc opened 1 year ago

Cigareoc commented 1 year ago

Good evening! I have this robot for the last 1.5 years Viomi SE V-RVCLM21A (viomi.vacuum.v19),it worked very well until half a year ago through the integrations Viomi Robot Vacuum Cleaner SE (V-RVCLM21A-not working for me now) and your al-one/hass-xiaomi-miot to which he understands the commands
Here is coordinates

 - service: vacuum.send_command
    data:
      command: app_zoned_clean
      params:
        - - -0.25
          - -0.6
          - 3.8
          - 2.55
          - 1
        - - -0.25
          - -0.6
          - 3.8
          - 2.55
          - 1

but now only through your integration he understands commands like this

Here is by room id

- service: xiaomi_miot.call_action
    data:
      entity_id: vacuum.viomi_v19_4b59_robot_cleaner
      did: XXXXXXXXXXX
      siid: 4
      aiid: 13
      params:
        - 0
        - 1
        - "14"

but still I would like to be able to send the robot to the coordinates as before because on the coordinates it cleans everywhere, but whith room's only how the room's was scanned before.Here is the link from miot https://home.miot-spec.com/spec?type=urn:miot-spec-v2:device:vacuum:0000A006:viomi-v19:1 Please Help me to fix this with coordinates

al-one commented 1 year ago

Try script:

sequence:
  - service: xiaomi_miot.set_miot_property
    data:
      entity_id: vacuum.viomi_v19_4b59_robot_cleaner
      siid: 6 # point-zone
      piid: 2 # zone-points
      value: x1,y1,x2,y2,x3,y3,x4,y4
  - service: xiaomi_miot.call_action
    data:
      entity_id: vacuum.viomi_v19_4b59_robot_cleaner
      siid: 6 # point-zone
      aiid: 5 # start-zone-clean
      params: []
Cigareoc commented 1 year ago

Good morning! I created script with zone/segment,after robot start with this script after 1s it stop and going to base,not start to clean with coordinates, I can send you part of the log created from mi home @vevs?

alias: Dormitor Coordinate Test
sequence:
  - service: xiaomi_miot.set_miot_property
    data:
      entity_id: vacuum.viomi_v19_4b59_robot_cleaner
      siid: 6
      piid: 2
      value:
        - "-0.3624,-3.4268,-0.3624,-6.5783,3.7992,-6.5783,3.7992,-3.4268"
  - service: xiaomi_miot.call_action
    data:
      entity_id: vacuum.viomi_v19_4b59_robot_cleaner
      siid: 6
      aiid: 5
      params: []
mode: single
al-one commented 1 year ago

Show me vevs logs.

Cigareoc commented 1 year ago

Show me vevs logs. this is last with selection zone like the photo,vacuum start and me after 5s-10s stopped it and it going to base here is link from your integration https://home.miot-spec.com/s/viomi.vacuum.v19

viomi.vacuum.v19 viomi Версия программного обеспечения: 4.0.9_0017@Linux

192.168.31.23 viomi.vacuum.v19 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

2023-01-29 14:27:39 -> {"params":{"did":"428494582","siid":7,"aiid":1,"in":[1]}} /miotspec/action 2023-01-29 14:27:39 <- {"code":0,"message":"ok","result":{"did":"428494582","miid":0,"siid":7,"aiid":1,"code":0,"exe_time":1202,"net_cost":195,"otlocalts":1674995259584838,"_oa_rpc_cost":1399,"withLatency":0}} 2023-01-29 14:27:58 -> {"id":1131,"method":"set_properties","params":[{"did":"428494582","siid":6,"piid":2,"value":"-0.4252,3.9593,-0.4252,-0.5053,2.9889,-0.5053,2.9889,3.9593"}]} 2023-01-29 14:27:58 <- {"code":0,"exe_time":100,"id":1131,"message":"ok","net_cost":140,"ot_cost":0,"otlocalts":1674995277932591,"result":[{"code":0,"did":"428494582","piid":2,"siid":6}]} 2023-01-29 14:27:58 -> {"params":{"did":"428494582","siid":6,"aiid":5,"in":[]}} /miotspec/action 2023-01-29 14:27:58 <- {"code":0,"message":"ok","result":{"did":"428494582","miid":0,"siid":6,"aiid":5,"code":0,"exe_time":201,"net_cost":190,"otlocalts":1674995278512886,"_oa_rpc_cost":394,"withLatency":0}} 2023-01-29 14:28:21 -> {"params":{"did":"428494582","siid":2,"aiid":4,"in":[]}} /miotspec/action 2023-01-29 14:28:21 <- {"code":0,"message":"ok","result":{"did":"428494582","miid":0,"siid":2,"aiid":4,"code":0,"exe_time":1102,"net_cost":147,"otlocalts":1674995301564575,"_oa_rpc_cost":1251,"withLatency":0}}

Cigareoc commented 1 year ago

it seems to me that this is how it works, but it starts and after 10-15 seconds status said stand-by and it goes back and loses the map

sequence:

al-one commented 1 year ago

Do these vevs logs contain the records of you performing zone cleaning through MiHome APP ?

And tell me the approximate time you performing zone cleaning in MiHome.

Cigareoc commented 1 year ago

Do these vevs logs contain the records of you performing zone cleaning through MiHome APP ?

And tell me the approximate time you performing zone cleaning in MiHome.

09:53:30 open mi home 09:54:00 selecting zone to clean 09:54:20 press start to clean 09:54 robot start clean 09:56:13 robot said finish and going to base 09:57:17 start charging

192.168.31.23 viomi.vacuum.v19 Full New Log with zone cleaning

2023-01-31 09:54:02 -> {"params":{"did":"428494582","siid":7,"aiid":1,"in":[1]}} /miotspec/action 2023-01-31 09:54:02 <- {"code":0,"message":"ok","result":{"did":"428494582","miid":0,"siid":7,"aiid":1,"code":0,"exe_time":1201,"net_cost":217,"ot_cost":1,"otlocalts":1675151642143873,"_oa_rpc_cost":1421,"withLatency":0}} 2023-01-31 09:54:20 -> {"id":8624,"method":"set_properties","params":[{"did":"428494582","siid":6,"piid":2,"value":"2.3851,-2.2449,2.3851,-3.5884,4.2437,-3.5884,4.2437,-2.2449"}]} 2023-01-31 09:54:20 <- {"code":0,"exe_time":100,"id":8624,"message":"ok","net_cost":117,"ot_cost":0,"otlocalts":1675151660468348,"result":[{"code":0,"did":"428494582","piid":2,"siid":6}]} 2023-01-31 09:54:21 -> {"params":{"did":"428494582","siid":6,"aiid":5,"in":[]}} /miotspec/action 2023-01-31 09:54:21 <- {"code":0,"message":"ok","result":{"did":"428494582","miid":0,"siid":6,"aiid":5,"code":0,"exe_time":101,"net_cost":126,"ot_cost":1,"otlocalts":1675151660975355,"_oa_rpc_cost":230,"withLatency":0}}

al-one commented 1 year ago

According to your logs, this should be the correct script.

sequence:
  - service: xiaomi_miot.set_miot_property
    data:
      entity_id: vacuum.viomi_v19_4b59_robot_cleaner
      siid: 6 # point-zone
      piid: 2 # zone-points
      value: "2.3851,-2.2449,2.3851,-3.5884,4.2437,-3.5884,4.2437,-2.2449"
  - service: xiaomi_miot.call_action
    data:
      entity_id: vacuum.viomi_v19_4b59_robot_cleaner
      siid: 6 # point-zone
      aiid: 5 # start-zone-clean
      params: []
Cigareoc commented 1 year ago

According to your logs, this should be the correct script.

sequence:
  - service: xiaomi_miot.set_miot_property
    data:
      entity_id: vacuum.viomi_v19_4b59_robot_cleaner
      siid: 6 # point-zone
      piid: 2 # zone-points
      value: "2.3851,-2.2449,2.3851,-3.5884,4.2437,-3.5884,4.2437,-2.2449"
  - service: xiaomi_miot.call_action
    data:
      entity_id: vacuum.viomi_v19_4b59_robot_cleaner
      siid: 6 # point-zone
      aiid: 5 # start-zone-clean
      params: []

I think so too, but when I send him coordinates via script,the robot says that it starts cleaning the area, it moves towards the coordinates but in HA then it says it's standby and after two seconds it says it's going back to base,in mi home when I send coordinates via HA, the area suddenly appears selected zone and then few sec it says that it is returning to the base

cataseven commented 7 months ago

After calling siid 6 aiid 5 vacuum.sweep_type is set to 3 (correct) viomi_vacuum.clean_room_mode: is set to value of sweep type (wrong) it cant be 3. It can only be 0 or 1 viomi_vacuum.clean_mode: is remain as 0 (wrong) ıt should be 3

I think viomi_vacuum.clean_mode and viomi_vacuum.clean_room_mode should mapped reverse

fan_speed_list: