rospogrigio / localtuya

local handling for Tuya devices
GNU General Public License v3.0
2.83k stars 545 forks source link

Vacuum robot Neatsvor X600PRO - IDs - How to add? #811

Open dcseng opened 2 years ago

dcseng commented 2 years ago

### How can I create this device, with all IDs from them possible using yaml? :


localtuya:
  - host: xxx.xxx.x.xx
    device_id: yyyyyyyyyyyyyyyyyyyy
    local_key: zzzzzzzzzzzzzzzz
    friendly_name: local_neatsvor_x600pro
    protocol_version: "3.3"
    scan_interval: 30
    entities:
    entities:
      - platform: vacuum
        friendly_name: Neatsvor Local X600PRO
        id: 5
        idle_status_value: "Standby,sleep"
        powergo_dp: 2
        docked_status_value: "charging,charge_done"
        returning_status_value: "Docked"
        battery_dp: 8
        mode_dp: 4
        modes: "chargego,pose,selectroom,smart,zone"
        return_mode: "chargego"
        fan_speed_dp: 9
        fan_speeds: "0,1,2,3,4,5,6,7,8,9,10"
        clean_time_dp: 7
        clean_area_dp: 6
        fault_dp: 28
        paused_state: "paused"
        stop_status: "standby"

IDs from Vacuum robot Neatsvor X600PRO:

tuya-cli get --ip x.x.x.x --key yyyyyyyyyyy --id zzzzzzzzzzzz --protocol-version 3.3 --full

<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">

ID | code | unit | Type | values |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- 1 | power_go |   | Boolean | true | false |   |   |   |   |   |   |   |   |   |   |   |   |   |   2 | pause |   | Boolean | true | false |   |   |   |   |   |   |   |   |   |   |   |   |   |   3 | switch_charge |   | Boolean | true | false |   |   |   |   |   |   |   |   |   |   |   |   |   |   4 | mode |   | Enum | chargego | pose | selectroom | smart | zone |   |   |   |   |   |   |   |   |   |   |   5 | status |   | string | mop_clean | sleep | charge_done | charging | goto_charge | pos_unarrive | pos_arrived | goto_pos | paused | cleaning | part_clean | zone_clean | standby | manual_control | smart | select_room 6 | clean_area | m² | integer | 0 | 9999 |   |   |   |   |   |   |   |   |   |   |   |   |   |   7 | clean_time | min | integer | 0 | 9999 |   |   |   |   |   |   |   |   |   |   |   |   |   |   8 | battery_level/electricity_left | % | integer | 0 | 100 |   |   |   |   |   |   |   |   |   |   |   |   |   |   9 | fan_speed_list/suction |   | string | closed | gentle | max | normal | strong |   |   |   |   |   |   |   |   |   |   |   10 | Water Tank/cistern |   | string | closed | low | middle | high |   |   |   |   |   |   |   |   |   |   |   |   17 | Side Brush Life/edge_brush | min | integer | 196 |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   19 | Rolling Brush/roll_brush | min | integer | 296 |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   21 | Filter Life/filter | min | integer | 146 |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   23 | Duster Cloth/duster_cloth | min | integer | 146 |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   26 | volume_set (0,1,2,3,4,5,6,7,8,9,10) |   | float | 10 | 0 |   |   |   |   |   |   |   |   |   |   |   |   |   |   28 | fault |   | integer | 0 |   |   |   |   |   |   |   |   |   |   |   |   |   |   |  

### From iot.tuya.com, Standard Instruction Set:

Code | Type | Values -- | -- | -- power_go | Boolean | "{true,false}" pause | Boolean | "{true,false}" switch_charge | Boolean | "{true,false}" mode | Enum | { "range": [ "smart", "chargego", "zone", "pose", "part" ] } suction | Enum | { "range": [ "gentle", "normal", "strong" ] } cistern | Enum | { "range": [ "low", "middle", "high" ] } seek | Boolean | "{true,false}" direction_control | Enum | { "range": [ "backward", "turn_left", "turn_right", "stop" ] } reset_map | Boolean | "{true,false}" path_data | Raw | {} command_trans | Raw | {} request | Enum | { "range": [ "get_map", "get_path", "get_both" ] } reset_edge_brush | Boolean | "{true,false}" reset_roll_brush | Boolean | "{true,false}" reset_filter | Boolean | "{true,false}" reset_duster_cloth | Boolean | "{true,false}" switch_disturb | Boolean | "{true,false}" volume_set | Integer | { "unit": "%", "min": 0, "max": 10, "scale": 0, "step": 1 } device_timer | Raw | {} disturb_time_set | Raw | {} voice_data | Raw | {}

### From iot.tuya.com, Standard Status Set:

Code | Type | Values -- | -- | -- power_go | Boolean | "{true,false}" pause | Boolean | "{true,false}" switch_charge | Boolean | "{true,false}" mode | Enum | { "range": [ "smart", "chargego", "zone", "pose", "part" ] } status | Enum | { "range": [ "standby", "zone_clean", "part_clean", "cleaning", "paused", "goto_pos", "pos_arrived", "pos_unarrive", "goto_charge", "charging", "charge_done", "sleep", "mop_clean" ] } clean_time | Integer | { "unit": "min", "min": 0, "max": 9999, "scale": 0, "step": 1 } clean_area | Integer | { "unit": "㎡", "min": 0, "max": 9999, "scale": 0, "step": 1 } electricity_left | Integer | { "unit": "%", "min": 0, "max": 100, "scale": 0, "step": 1 } suction | Enum | { "range": [ "closed", "gentle", "normal", "strong" ] } cistern | Enum | { "range": [ "closed", "low", "middle", "high" ] } seek | Boolean | "{true,false}" direction_control | Enum | { "range": [ "backward", "turn_left", "turn_right", "stop" ] } reset_map | Boolean | "{true,false}" path_data | Raw | {} command_trans | Raw | {} request | Enum | { "range": [ "get_map", "get_path", "get_both" ] } edge_brush | Integer | { "unit": "min", "min": 0, "max": 200, "scale": 0, "step": 1 } reset_edge_brush | Boolean | "{true,false}" roll_brush | Integer | { "unit": "min", "min": 0, "max": 300, "scale": 0, "step": 1 } reset_roll_brush | Boolean | "{true,false}" filter | Integer | { "unit": "min", "min": 0, "max": 150, "scale": 0, "step": 1 } reset_filter | Boolean | "{true,false}" duster_cloth | Integer | { "unit": "min", "min": 0, "max": 150, "scale": 0, "step": 1 } reset_duster_cloth | Boolean | "{true,false}" switch_disturb | Boolean | "{true,false}" volume_set | Integer | { "unit": "%", "min": 0, "max": 10, "scale": 0, "step": 1 } fault | Bitmap | { "label": [ "edge_sweep", "middle_sweep", "left_wheel", "right_wheel", "garbage_box", "land_check", "collision" ] } device_timer | Raw | {} disturb_time_set | Raw | {} device_info | Raw | {} voice_data | Raw | {}

Official tuya integration:

image

mitchoklemen commented 2 years ago

Hi, I also own Neatsvor x600 pro. How can I add it with localTuya? I copied your code to configuration.yaml with my settings but I get only 1. entity.

It wont show up with the original integration from iot.tuya. It is just empty... like no tuya devices recognized. I scaned the QR code with app SmartTuya from iot.

Where to start? Thanx, Mitcho

mendoncart commented 2 years ago

I was able to add mine neatsvor x600 pro trough localtuya, but I have a few issues, like: can't select the program it'll start, only full cleaning, can't select area, can't do much. My official tuya integration only return basic options about the vacuum, nothing like the print above. But I'd love to see the news about this thread.

mitchoklemen commented 2 years ago

It looks like noone will help us with it! I cant do it also.

I would preciate any link where I can start to add all sensors and so on. Thank you, Mitcho

mendoncart commented 2 years ago

Hey @mitchoklemen, were you able to add your x600pro trough localtuya? Following the first table in camnop's comment can help you add all the DP's needed.

This is my vacuum "integrated" trough localtuya: image

I'm having some problems, like, the play button only start a clean of the entire house. If I start a specifc room cleaning with the app, I can pause the robot from home assistant, but If I click play in home assistant, this overide the specifc room and transform s it in a entire house clean... Other thing is that I cant start a specifc room cleaning from HA, nor see the map.

I'd love to be able to pause and resume the current cleaning program, see the map, and select rooms to be clean, all from HA. This would be perfect for me.

I cant see the brush life time (integration don't have this info to be filled), and the locate function also doesn't work, but I can leave without it...

mitchoklemen commented 2 years ago

hey, I did exacly like you did with DPs, but still like to achieve at least few of what @camnop did.

Those are my settings... but I dont know if all are ok. DP-1 DP-2

mitchoklemen commented 1 year ago

Hi, Tuya add some entityes for x600 pro... neatsvorx600pro-entity

mitchoklemen commented 1 year ago

How can I get map and vacuum trail from iot.tuya.com? Anyone can help?

[ { "code": "switch_go", "value": true }, { "code": "pause", "value": false }, { "code": "switch_charge", "value": true }, { "code": "mode", "value": "chargego" }, { "code": "suction", "value": "strong" }, { "code": "cistern", "value": "closed" }, { "code": "seek", "value": false }, { "code": "direction_control", "value": "foward" }, { "code": "reset_map", "value": false }, { "code": "path_data" }, { "code": "command_trans" }, { "code": "request", "value": "get_map" }, { "code": "edge_brush_life", "value": 105 }, { "code": "edge_brush_life_reset", "value": false }, { "code": "roll_brush_life", "value": 223 }, { "code": "roll_brush_life_reset", "value": false }, { "code": "filter_reset", "value": false }, { "code": "rag_life_reset", "value": false }, { "code": "switch_disturb", "value": true }, { "code": "volume_set", "value": 10 }, { "code": "device_timer" }, { "code": "disturb_time_set" }, { "code": "voice_data" }, { "code": "language", "value": "English" } ]

dcseng commented 1 year ago

<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">

  | Code -- | -- 1 | power_go 2 | pause 3 | switch_charge 4 | mode 5 | status 6 | clean_time 7 | clean_area 8 | electricity_left 9 | suction 10 | cistern 11 | seek 12 | direction_control 13 | reset_map 14 | path_data 15 | command_trans 16 | request 17 | edge_brush 18 | reset_edge_brush 19 | roll_brush 20 | reset_roll_brush 21 | filter 22 | reset_filter 23 | duster_cloth 24 | reset_duster_cloth 25 | switch_disturb 26 | volume_set 27 | fault 28 | device_timer 29 | disturb_time_set 30 | device_info 31 | voice_data

mitchoklemen commented 1 year ago

How to Add Map and vaccum path to HA?

mitchoklemen commented 1 year ago
Code Type Values
switch_go Boolean "{true,false}"
pause Boolean "{true,false}"
switch_charge Boolean "{true,false}"
mode Enum { "range": [ "smart", "chargego", "zone", "pose", "part", "selectroom" ] }
status Enum { "range": [ "standby", "smart", "zone_clean", "part_clean", "cleaning", "paused", "goto_pos", "pos_arrived", "pos_unarrive", "goto_charge", "charging", "charge_done", "sleep", "select_room", "mop_clean", "manual_control" ] }
clean_time Integer { "unit": "min", "min": 0, "max": 9999, "scale": 0, "step": 1 }
clean_area Integer { "unit": "㎡", "min": 0, "max": 9999, "scale": 0, "step": 1 }
residual_electricity Integer { "unit": "%", "min": 0, "max": 100, "scale": 0, "step": 1 }
suction Enum { "range": [ "closed", "gentle", "normal", "strong", "max" ] }
cistern Enum { "range": [ "closed", "low", "middle", "high" ] }
seek Boolean "{true,false}"
direction_control Enum { "range": [ "foward", "backward", "turn_left", "turn_right", "stop" ] }
reset_map Boolean "{true,false}"
path_data Raw {}
command_trans Raw {}
**request Enum { "range": [ "get_map", "get_path", "get_both" ] }**
edge_brush_life Integer { "unit": "min", "min": 0, "max": 200, "scale": 0, "step": 1 }
edge_brush_life_reset Boolean "{true,false}"
roll_brush_life Integer { "unit": "min", "min": 0, "max": 300, "scale": 0, "step": 1 }
roll_brush_life_reset Boolean "{true,false}"
filter_life Integer { "unit": "min", "min": 0, "max": 150, "scale": 0, "step": 1 }
filter_reset Boolean "{true,false}"
rag_life Integer { "unit": "min", "min": 0, "max": 150, "scale": 0, "step": 1 }
rag_life_reset Boolean "{true,false}"
switch_disturb Boolean "{true,false}"
volume_set Integer { "unit": "%", "min": 0, "max": 10, "scale": 0, "step": 1 }
fault Bitmap { "label": [ "unknow_fault", "l_wheel_wind", "r_wheel_wind", "wheel_wind", "l_wheel_sus", "r_wheel_sus", "wheel_sus", "l_side_brush", "r_side_brush", "side_brush", "roll_brush", "collision", "anti_falling", "fan", "no_dust_box", "no_find_charger", "charge_fault", "battery_fault", "lower_power", "switch_not_open", "camera_fault", "lidar_fault", "tank", "speak_fault", "lidar_stuck", "robot_trap", "dust_bin_full", "kDestinationUnreachable" ], "maxlen": 28 }
device_timer Raw {}
disturb_time_set Raw {}
device_info Raw {}
voice_data Raw {}
language Enum { "range": [ "Chinese", "English", "German", "Italy", "Russian", "Japanese", "Korean", "Danish", "Norwegian", "Portuguese" ] }

[ { "code": "switch_go", "value": true }, { "code": "pause", "value": false }, { "code": "switch_charge", "value": true }, { "code": "mode", "value": "chargego" }, { "code": "suction", "value": "normal" }, { "code": "cistern", "value": "closed" }, { "code": "seek", "value": false }, { "code": "direction_control", "value": "foward" }, { "code": "reset_map", "value": false }, { "code": "path_data" }, { "code": "command_trans" }, { "code": "request", "value": "get_map" }, { "code": "edge_brush_life", "value": 53 }, { "code": "edge_brush_life_reset", "value": false }, { "code": "roll_brush_life", "value": 171 }, { "code": "roll_brush_life_reset", "value": false }, { "code": "filter_reset", "value": false }, { "code": "rag_life_reset", "value": false }, { "code": "switch_disturb", "value": true }, { "code": "volume_set", "value": 10 }, { "code": "device_timer" }, { "code": "disturb_time_set" }, { "code": "voice_data" }, { "code": "language", "value": "English" } ]

mendoncart commented 1 year ago

How to Add Map and vaccum path to HA?

I don't think is currently possible. But if anyone find out, please share.

mitchoklemen commented 1 year ago

If anyone is familiar with this... may help...

https://developer.tuya.com/en/docs/cloud/97b8280ae1?id=Kb9pe3si7eudt

mendoncart commented 1 year ago

If anyone is familiar with this... may help...

https://developer.tuya.com/en/docs/cloud/97b8280ae1?id=Kb9pe3si7eudt

I took a look on this. We can get this results inside the Tuya IOT platform, going to menu cloud > api explorer. image

But first, you have to enable the Sweeping Robot Open Service going to menu cloud > development, selecting your project, then going to: Service Api > Go to Authorize > seach for Sweeping Robot Open Service and click free trial.

After enabling the api, goto api explorer, and select Sweeping Robot Open Service on the dropdown menu. After this, select the operation you want to execute, like, Get Link of Real-Time Map, insert the device_id and submit the request.

I've got 3 links, for these 3 files, but I don't know how to open those .bin files...

So... If anyone can help to elaborate further...

mitchoklemen commented 1 year ago

I also tried and get the files but cant opened it. Tried all image files with no luck.

https://support.tuya.com/en/help/_list?category=Cb4dkteipxcv6

There is also no description about it.

mitchoklemen commented 1 year ago

https://developer.tuya.com/en/docs/cloud/97b8280ae1?id=Kb9pe3si7eudt

There is also command to get TXT but I dont know how to use it... but it is not like real-time map which is in .bin file.

patrik-malina commented 1 year ago

I tried, just got result: []

hiagocosta commented 1 year ago

hi guys, any news about this integration, or just only a way to send via HA specific area cleaning?

hiagocosta commented 2 months ago

hi, I belieave that this integration of this robot is still not 1005 it has more options than it shows