make-all / tuya-local

Local support for Tuya devices in Home Assistant
MIT License
1.21k stars 488 forks source link

Request support for MEDION Robot S20 SW vacuum cleaner #1117

Closed bkbartk closed 11 months ago

bkbartk commented 11 months ago

Log Message

This error originated from a custom integration.

Logger: custom_components.tuya_local.config_flow
Source: custom_components/tuya_local/config_flow.py:49
Integration: Tuya Local (documentation, issues)
First occurred: 19:43:27 (2 occurrences)
Last logged: 19:43:27

Device matches ard100_valve with quality of 20%. DPS: {"updated_at": 1695750204.436662, "1": true, "3": "standby", "4": "forward", "5": "standby", "7": 63, "9": 65, "10": false, "12": false, "13": false, "14": "normal", "16": 0, "17": 0, "18": 0, "20": "middle", "101": false}
Report this to https://github.com/make-all/tuya-local/issues/

Information about DPS mappings

{
  "result": {
    "model": "{\"modelId\":\"0000035ker\",\"services\":[{\"actions\":[],\"code\":\"\",\"description\":\"\",\"events\":[],\"name\":\"默认服务\",\"properties\":[
{\"abilityId\":1,\"accessMode\":\"rw\",\"code\":\"switch\",\"description\":\"【非必选】可选择无开关机功能。 开关机控制。 下发: 发送控制指令给主机,主机依据指令状态进行开关机操作。 上报: 当主机使用遥控器关机或者长时间静止进入关机状态后,主机会上报一个关机数据。 当主机处于关机状态时,通过遥控器或者触摸主机的按键,主机会进入开机状态,主机会上报一个开机数据。\",\"extensions\":{\"iconName\":\"icon-dp_power2\",\"attribute\":\"1056\"},\"name\":\"电源开关\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},
{\"abilityId\":2,\"accessMode\":\"rw\",\"code\":\"switch_go\",\"description\":\"【必选】\",\"extensions\":{\"iconName\":\"icon-dp_power\",\"attribute\":\"1568\"},\"name\":\"清扫开关\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},
{\"abilityId\":3,\"accessMode\":\"rw\",\"code\":\"mode\",\"description\":\"【必选】枚举值按需选择,不需要的可删除,可以调整排列顺序,但是单词必须一模一样,不可修改单词,例如不能把smart修改为AOTU。\\nstandby 待机\\nrandom 随机模式\\nspiral 螺旋模式\\nsmart 自动模式\\nchargego 回充模式\\nwall_follow 沿墙模式\",\"extensions\":{\"iconName\":\"icon-dp_mode\",\"attribute\":\"1568\"},\"name\":\"工作模式\",\"typeSpec\":{\"range\":[\"standby\",\"random\",\"spiral\",\"smart\",\"chargego\",\"wall_follow\"],\"type\":\"enum\",\"typeDefaultValue\":\"standby\"}},
{\"abilityId\":4,\"accessMode\":\"rw\",\"code\":\"direction_control\",\"description\":\"【非必选】 默认值不可删除,不可修改,不可增加。默认逻辑:按住方向键下发 前/后/左转/右转,手指抬起下发停止\",\"extensions\":{\"iconName\":\"icon-dp_wind\",\"attribute\":\"1120\"},\"name\":\"清扫方向\",\"typeSpec\":{\"range\":[\"forward\",\"backward\",\"turn_left\",\"turn_right\",\"stop\"],\"type\":\"enum\",\"typeDefaultValue\":\"forward\"}},
{\"abilityId\":5,\"accessMode\":\"ro\",\"code\":\"status\",\"description\":\"【必选】默认枚举值不可删除,否则影响控制面板逻辑,可以调整排列顺序,但是单词必须一模一样,不可修改单词,例如不能把smart修改为AOTU,保证默认的不变,可在后面增加其他状态值,状态值尽量是状态的英文小写单词,如需要增加故障中状态,则为in_trouble。\\nstandby 待机中\\nrandom_clean 随机模式\\nspot_clean 定点清扫中\\nsmart_clean 自动清扫中\\ngoto_charge 回座中\\nwall_clean 沿墙清扫中\\n\\nsleep  休眠\\nremote  遥控模式\\ncharging_line 适配器充电\\ncharging_base 充电座充电\\nlow_power 电量低\\ncharging  充电中\\ncharge_done 充电完成\\npaused 暂停\\ncleaning 清扫中\\nmop_clean  拖地清扫中\\nin_trouble 故障中\",\"extensions\":{\"iconName\":\"icon-dp_dust\",\"attribute\":\"1600\"},\"name\":\"工作状态\",\"typeSpec\":{\"range\":[\"standby\",\"random_clean\",\"spot_clean\",\"smart_clean\",\"goto_charge\",\"wall_clean\",\"sleep\",\"remote\",\"charging_line\",\"charging_base\",\"low_power\",\"charging\",\"charge_done\",\"paused\",\"cleaning\",\"mop_clean\",\"in_trouble\"],\"type\":\"enum\",\"typeDefaultValue\":\"standby\"}},
{\"abilityId\":6,\"accessMode\":\"ro\",\"code\":\"residual_electricity\",\"description\":\"【非必选】默认区间为0%—100%(没有小数点),如果需要显示为小数点,可以修改倍数参数,例如需要支持一位小数点,则倍数参数为1,上报的数值会经过计算,保留一位小数,例如上报589,经过换算后为58.9%。\",\"extensions\":{\"iconName\":\"icon-dp_up\",\"attribute\":\"1088\"},\"name\":\"剩余电量\",\"typeSpec\":{\"max\":100,\"min\":0,\"scale\":0,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":0,\"unit\":\"%\"}},
{\"abilityId\":7,\"accessMode\":\"ro\",\"code\":\"edge_brush\",\"description\":\"【非必选】默认区间为0%—100%(没有小数点),如果需要显示为小数点,可以修改倍数参数,例如需要支持一位小数点,则倍数参数为1,上报的数值会经过计算,保留一位小数,例如上报589,经过换算后为58.9%。\\n注意:\\n1、选择了该DP点,必须选择对应的重置DP点\",\"extensions\":{\"iconName\":\"icon-dp_time2\",\"attribute\":\"1088\"},\"name\":\"边刷寿命\",\"typeSpec\":{\"max\":100,\"min\":0,\"scale\":0,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":0,\"unit\":\"%\"}},
{\"abilityId\":9,\"accessMode\":\"ro\",\"code\":\"filter\",\"description\":\"【非必选】默认区间为0%—100%(没有小数点),如果需要显示为小数点,可以修改倍数参数,例如需要支持一位小数点,则倍数参数为1,上报的数值会经过计算,保留一位小数,例如上报589,经过换算后为58.9%。\\n注意:\\n1、选择了该DP点,必须选择对应的重置DP点\",\"extensions\":{\"iconName\":\"icon-icon-percent\",\"attribute\":\"1088\"},\"name\":\"滤网寿命\",\"typeSpec\":{\"max\":100,\"min\":0,\"scale\":0,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":0,\"unit\":\"%\"}},
{\"abilityId\":10,\"accessMode\":\"rw\",\"code\":\"reset_edge_brush\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_loop\",\"attribute\":\"1056\"},\"name\":\"边刷重置\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},
{\"abilityId\":12,\"accessMode\":\"rw\",\"code\":\"reset_filter\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_loop\",\"attribute\":\"1056\"},\"name\":\"滤网重置\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},
{\"abilityId\":13,\"accessMode\":\"rw\",\"code\":\"seek\",\"description\":\"【非必选】\",\"extensions\":{\"iconName\":\"icon-dp_magnifier\",\"attribute\":\"1056\"},\"name\":\"寻找机器\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},
{\"abilityId\":14,\"accessMode\":\"rw\",\"code\":\"suction\",\"description\":\"【非必选】默认值(可修改、删除、增加):\\nnormal 标准吸力\\nstrong 强风吸力\\n\",\"extensions\":{\"iconName\":\"icon-Strong\",\"attribute\":\"1056\"},\"name\":\"吸力选择\",\"typeSpec\":{\"range\":[\"normal\",\"strong\"],\"type\":\"enum\",\"typeDefaultValue\":\"normal\"}},
{\"abilityId\":15,\"accessMode\":\"ro\",\"code\":\"clean_record\",\"description\":\"【非必选】可选择将地图ID号同时上报 清扫日期+ YYYYMMDDTTRR 清扫时长 + XXX 清扫面积 xxx 如: \\\"20180411051102008000020\\\" 代表2018年4月11日05点11分,清扫了20分钟,80平方米 ,id号为20(假如MCU没有RTC,时间可不上报。记录则默认显示为数据上报时间)\",\"extensions\":{\"iconName\":\"icon-dp_book\",\"attribute\":\"1120\"},\"name\":\"清扫记录\",\"typeSpec\":{\"maxlen\":255,\"type\":\"string\",\"typeDefaultValue\":\"\"}},
{\"abilityId\":16,\"accessMode\":\"ro\",\"code\":\"clean_area\",\"description\":\"【非必选】默认区间为0min—9999㎡(没有小数点),如果需要显示为小数点,可以修改倍数参数,例如需要支持一位小数点,则倍数参数为1,上报的数值会经过计算,保留一位小数,例如上报589,经过换算后为58.9㎡。\",\"extensions\":{\"iconName\":\"icon-icon-test10\",\"attribute\":\"1088\"},\"name\":\"清扫面积\",\"typeSpec\":{\"max\":9999,\"min\":0,\"scale\":0,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":0,\"unit\":\"㎡\"}},
{\"abilityId\":17,\"accessMode\":\"ro\",\"code\":\"clean_time\",\"description\":\"【非必选】默认区间为0min—9999分钟(没有小数点),如果需要显示为小数点,可以修改倍数参数,例如需要支持一位小数点,则倍数参数为1,上报的数值会经过计算,保留一位小数,例如上报589,经过换算后为58.9min\",\"extensions\":{\"iconName\":\"icon-dp_time3\",\"attribute\":\"1088\"},\"name\":\"清扫时间\",\"typeSpec\":{\"max\":9999,\"min\":0,\"scale\":0,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":0,\"unit\":\"min\"}},
{\"abilityId\":18,\"accessMode\":\"ro\",\"code\":\"fault\",\"description\":\"1:边刷故障 \\n2:滚刷故障 \\n3:左轮故障 \\n4:右轮故障 \\n5:尘盒故障 \\n6:地检故障 \\n7:碰撞传感器故障 \\n8:OBS异常\\n9:沿墙异常\\n10:探地组件异常\\n11:万向轮异常\\n12:左刷异常\\n13:右刷异常\\n14:风扇异常\\n15:水泵异常\\n16:气泵异常\\n17:水箱异常\\n18:滤网异常\\n19:电池异常\\n20:陀螺仪组件异常\\n21:雷达组件异常\\n22:视觉组件异常\\n23:行进异常\\n24:其他异常\",\"extensions\":{\"iconName\":\"icon-dp_warming\",\"scope\":\"fault\",\"attribute\":\"1088\"},\"name\":\"故障告警\",\"typeSpec\":{\"label\":[\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\",\"18\",\"19\",\"20\",\"21\",\"22\",\"23\",\"24\"],\"maxlen\":24,\"type\":\"bitmap\",\"typeDefaultValue\":0}},
{\"abilityId\":20,\"accessMode\":\"rw\",\"code\":\"water_control\",\"description\":\"【非必选】默认值(可修改、删除、增加):\\nlow:低档\\nmiddle:中档\\nhigh:高档\",\"extensions\":{\"iconName\":\"icon-dp_water\",\"attribute\":\"1184\"},\"name\":\"水量控制\",\"typeSpec\":{\"range\":[\"low\",\"middle\",\"high\"],\"type\":\"enum\",\"typeDefaultValue\":\"low\"}},
{\"abilityId\":101,\"accessMode\":\"rw\",\"code\":\"resume\",\"description\":\"Factory Reset\",\"name\":\"Factory Reset\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}}]}]}"
  },
  "success": true,
  "t": 1695750314298,
  "tid": "728ba60d5c9411ee95454a52bad04d54"
}

device specification attribute

{
  "result": {
    "category": "sd",
    "functions": [
      {
        "code": "power",
        "dp_id": 1,
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "power_go",
        "dp_id": 2,
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "mode",
        "dp_id": 3,
        "type": "Enum",
        "values": "{\"range\":[\"standby\",\"random\",\"spiral\",\"smart\",\"chargego\",\"wall_follow\"]}"
      },
      {
        "code": "direction_control",
        "dp_id": 4,
        "type": "Enum",
        "values": "{\"range\":[\"forward\",\"backward\",\"turn_left\",\"turn_right\",\"stop\"]}"
      },
      {
        "code": "reset_edge_brush",
        "dp_id": 10,
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "reset_filter",
        "dp_id": 12,
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "seek",
        "dp_id": 13,
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "suction",
        "dp_id": 14,
        "type": "Enum",
        "values": "{\"range\":[\"normal\",\"strong\"]}"
      },
      {
        "code": "cistern",
        "dp_id": 20,
        "type": "Enum",
        "values": "{\"range\":[\"low\",\"middle\",\"high\"]}"
      }
    ],
    "status": [
      {
        "code": "power",
        "dp_id": 1,
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "power_go",
        "dp_id": 2,
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "mode",
        "dp_id": 3,
        "type": "Enum",
        "values": "{\"range\":[\"standby\",\"random\",\"spiral\",\"smart\",\"chargego\",\"wall_follow\"]}"
      },
      {
        "code": "direction_control",
        "dp_id": 4,
        "type": "Enum",
        "values": "{\"range\":[\"forward\",\"backward\",\"turn_left\",\"turn_right\",\"stop\"]}"
      },
      {
        "code": "status",
        "dp_id": 5,
        "type": "Enum",
        "values": "{\"range\":[\"standby\",\"spot_clean\",\"smart_clean\",\"goto_charge\",\"wall_clean\",\"sleep\",\"charging\",\"charge_done\",\"paused\",\"cleaning\",\"mop_clean\"]}"
      },
      {
        "code": "electricity_left",
        "dp_id": 6,
        "type": "Integer",
        "values": "{\"unit\":\"%\",\"min\":0,\"max\":100,\"scale\":0,\"step\":1}"
      },
      {
        "code": "edge_brush",
        "dp_id": 7,
        "type": "Integer",
        "values": "{\"unit\":\"%\",\"min\":0,\"max\":100,\"scale\":0,\"step\":1}"
      },
      {
        "code": "filter",
        "dp_id": 9,
        "type": "Integer",
        "values": "{\"unit\":\"%\",\"min\":0,\"max\":100,\"scale\":0,\"step\":1}"
      },
      {
        "code": "reset_edge_brush",
        "dp_id": 10,
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "reset_filter",
        "dp_id": 12,
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "seek",
        "dp_id": 13,
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "suction",
        "dp_id": 14,
        "type": "Enum",
        "values": "{\"range\":[\"normal\",\"strong\"]}"
      },
      {
        "code": "clean_record",
        "dp_id": 15,
        "type": "String",
        "values": "{\"maxlen\":255}"
      },
      {
        "code": "clean_area",
        "dp_id": 16,
        "type": "Integer",
        "values": "{\"unit\":\"㎡\",\"min\":0,\"max\":9999,\"scale\":0,\"step\":1}"
      },
      {
        "code": "clean_time",
        "dp_id": 17,
        "type": "Integer",
        "values": "{\"unit\":\"min\",\"min\":0,\"max\":9999,\"scale\":0,\"step\":1}"
      },
      {
        "code": "fault",
        "dp_id": 18,
        "type": "Bitmap",
        "values": "{\"label\":[\"edge_sweep\",\"middle_sweep\",\"left_wheel\",\"right_wheel\",\"garbage_box\",\"land_check\",\"collision\"]}"
      },
      {
        "code": "cistern",
        "dp_id": 20,
        "type": "Enum",
        "values": "{\"range\":[\"low\",\"middle\",\"high\"]}"
      }
    ]
  },
  "success": true,
  "t": 1695750396898,
  "tid": "a3d2a7295c9411ee95454a52bad04d54"
}

Device specification attributes:

{
  "result": {
    "category": "sd",
    "functions": [
      {
        "code": "power",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "power_go",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "mode",
        "type": "Enum",
        "values": "{\"range\":[\"standby\",\"random\",\"spiral\",\"smart\",\"chargego\",\"wall_follow\"]}"
      },
      {
        "code": "direction_control",
        "type": "Enum",
        "values": "{\"range\":[\"forward\",\"backward\",\"turn_left\",\"turn_right\",\"stop\"]}"
      },
      {
        "code": "reset_edge_brush",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "reset_filter",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "seek",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "suction",
        "type": "Enum",
        "values": "{\"range\":[\"normal\",\"strong\"]}"
      },
      {
        "code": "cistern",
        "type": "Enum",
        "values": "{\"range\":[\"low\",\"middle\",\"high\"]}"
      }
    ],
    "status": [
      {
        "code": "power",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "power_go",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "mode",
        "type": "Enum",
        "values": "{\"range\":[\"standby\",\"random\",\"spiral\",\"smart\",\"chargego\",\"wall_follow\"]}"
      },
      {
        "code": "direction_control",
        "type": "Enum",
        "values": "{\"range\":[\"forward\",\"backward\",\"turn_left\",\"turn_right\",\"stop\"]}"
      },
      {
        "code": "status",
        "type": "Enum",
        "values": "{\"range\":[\"standby\",\"spot_clean\",\"smart_clean\",\"goto_charge\",\"wall_clean\",\"sleep\",\"charging\",\"charge_done\",\"paused\",\"cleaning\",\"mop_clean\"]}"
      },
      {
        "code": "electricity_left",
        "type": "Integer",
        "values": "{\"unit\":\"%\",\"min\":0,\"max\":100,\"scale\":0,\"step\":1}"
      },
      {
        "code": "edge_brush",
        "type": "Integer",
        "values": "{\"unit\":\"%\",\"min\":0,\"max\":100,\"scale\":0,\"step\":1}"
      },
      {
        "code": "filter",
        "type": "Integer",
        "values": "{\"unit\":\"%\",\"min\":0,\"max\":100,\"scale\":0,\"step\":1}"
      },
      {
        "code": "reset_edge_brush",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "reset_filter",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "seek",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "suction",
        "type": "Enum",
        "values": "{\"range\":[\"normal\",\"strong\"]}"
      },
      {
        "code": "clean_record",
        "type": "String",
        "values": "{\"maxlen\":255}"
      },
      {
        "code": "clean_area",
        "type": "Integer",
        "values": "{\"unit\":\"㎡\",\"min\":0,\"max\":9999,\"scale\":0,\"step\":1}"
      },
      {
        "code": "clean_time",
        "type": "Integer",
        "values": "{\"unit\":\"min\",\"min\":0,\"max\":9999,\"scale\":0,\"step\":1}"
      },
      {
        "code": "fault",
        "type": "Bitmap",
        "values": "{\"label\":[\"edge_sweep\",\"middle_sweep\",\"left_wheel\",\"right_wheel\",\"garbage_box\",\"land_check\",\"collision\"]}"
      },
      {
        "code": "cistern",
        "type": "Enum",
        "values": "{\"range\":[\"low\",\"middle\",\"high\"]}"
      }
    ]
  },
  "success": true,
  "t": 1695750450504,
  "tid": "c3ca558a5c9411eebb19ce5fa22f6e19"
}

local tuya config: (however is can be that some I don't use are incorrect)

ID: 5
friendly name: MEDION Robot S20 SW
idle status: standby,sleep
Power DP: 2
Docked status: charging,charge_done
Returning State: goto_charge
Battery status DP: 6
Mode DP: 3
Modes list: standby,random,spiral,smart,chargego,wall_follow
Return home mode: chargego
FAN Speel DP: 14
Fan Speeds list: normal,strong
Clean Time DP: 17
Clean Aread DP: 16
Clean Record DP: 15
Locate DP: 13
Fault DP: 18
Pause State: paused
Stop status: standby 

Product ID

"product_id": "ltp2oxcyx2l80unp",

Information about how the device functions

https://www.medion.com/nl/shop/p/robotstofzuigers-medion-robotstofzuiger-s20-sw-md20011--app-en-alexa-besturing--stofzuigen-en-dweilen--intelligente-navigatie--cycloontechnologie--groot-stofreservoir--100-min-looptijd-50071363A1?wt_mc=nl.sea.pla_google.._

bkbartk commented 11 months ago

I just tried this newly implemented vacuum and it works, but I am wondering about 1 thing here. with the current config "pause" returns the cleaner to base. There is now way to pause without returning to base.

is this something which is not possible or am I missing something?

With local Tuya I had 4 buttons "play/pause","stop","locate","return to base" now I have 3 "play/pause","clean spot","locate",