Request support for MYPIN 6L Video Pet Feeder
Information about DPS mappings
{
"result": {
"properties": [
{
"code": "basic_indicator",
"custom_name": "",
"dp_id": 101,
"time": 1688147579186,
"value": false
},
{
"code": "basic_osd",
"custom_name": "",
"dp_id": 104,
"time": 1687744862145,
"value": false
},
{
"code": "basic_nightvision",
"custom_name": "",
"dp_id": 108,
"time": 1687744862720,
"value": "0"
},
{
"code": "sd_storge",
"custom_name": "",
"dp_id": 109,
"time": 1687744863851,
"value": "31744|0|31744"
},
{
"code": "sd_status",
"custom_name": "",
"dp_id": 110,
"time": 1688101819735,
"value": 1
},
{
"code": "sd_format",
"custom_name": "",
"dp_id": 111,
"time": 1656372558522,
"value": true
},
{
"code": "motion_record",
"custom_name": "",
"dp_id": 113,
"time": 1656279384422,
"value": false
},
{
"code": "sd_format_state",
"custom_name": "",
"dp_id": 117,
"time": 1687744864650,
"value": 0
},
{
"code": "record_switch",
"custom_name": "",
"dp_id": 150,
"time": 1688145603806,
"value": false
},
{
"code": "record_mode",
"custom_name": "",
"dp_id": 151,
"time": 1687744864407,
"value": "1"
},
{
"code": "device_restart",
"custom_name": "",
"dp_id": 162,
"time": 1656279384422,
"value": false
},
{
"code": "food_weight",
"custom_name": "",
"dp_id": 232,
"time": 1687744867621,
"value": 6
},
{
"code": "control",
"custom_name": "",
"dp_id": 233,
"time": 1656279384422,
"value": 0
},
{
"code": "realtime_data",
"custom_name": "",
"dp_id": 234,
"time": 1656279384422,
"value": 0
},
{
"code": "weight",
"custom_name": "",
"dp_id": 235,
"time": 1656279384422,
"value": 1
},
{
"code": "history_data",
"custom_name": "",
"dp_id": 236,
"time": 1656279384422,
"value": 0
},
{
"code": "schedule",
"custom_name": "",
"dp_id": 237,
"time": 1687744867431,
"value": "7f06000200000007f12000200000007f1800020000000"
},
{
"code": "battery_status",
"custom_name": "",
"dp_id": 238,
"time": 1687744867916,
"value": "high"
},
{
"code": "food_storage_status",
"custom_name": "",
"dp_id": 239,
"time": 1687744868264,
"value": "full"
},
{
"code": "feed_block_status",
"custom_name": "",
"dp_id": 240,
"time": 1688152419037,
"value": false
},
{
"code": "feed_stuck_status",
"custom_name": "",
"dp_id": 241,
"time": 1688152419162,
"value": false
},
{
"code": "feed_voice_record",
"custom_name": "",
"dp_id": 242,
"time": 1656279384422,
"value": "0"
},
{
"code": "manual_feed_report",
"custom_name": "",
"dp_id": 243,
"time": 1688152420644,
"value": 1
},
{
"code": "auto_feed_report",
"custom_name": "",
"dp_id": 244,
"time": 1686243605399,
"value": 2
},
{
"code": "feed_publish",
"custom_name": "",
"dp_id": 245,
"time": 1656279384422,
"value": -2000
},
{
"code": "feed_report",
"custom_name": "",
"dp_id": 246,
"time": 1688152420774,
"value": 1
},
{
"code": "backup_logs",
"custom_name": "",
"dp_id": 247,
"time": 1656279384422
}
]
},
"success": true,
"t": 1688163852304,
"tid": "d6e12f82179411ee94e0a2e0adfc0b14"
}
Product ID
8zrzjldq07tlxnlv
Information about how the device functions
Here's the actual product: https://amzn.eu/d/hdMZ5VH
I can only find a manual for the version without a camera: 60e80c6a31837.pdf
Sorry, Tuya reorganised their API explorer recently, and I put the wrong function name on updated issue template. If you can log into the iot.tuya.com portal again, and get the result from the Query Things Data Model function under Device Control, it will help with the ranges and possible values of those dp. It will also help if you can capture the HA log message from when you try to add the device to Tuya Local, and get up to the device selection step. This will confirm whether the cloud API info from iot.tuya.com exactly matches the local API, or there are some minor differences we need to make.
I think this may be the same device as: https://github.com/make-all/tuya-local/issues/507 - it physically looks the same just branded differently.
Here's the result from the Query Things Data Model function:
{
"result": {
"model": "{\"modelId\":\"0000009uj1\",\"services\":[{\"actions\":[],\"code\":\"\",\"description\":\"\",\"events\":[],\"name\":\"默认服务\",\"properties\":[
{\"abilityId\":101,\"accessMode\":\"rw\",\"code\":\"basic_indicator\",\"description\":\"设备设置页面-基本功能设置\\n设备指示灯是否打开,true打开,false关闭\",\"extensions\":{\"iconName\":\"icon-setting\"},\"name\":\"状态指示灯\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},
{\"abilityId\":104,\"accessMode\":\"rw\",\"code\":\"basic_osd\",\"description\":\"设备设置页面-基本功能设置\\n时间水印功能开关,true打开水印,false关闭水印\",\"extensions\":{\"iconName\":\"icon-setting\"},\"name\":\"时间水印\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},
{\"abilityId\":108,\"accessMode\":\"rw\",\"code\":\"basic_nightvision\",\"description\":\"0:自动\\n1:关\\n2:开\",\"extensions\":{\"iconName\":\"icon-setting\"},\"name\":\"红外夜视\",\"typeSpec\":{\"range\":[\"0\",\"1\",\"2\"],\"type\":\"enum\",\"typeDefaultValue\":\"0\"}},
{\"abilityId\":109,\"accessMode\":\"ro\",\"code\":\"sd_storge\",\"description\":\"单位改为kb\\n---\\n3503775744|778977280|2718158848\\n其中第一字符串是总容量,第二个字符串是已使用的容量,第三个是剩余容量\",\"extensions\":{\"iconName\":\"icon-setting\"},\"name\":\"获取存储卡容量\",\"typeSpec\":{\"maxlen\":255,\"type\":\"string\",\"typeDefaultValue\":\"\"}},
{\"abilityId\":110,\"accessMode\":\"ro\",\"code\":\"sd_status\",\"description\":\"status:sd卡状态,1-正常,2-异常,3-空间不足,4-正在格式化,5-无SD卡;\",\"extensions\":{\"iconName\":\"icon-setting\"},\"name\":\"存储卡状态\",\"typeSpec\":{\"max\":5,\"min\":1,\"scale\":0,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":1}},
{\"abilityId\":111,\"accessMode\":\"rw\",\"code\":\"sd_format\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-setting\"},\"name\":\"存储卡格式化\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},
{\"abilityId\":113,\"accessMode\":\"rw\",\"code\":\"motion_record\",\"description\":\"true移动侦测录像,false全时录像\\n摄像头本地功能:功能打开的时候,只有检测到移动才开始录像。\",\"extensions\":{\"iconName\":\"icon-setting\"},\"name\":\"SD卡录像模式\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},
{\"abilityId\":117,\"accessMode\":\"ro\",\"code\":\"sd_format_state\",\"description\":\"返回错误码:\\n-2000:SD卡正在格式化\\n-2001:SD卡格式化异常\\n-2002:无SD卡\\n-2003:SD卡错误\\n\\n//正数为格式化进度\",\"extensions\":{\"iconName\":\"icon-setting\"},\"name\":\"格式化状态\",\"typeSpec\":{\"max\":200000,\"min\":-20000,\"scale\":0,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":-20000}},
{\"abilityId\":150,\"accessMode\":\"rw\",\"code\":\"record_switch\",\"description\":\"设备设置页面-存储卡设置\\nSD卡录像开关,true为打开,false为关闭\\n功能关闭时,不录像到SD卡\",\"extensions\":{\"iconName\":\"icon-setting\"},\"name\":\"SD卡录像开关\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},
{\"abilityId\":151,\"accessMode\":\"rw\",\"code\":\"record_mode\",\"description\":\"设备设置页面-存储卡设置\\nSD卡录像模式选择,1为事件录像(检测到移动再录像到SD卡),2为连续录像\",\"extensions\":{\"iconName\":\"icon-setting\"},\"name\":\"录像模式\",\"typeSpec\":{\"range\":[\"1\",\"2\"],\"type\":\"enum\",\"typeDefaultValue\":\"1\"}},
{\"abilityId\":162,\"accessMode\":\"rw\",\"code\":\"device_restart\",\"description\":\"无参数,页面操作为按钮类型,用户点击远程重启,直接发送ture的命令。\",\"extensions\":{\"iconName\":\"icon-setting\"},\"name\":\"远程重启\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},
{\"abilityId\":232,\"accessMode\":\"ro\",\"code\":\"food_weight\",\"description\":\"每份食物的重量,单位g\",\"name\":\"每份食物克重\",\"typeSpec\":{\"max\":100,\"min\":1,\"scale\":1,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":1,\"unit\":\"g\"}},
{\"abilityId\":233,\"accessMode\":\"rw\",\"code\":\"control\",\"description\":\"控制类命令,执行结束后返回历史数据\",\"name\":\"控制命令\",\"typeSpec\":{\"max\":2147483646,\"min\":0,\"scale\":0,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":0,\"unit\":\"\"}},
{\"abilityId\":234,\"accessMode\":\"ro\",\"code\":\"realtime_data\",\"description\":\"设备实时状态数据,按时上报到服务器。包括设备出错类型,出粮份数等\",\"name\":\"设备状态\",\"typeSpec\":{\"max\":2147483647,\"min\":0,\"scale\":0,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":0,\"unit\":\"\"}},
{\"abilityId\":235,\"accessMode\":\"rw\",\"code\":\"weight\",\"description\":\"百位数为是否使能远程控制出粮,个位十位数为自动出粮分数\",\"name\":\"自动出粮份数\",\"typeSpec\":{\"max\":255,\"min\":1,\"scale\":0,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":1,\"unit\":\"\"}},
{\"abilityId\":236,\"accessMode\":\"ro\",\"code\":\"history_data\",\"description\":\"设备执行完成后上报历史数据,上报历史数据时,value由4个字节拼接而成,最高位字节表示错误码(1:无粮 2:食物不足 3:粮食堵塞);次高位字节百位表示出粮类型(2:Alex 1:手动 0:自动);第三字节表示实际出粮份数;最后一字节表示上报ID,每次上报后加1。 result = ((uint32)devState.errType<<24|(uint32)foodCount<<16|(uint32)rebackCount<<8|(uint32)sendID);\",\"name\":\"上报历史数据\",\"typeSpec\":{\"max\":2147483645,\"min\":0,\"scale\":1,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":0,\"unit\":\"\"}},
{\"abilityId\":237,\"accessMode\":\"rw\",\"code\":\"schedule\",\"description\":\"1~7Bytes 表示周1~周日是否有效,后面每3个Byes作为一个规则循环 3Bytes中第一个字节表示出粮份数,后面两个表示距离0点的分钟数 数组以二进制流发给ipc,ipc进行base64编码后发给服务器\",\"name\":\"定时\",\"typeSpec\":{\"maxlen\":255,\"type\":\"string\",\"typeDefaultValue\":\"\"}},
{\"abilityId\":238,\"accessMode\":\"ro\",\"code\":\"battery_status\",\"description\":\"电池电量状态\\nhigh 有电池且电量充足\\nlow 有电池但电量不足\\nno 无电池\",\"name\":\"电池电量\",\"typeSpec\":{\"range\":[\"high\",\"low\",\"no\"],\"type\":\"enum\",\"typeDefaultValue\":\"high\"}},
{\"abilityId\":239,\"accessMode\":\"ro\",\"code\":\"food_storage_status\",\"description\":\"料筒状态\\nfull 料筒粮食充足\\nless 料筒粮食较少\\nlack 料筒完全无粮食\",\"name\":\"粮筒状态\",\"typeSpec\":{\"range\":[\"full\",\"less\",\"lack\"],\"type\":\"enum\",\"typeDefaultValue\":\"full\"}},
{\"abilityId\":240,\"accessMode\":\"ro\",\"code\":\"feed_block_status\",\"description\":\"喂食器是否堵粮\",\"name\":\"堵粮状态\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},
{\"abilityId\":241,\"accessMode\":\"ro\",\"code\":\"feed_stuck_status\",\"description\":\"喂食器是否卡粮\",\"name\":\"卡粮状态\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},
{\"abilityId\":242,\"accessMode\":\"rw\",\"code\":\"feed_voice_record\",\"description\":\"目前只需设置数值0(正常状态)、1(开始录音) 2 录音异常触发Toast弹框,APP下发“1”表示设备进入录音模式,下发“0”标示停止录音,设备上报“1”设备正在录音,上报“0”标示录音停止,上报“-1”表示录音异常\",\"name\":\"喂食录音\",\"typeSpec\":{\"range\":[\"0\",\"1\",\"2\"],\"type\":\"enum\",\"typeDefaultValue\":\"0\"}},
{\"abilityId\":243,\"accessMode\":\"ro\",\"code\":\"manual_feed_report\",\"description\":\"手动喂食上报-告警用\",\"name\":\"手动喂食上报-告警用\",\"typeSpec\":{\"max\":200,\"min\":0,\"scale\":1,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":0,\"unit\":\"\"}},
{\"abilityId\":244,\"accessMode\":\"ro\",\"code\":\"auto_feed_report\",\"description\":\"自动喂食上报-告警用\",\"name\":\"自动喂食上报-告警用\",\"typeSpec\":{\"max\":200,\"min\":0,\"scale\":1,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":0,\"unit\":\"\"}},
{\"abilityId\":245,\"accessMode\":\"wr\",\"code\":\"feed_publish\",\"description\":\"返回错误码:\\n0: 投食失败\\n其他正数:喂食的份数\",\"name\":\"喂食下发\",\"typeSpec\":{\"max\":99,\"min\":-2000,\"scale\":0,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":-2000,\"unit\":\"份\"}},
{\"abilityId\":246,\"accessMode\":\"ro\",\"code\":\"feed_report\",\"description\":\"返回错误码:\\n0: 投食失败\\n其他正数:喂食的份数\",\"name\":\"喂食上报\",\"typeSpec\":{\"max\":99,\"min\":-2000,\"scale\":0,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":-2000,\"unit\":\"份\"}},
{\"abilityId\":247,\"accessMode\":\"rw\",\"code\":\"backup_logs\",\"description\":\"\",\"name\":\"备用透传\",\"typeSpec\":{\"maxlen\":128,\"type\":\"raw\"}}]}]}"
},
"success": true,
"t": 1688507257495,
"tid": "644493261ab411ee871736843e81b476"
}
Here are the logs from Home Assistant:
2023-07-04 23:16:48.650 INFO (MainThread) [custom_components.localtuya.config_flow] Cloud API connection succeeded.
2023-07-04 23:16:48.672 INFO (MainThread) [custom_components.localtuya.common] [bfd...pes] Closed connection with device Smart Pet Feeder.
2023-07-04 23:16:48.674 WARNING (MainThread) [custom_components.localtuya.common] [bfd...pes] Disconnected - waiting for discovery broadcast
2023-07-04 23:16:48.853 INFO (MainThread) [custom_components.localtuya] Cloud API connection succeeded.
2023-07-04 23:38:03.706 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bfd...pes] Sending command 10 (device type: type_0a)
2023-07-04 23:38:03.707 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bfd...pes] Sending payload: b'{"gwId":"bfdcf66fef19df3ad66pes","devId":"bfdcf66fef19df3ad66pes","uid":"bfdcf66fef19df3ad66pes","t":"1688510283"}'
2023-07-04 23:38:03.712 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bfd...pes] Command 10 waiting for seq. number 1
2023-07-04 23:38:03.723 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bfd...pes] Dispatching message CMD 10 TuyaMessage(seqno=1, cmd=10, retcode=1, payload=b'%q\x97@\xd6\xf3\xae\x179r;\x01RK7\xb4;\xa3\x05C\xe6\xfaw\xf2\xcb\xe6G\xc1\x81e\x13\x7f', crc=4256501360, crc_good=True)
2023-07-04 23:38:03.724 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bfd...pes] 'data unvalid' error detected: switching to dev_type 'type_0d'
2023-07-04 23:38:03.725 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bfd...pes] Re-send 10 due to device type change (type_0a -> type_0d)
2023-07-04 23:38:03.725 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bfd...pes] Sending command 10 (device type: type_0d)
2023-07-04 23:38:03.725 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bfd...pes] Sending payload: b'{"devId":"bfdcf66fef19df3ad66pes","uid":"bfdcf66fef19df3ad66pes","t":"1688510283","dps":{"1":null,"2":null,"3":null,"4":null,"5":null,"6":null,"7":null,"8":null,"9":null,"10":null}}'
2023-07-04 23:38:03.728 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bfd...pes] Command 13 waiting for seq. number 2
2023-07-04 23:38:03.744 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bfd...pes] Dispatching message CMD 13 TuyaMessage(seqno=2, cmd=13, retcode=0, payload=b'', crc=2380353348, crc_good=True)
2023-07-04 23:38:03.744 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bfd...pes] ACK received for command 13: ignoring it
2023-07-04 23:38:03.745 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bfd...pes] Sending command 10 (device type: type_0d)
2023-07-04 23:38:03.745 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bfd...pes] Sending payload: b'{"devId":"bfdcf66fef19df3ad66pes","uid":"bfdcf66fef19df3ad66pes","t":"1688510283","dps":{"1":null,"11":null,"12":null,"13":null,"14":null,"15":null,"16":null,"17":null,"18":null,"19":null,"20":null}}'
2023-07-04 23:38:03.747 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bfd...pes] Command 13 waiting for seq. number 3
2023-07-04 23:38:03.755 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bfd...pes] Dispatching message CMD 13 TuyaMessage(seqno=3, cmd=13, retcode=0, payload=b'', crc=1350014657, crc_good=True)
2023-07-04 23:38:03.756 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bfd...pes] ACK received for command 13: ignoring it
2023-07-04 23:38:03.756 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bfd...pes] Sending command 10 (device type: type_0d)
2023-07-04 23:38:03.756 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bfd...pes] Sending payload: b'{"devId":"bfdcf66fef19df3ad66pes","uid":"bfdcf66fef19df3ad66pes","t":"1688510283","dps":{"1":null,"21":null,"22":null,"23":null,"24":null,"25":null,"26":null,"27":null,"28":null,"29":null,"30":null}}'
2023-07-04 23:38:03.760 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bfd...pes] Command 13 waiting for seq. number 4
2023-07-04 23:38:03.774 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bfd...pes] Dispatching message CMD 13 TuyaMessage(seqno=4, cmd=13, retcode=0, payload=b'', crc=755273881, crc_good=True)
2023-07-04 23:38:03.775 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bfd...pes] ACK received for command 13: ignoring it
2023-07-04 23:38:03.775 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bfd...pes] Sending command 10 (device type: type_0d)
2023-07-04 23:38:03.775 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bfd...pes] Sending payload: b'{"devId":"bfdcf66fef19df3ad66pes","uid":"bfdcf66fef19df3ad66pes","t":"1688510283","dps":{"1":null,"100":null,"101":null,"102":null,"103":null,"104":null,"105":null,"106":null,"107":null,"108":null,"109":null,"110":null}}'
2023-07-04 23:38:03.777 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bfd...pes] Command 13 waiting for seq. number 5
2023-07-04 23:38:03.787 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bfd...pes] Dispatching message CMD 13 TuyaMessage(seqno=5, cmd=13, retcode=0, payload=b'', crc=4036118812, crc_good=True)
2023-07-04 23:38:03.787 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bfd...pes] ACK received for command 13: ignoring it
2023-07-04 23:38:03.787 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bfd...pes] Detected dps: {}
2023-07-04 23:38:03.788 DEBUG (MainThread) [custom_components.localtuya.config_flow] Detected DPS: {}
2023-07-04 23:38:03.788 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bfd...pes] Closing connection
2023-07-04 23:38:03.792 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bfd...pes] Connection lost: None
2023-07-04 23:39:32.146 DEBUG (MainThread) [custom_components.localtuya.config_flow] Detected DPS: {}
2023-07-04 23:40:36.536 DEBUG (MainThread) [custom_components.localtuya.config_flow] Detected DPS: {}
2023-07-04 23:40:44.501 INFO (MainThread) [custom_components.localtuya] Cloud API connection succeeded.
2023-07-04 23:41:24.292 DEBUG (MainThread) [custom_components.localtuya.config_flow] Detected DPS: {}
Those logs are from a different integration, so I am not sure if Detected dps: {} is going to be an issue with this one also, or it is just the different way that integration works. It would be better to have the logs from tuya-local.
Apologies, for suppling the incorrect logs.
I've tried connecting with tuya-local (rather than localtuya) and I just can't get the feeder to connect to the integration. I've tried removing the device from the tuya smart app and reconnecting it to get a new device id and local key. I've also tried force quitting the tuya smart app on my phone and completely removing the app - but no joy, I keep getting this error:
Unable to connect to your device with those details. It could be an intermittent issue, or they may be incorrect.
So it seems like maybe the empty detected dps is a problem with this device. It will have to wait until device discovery based on the broadcast product id is implemented before this device can be detected (this discovery method will conflict with the localtuya integration, so only will be available when localtuya is not installed, after it is implemented).