Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request support for BNETA Pet Feeder #1083

Open
0xa51f opened this issue Sep 10, 2023 · 2 comments
Open

Request support for BNETA Pet Feeder #1083

0xa51f opened this issue Sep 10, 2023 · 2 comments
Labels
new device Unsupported device

Comments

@0xa51f
Copy link

0xa51f commented Sep 10, 2023

Log Message

No DPS in Logs.
Device only connectes when using Protocol 3.2 and is detected as ceres_plus_petfeeder
IF I cancel at this point there is only the below log, I can proceed to add it as ceres_plus_petfeeder, but there are a number of differring DPs and it also looks different, and is without an SD-Card slot

2023-09-10 10:53:55.623 WARNING (MainThread) [custom_components.tuya_local.device] Pet feeder receive loop has terminated

Information about DPS mappings

{
  "result": {
    "model": "{\"modelId\":\"000001cacc\",\"services\":[{\"actions\":[],\"code\":\"\",\"description\":\"\",\"events\":[],\"name\":\"默认服务\",\"properties\":[
{\"abilityId\":101,\"accessMode\":\"rw\",\"code\":\"basic_indicator\",\"description\":\"设备指示灯是否打开,true打开,false关闭\",\"name\":\"指示灯\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},
{\"abilityId\":103,\"accessMode\":\"rw\",\"code\":\"basic_flip\",\"description\":\"true反转,false正常\",\"name\":\"录制画面翻转\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},
{\"abilityId\":104,\"accessMode\":\"rw\",\"code\":\"basic_osd\",\"description\":\"true打开水印,false关闭水印\",\"name\":\"视频osd功能\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},
{\"abilityId\":106,\"accessMode\":\"rw\",\"code\":\"motion_sensitivity\",\"description\":\"0-2,灵敏度依次增加;仅为灵敏度,0并不是关闭移动侦测报警;规定0为低灵敏度,1为中灵敏度,2为高灵敏度。\",\"name\":\"移动侦测报警灵敏度\",\"typeSpec\":{\"range\":[\"0\",\"1\",\"2\"],\"type\":\"enum\",\"typeDefaultValue\":\"0\"}},
{\"abilityId\":108,\"accessMode\":\"rw\",\"code\":\"basic_nightvision\",\"description\":\"0:自动\\n1:关\\n2:开\",\"name\":\"红外夜视\",\"typeSpec\":{\"range\":[\"0\",\"1\",\"2\"],\"type\":\"enum\",\"typeDefaultValue\":\"0\"}},
{\"abilityId\":113,\"accessMode\":\"rw\",\"code\":\"motion_record\",\"description\":\"true打开,false关闭\\n摄像头本地功能:功能打开的时候,只有检测到移动才开始录像。\",\"name\":\"移动侦测录像\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},
{\"abilityId\":115,\"accessMode\":\"ro\",\"code\":\"movement_detect_pic\",\"description\":\"该功能实现请参考SDK\\n---------------\\n{\\\"dp_id\\\",\\\"bucket;object;key\\\"}/{\\\"dp_id\\\",\\\"bucket;object;\\\"}\\n\\nbucket:根文件夹;objcet:文件路径;key:加密\",\"name\":\"检测到移动\",\"typeSpec\":{\"maxlen\":128,\"type\":\"raw\"}},
{\"abilityId\":134,\"accessMode\":\"rw\",\"code\":\"motion_switch\",\"description\":\"\",\"name\":\"移动侦测\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},
{\"abilityId\":201,\"accessMode\":\"rw\",\"code\":\"feed_num\",\"description\":\"返回错误码:\\n0 :投食失败\\n\\n//正数为投食的数量,若下发的投食3分,都投成功了,则返回3,APP则显示投食成功。\\n\",\"extensions\":{\"trigger\":\"direct\"},\"name\":\"喂食机-投食\",\"typeSpec\":{\"max\":20,\"min\":-2000,\"scale\":0,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":-2000,\"unit\":\"份\"}},
{\"abilityId\":202,\"accessMode\":\"ro\",\"code\":\"food_weight\",\"description\":\"每份食物的重量,单位g \",\"name\":\"每份食物克重\",\"typeSpec\":{\"max\":100,\"min\":1,\"scale\":1,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":1,\"unit\":\"g\"}},
{\"abilityId\":203,\"accessMode\":\"rw\",\"code\":\"control\",\"description\":\"控制类命令,执行结束后返回历史数据\",\"name\":\"控制命令\",\"typeSpec\":{\"max\":2147483646,\"min\":0,\"scale\":0,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":0,\"unit\":\"\"}},
{\"abilityId\":204,\"accessMode\":\"ro\",\"code\":\"realtime_data\",\"description\":\"设备实时状态数据,按时上报到服务器。包括设备出错类型,出粮份数等\",\"name\":\"设备状态\",\"typeSpec\":{\"max\":2147483647,\"min\":0,\"scale\":0,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":0,\"unit\":\"\"}},
{\"abilityId\":205,\"accessMode\":\"rw\",\"code\":\"weight\",\"description\":\"百位数为是否使能远程控制出粮,个位十位数为自动出粮分数\",\"name\":\"自动出粮份数\",\"typeSpec\":{\"max\":255,\"min\":1,\"scale\":0,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":1,\"unit\":\"\"}},
{\"abilityId\":206,\"accessMode\":\"ro\",\"code\":\"history_data\",\"description\":\"设备执行完成后上报历史数据,上报历史数据时,value由4个字节拼接而成,最高位字节表示错误码(1:无粮  2:食物不足   3:粮食堵塞);次高位字节百位表示出粮类型(2:Alex  1:手动   0:自动);第三字节表示实际出粮份数;最后一字节表示上报ID,每次上报后加1。\\nresult = ((uint32)devState.errType<<24|(uint32)foodCount<<16|(uint32)rebackCount<<8|(uint32)sendID);\\n\",\"name\":\"上报历史数据\",\"typeSpec\":{\"max\":2147483645,\"min\":0,\"scale\":1,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":0,\"unit\":\"\"}},
{\"abilityId\":207,\"accessMode\":\"rw\",\"code\":\"schedule\",\"description\":\"面板将一个单任务用15个字节表示,然后转为string类型下发给设备端。前9位为有效位,后6位000000。\\n注意:设备端收到指令后先转换格式,byte2~byte8转为十进制整型数,byte0~byte1按照十六进制处理。\\n1. bit0 ~ bit6 代表周日到周六,某bit为1表示当天有效。\\n2. 全为0表示仅限一次。\\n\",\"name\":\"定时\",\"typeSpec\":{\"maxlen\":255,\"type\":\"string\",\"typeDefaultValue\":\"\"}},
{\"abilityId\":208,\"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\"}}]}]}"
  },
  "success": true,
  "t": 1694336541640,
  "tid": "c059a9254fb811ee9a70760d0d3c40d3"
}

{"101":"Indicator","103":"录制画面翻转","104":"视频osd功能","106":"移动侦测报警灵敏度","113":"Motion detection video","115":"otion Detection","134":"Motion","201":"喂食机-投食","202":"每份食物克重","203":"控制命令","204":"设备状态","205":"自动出粮份数","206":"上报历史数据","207":"schedule","208":"喂食录音"}

Code Type Values
basic_indicator Boolean "{true,false}"
basic_flip Boolean "{true,false}"
basic_osd Boolean "{true,false}"
motion_sensitivity Enum { "range": [ "0", "1", "2" ]}
basic_nightvision Enum { "range": [ "0", "1", "2" ]}
motion_record Boolean "{true,false}"
motion_switch Boolean "{true,false}"

DPID 201 is the Trigger to dispense a portion - I had this working in localtuya using the following service call:

service: localtuya.set_dp
data:
device_id: "deviceid"
dp: 201
value: "{{states('input_number.petfeeder_portions')}}"

Product ID

{
"result": [
{
"active_time": 1694333684,
"category": "sp",
"create_time": 1694333684,
"custom_name": "",
"icon": "smart/icon/ay1539074879262GYXmu/8f221d8164944466887c7febfa87595b.jpg",
"id": "",
"ip": "",
"is_online": true,
"lat": "",
"local_key": "",
"lon": "",
"model": "中性",
"name": "PetFeeder",
"product_id": "aehfntztbgk0nf8e",
"product_name": "F1-C智能宠物喂食器(本地定时)",
"sub": false,
"time_zone": "+02:00",
"update_time": 1694333693,
"uuid": ""
}
],
"success": true,
"t": 1694336699125,
"tid": "1e4833e14fb911ee9bab56e0bfe43765"
}

Information about how the device functions

https://www.bneta.co.za/product/bneta-iot-smart-pet-feeder/

As mentioned, this is a distinct product from #507 which is the closest match

@0xa51f 0xa51f added the new device Unsupported device label Sep 10, 2023
@make-all
Copy link
Owner

If the log is not outputting the DPS when it is added, then it is being detected as 100% compatible. This may be because the Ceres device does not broadcast most of its dps, so they are mostly set as optional. Maybe that message needs to be output even when there is a 100% match, as there seems to be a recent trend for Tuya devices to send out minimal info on initial connection.

Instead of a log message, if you connect again as the Ceres pet feeder, then download the diagnostics from Settings / Devices and Settings / (this device), then the same information will be shown.

Otherwise there may be dps in that list above that need to be optional, or which don't match the documentation in some way, and without a log it takes much longer to find these problems and get them fixed.

@0xa51f
Copy link
Author

0xa51f commented Sep 10, 2023

tuya_local-35783524a57e14e3d7018fb9991e2bd3-Pet feeder-48943647d0e9437c0962fa15b0ee1f20.json.txt

It just shows DP 101 which it also looks like is the only one exposed by the Ceres

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new device Unsupported device
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants