hi,涂鸦工程师:
你好!
咨询zigbee网关Pan ID冲突问题描述如下:
1) 开发包全名ty_integrated_sdk_arm-linux-androideabi-4.9-ndk-r18b_release-1.1.2
2)问题现象:中控初始化后,请求同步数据没有回调
调用tuya_home_init()后,注册的回调函数tuya_home_control_all_info_sync_event没有回调,看日志有设备和房间等信息下发
,日志见附件。
【已解决】中控初始化后,请求同步数据没有回调
【已解决】中控初始化后,请求同步数据没有回调
- Attachments
-
- tuya.txt
- (288.38 KiB) Downloaded 162 times
-
- Posts: 41
Re: 中控初始化后,请求同步数据没有回调
[10-10 15:26:41:206 TUYA E][tuya_home_control_demo.c:37] tuya_home_init err:-22, db_path:/data/tuya_db_files
初始化出错
Re: 中控初始化后,请求同步数据没有回调
从以下日志看,一共获取到6个设备,有4个为should not show on screen,其中有3个网关类型的设备为should not show on screen,但是为什么智能锁也是should not show on screen。
6个设备除去4个不显示的,剩下两个,通过tuya_get_dev_brief_info_list接口获取设备列表,拿到的个数是4个,各有一个重复的,即两个空调,两个开关,但是设备id是一样的。
[10-10 16:20:05:853 TUYA D][tuya_ctrl_center.c:1890] pid: yl3zuyaw standard.config already exist
[10-10 16:20:05:855 TUYA D][tuya_ctrl_center.c:1890] pid: bljvjx2nsv02dhao standard.config already exist
[10-10 16:20:05:856 TUYA D][tuya_ctrl_center.c:1890] pid: wkmsnr09 standard.config already exist
[10-10 16:20:05:857 TUYA D][tuya_ctrl_center.c:1890] pid: rpk52nw5 standard.config already exist
[10-10 16:20:05:857 TUYA D][tuya_ctrl_center.c:1890] pid: ddy7a81zb1a9otk1 standard.config already exist
[10-10 16:20:05:858 TUYA E][rcd_file.c:1598] [ty_rcd] not FOUND entry.num_tmp:7,udb->rcd_valid_cnt:6
[10-10 16:20:05:858 TUYA E][rcd_file.c:2887] [ty_rcd] not FOUND record.
[10-10 16:20:05:858 TUYA E][tuya_ctrl_storage.c:109] call tuya_rcd_entry_read_next(first, TY_PROD_STD_FILE_NAME, &p_data, &data_len) return -10100
[10-10 16:20:05:858 TUYA D][tuya_ctrl_center.c:2055] pid: yl3zuyaw switch_dp: 1
[10-10 16:20:05:858 TUYA D][tuya_ctrl_center.c:2055] pid: rpk52nw5 switch_dp: 1
[10-10 16:20:05:858 TUYA E][rcd_file.c:1598] [ty_rcd] not FOUND entry.num_tmp:7,udb->rcd_valid_cnt:6
[10-10 16:20:05:858 TUYA E][rcd_file.c:2937] [ty_rcd] not FOUND record.
[10-10 16:20:05:858 TUYA E][tuya_ctrl_storage.c:341] call tuya_rcd_entry_read_next_with_key(first, TY_CTRL_PRODUCT_FILE_NAME, &p_key, &p_data, &data_len) return -10100
[10-10 16:20:05:861 TUYA D][tuya_ctrl_center.c:277] add devId: 6c030ed2e378abaf2feetp name: 睿云联linux中控含zigbee pid: 75d63syoaxgr40bz comm: 6c030ed2e378abaf2feetp pv: 2.2 sub: 0 node: icon_path: /data/tuya_db_files//ctrl_dev_img/DB0273E0D31C2BAED573AECED9537B11.png dev_num: 6
[10-10 16:20:05:861 TUYA D][tuya_ctrl_center.c:2207] cur pid : 75d63syoaxgr40bz associate 2 sub dev
[10-10 16:20:05:863 TUYA D][mqc_app.c:1480] custom async cb op_ret: 0
[10-10 16:20:05:863 TUYA D][mqc_app.c:1533] pub finish:0
[10-10 16:20:05:865 TUYA D][tuya_ctrl_center.c:277] add devId: 6c2881eab048c2d089pttd name: 空调 pid: rpk52nw5 comm: 6c3e31b2dd59f3c946mcid pv: 2.2 sub: 1 node: 70ac08fffe63189a-v-0100 icon_path: /data/tuya_db_files//ctrl_dev_img/1EEE040D8572D38D8CD64C32DA86A00A.png dev_num: 7
[10-10 16:20:05:865 TUYA D][tuya_ctrl_center.c:2207] cur pid : rpk52nw5 associate 2 sub dev
[10-10 16:20:05:867 TUYA D][tuya_ctrl_center.c:277] add devId: 6c5979f726aa07567fse5n name: 中央空调网关(Zigbee版) pid: wkmsnr09 comm: 6c3e31b2dd59f3c946mcid pv: 2.2 sub: 1 node: 70ac08fffe63189a icon_path: /data/tuya_db_files//ctrl_dev_img/45294AA5E7AA5E4FF226D54FC6BABDF0.png dev_num: 8
[10-10 16:20:05:868 TUYA D][tuya_ctrl_center.c:2207] cur pid : wkmsnr09 associate 2 sub dev
[10-10 16:20:05:870 TUYA D][tuya_ctrl_center.c:277] add devId: 6c3e31b2dd59f3c946mcid name: Zigbee Wireless Gateway pid: ddy7a81zb1a9otk1 comm: 6c3e31b2dd59f3c946mcid pv: 2.2 sub: 0 node: icon_path: /data/tuya_db_files//ctrl_dev_img/B905DF7D962389E1C694B677840C5E46.png dev_num: 9
[10-10 16:20:05:870 TUYA D][tuya_ctrl_center.c:2207] cur pid : ddy7a81zb1a9otk1 associate 2 sub dev
[10-10 16:20:05:873 TUYA D][tuya_ctrl_center.c:277] add devId: 6cbaf929b979a04f41oxqk name: Zigbee零火单路开关(ZTU NEW) pid: yl3zuyaw comm: 6c3e31b2dd59f3c946mcid pv: 2.2 sub: 1 node: a4c1380637db5904 icon_path: /data/tuya_db_files//ctrl_dev_img/68CB1F7EFCDD503ADECE97294BD8C812.png dev_num: 10
[10-10 16:20:05:873 TUYA D][tuya_ctrl_center.c:2207] cur pid : yl3zuyaw associate 2 sub dev
[10-10 16:20:05:876 TUYA D][tuya_ctrl_center.c:277] add devId: 6cd5afcaa58d3b5462lwa9 name: SmartLock pid: bljvjx2nsv02dhao comm: 6cd5afcaa58d3b5462lwa9 pv: 2.2 sub: 0 node: icon_path: /data/tuya_db_files//ctrl_dev_img/EAF30C480E0022E67BC1EC6C9FB41768.png dev_num: 11
[10-10 16:20:05:876 TUYA D][tuya_ctrl_center.c:2207] cur pid : bljvjx2nsv02dhao associate 2 sub dev
[10-10 16:20:05:876 TUYA E][rcd_file.c:1598] [ty_rcd] not FOUND entry.num_tmp:7,udb->rcd_valid_cnt:6
[10-10 16:20:05:876 TUYA E][rcd_file.c:2887] [ty_rcd] not FOUND record.
[10-10 16:20:05:876 TUYA E][tuya_ctrl_storage.c:249] call tuya_rcd_entry_read_next(first, TY_CTRL_DEV_FILE_NAME, &p_data, &data_len) return -10100
[10-10 16:20:05:877 TUYA E][rcd_file.c:1598] [ty_rcd] not FOUND entry.num_tmp:13,udb->rcd_valid_cnt:12
[10-10 16:20:05:877 TUYA E][rcd_file.c:2887] [ty_rcd] not FOUND record.
[10-10 16:20:05:877 TUYA E][tuya_ctrl_storage.c:295] call tuya_rcd_entry_read_next(first, TY_CTRL_ROOM_FILE_NAME, &p_data, &data_len) return -10100
[10-10 16:20:05:877 TUYA D][tuya_ctrl_storage.c:387] get sensor rule: {
"deviceType": 1,
"categoryList": ["sos", "sj", "mcs", "rqbj", "pir", "wsdcg", "ywbj"]
}
[10-10 16:20:05:878 TUYA E][rcd_file.c:1598] [ty_rcd] not FOUND entry.num_tmp:2,udb->rcd_valid_cnt:1
[10-10 16:20:05:878 TUYA E][rcd_file.c:2887] [ty_rcd] not FOUND record.
[10-10 16:20:05:878 TUYA E][tuya_ctrl_storage.c:377] call tuya_rcd_entry_read_next(first, TY_CTRL_SENSOR_RULE_NAME, &p_data, &data_len) return -10100
[10-10 16:20:05:878 TUYA E][tuya_ctrl_local_dev.c:80] call tuya_iot_regist_dp_rept_cb(&rept_dps) return -22
[10-10 16:20:05:878 TUYA E][tuya_ctrl_center.c:175] call tuya_ctrl_local_dev_init() return -22
[10-10 16:20:05:878 TUYA E][tuya_home_control_init.c:82] tuya_ctrl_center_init err:-22
[10-10 16:20:05:878 TUYA E][tuya_home_control_demo.c:37] tuya_home_init err:-22, db_path:/data/tuya_db_files
test:tuya_home_control_test-39
test:tuya_home_control_test-44
test:tuya_home_control_test-49
[10-10 16:20:05:878 TUYA D][tuya_ctrl_center.c:2135] sync delay: 5 ms
[10-10 16:20:05:878 TUYA E][tuya_ctrl_center.c:2137] call gw_thread_pool_start_tm_msg(ctrl_mgr.thr_hdl, ctrl_mgr.tmm_sync, delay, TIMER_ONCE) return -2
[10-10 16:20:05:878 TUYA W][tuya_ctrl_center_api.c:185] dev: 6c030ed2e378abaf2feetp name : 睿云联linux中控含zigbee should not show on screen
[10-10 16:20:05:878 TUYA W][tuya_ctrl_center_api.c:185] dev: 6c5979f726aa07567fse5n name : 中央空调网关(Zigbee版) should not show on screen
[10-10 16:20:05:878 TUYA W][tuya_ctrl_center_api.c:185] dev: 6c3e31b2dd59f3c946mcid name : Zigbee Wireless Gateway should not show on screen
[10-10 16:20:05:878 TUYA W][tuya_ctrl_center_api.c:185] dev: 6cd5afcaa58d3b5462lwa9 name : SmartLock should not show on screen
[10-10 16:20:05:878 TUYA W][tuya_ctrl_center_api.c:185] dev: 6c030ed2e378abaf2feetp name : 睿云联linux中控_含zigbee should not show on screen
[10-10 16:20:05:878 TUYA W][tuya_ctrl_center_api.c:185] dev: 6c5979f726aa07567fse5n name : 中央空调网关(Zigbee版) should not show on screen
[10-10 16:20:05:878 TUYA W][tuya_ctrl_center_api.c:185] dev: 6c3e31b2dd59f3c946mcid name : Zigbee Wireless Gateway should not show on screen
[10-10 16:20:05:878 TUYA W][tuya_ctrl_center_api.c:185] dev: 6cd5afcaa58d3b5462lwa9 name : SmartLock should not show on screen
[10-10 16:20:05:879 TUYA D][tuya_ctrl_center_api.c:213] tuya_get_dev_brief_info_list success, dev cnt is 4
test:Init-329
test:Init-330 dev_count:4
test:Init-333 id:6c2881eab048c2d089pttd, name:空调, category:kt, icon_path:/data/tuya_db_files//ctrl_dev_img/1EEE040D8572D38D8CD64C32DA86A00A.png, online_stat:0, devClass:0
test:Init-333 id:6cbaf929b979a04f41oxqk, name:Zigbee零火单路开关(ZTU NEW), category:tdq, icon_path:/data/tuya_db_files//ctrl_dev_img/68CB1F7EFCDD503ADECE97294BD8C812.png, online_stat:0, devClass:0
test:Init-333 id:6c2881eab048c2d089pttd, name:空调, category:kt, icon_path:/data/tuya_db_files//ctrl_dev_img/1EEE040D8572D38D8CD64C32DA86A00A.png, online_stat:0, devClass:0
test:Init-333 id:6cbaf929b979a04f41oxqk, name:Zigbee零火单路开关(ZTU NEW), category:tdq, icon_path:/data/tuya_db_files//ctrl_dev_img/68CB1F7EFCDD503ADECE97294BD8C812.png, online_stat:0, devClass:0
[10-10 16:20:05:879 TUYA D][tuya_ctrl_center_api.c:370] tuya_get_room_info_list success, cnt is 12
test:Init-350 id:41438402, name:客厅, dev_num:6
dev: 6c030ed2e378abaf2feetp 6c5979f726aa07567fse5n 6c2881eab048c2d089pttd 6c3e31b2dd59f3c946mcid 6cbaf929b979a04f41oxqk 6cd5afcaa58d3b5462lwa9
test:Init-350 id:41438403, name:主卧, dev_num:0
dev:
test:Init-350 id:41438409, name:主卧, dev_num:0
dev:
test:Init-350 id:41438404, name:次卧, dev_num:0
dev:
test:Init-350 id:41438410, name:次卧, dev_num:0
dev:
test:Init-350 id:41438405, name:餐厅, dev_num:0
dev:
test:Init-350 id:41438411, name:餐厅, dev_num:0
dev:
test:Init-350 id:41438406, name:厨房, dev_num:0
dev:
test:Init-350 id:41438412, name:厨房, dev_num:0
dev:
test:Init-350 id:41438407, name:书房, dev_num:0
dev:
test:Init-350 id:41438413, name:书房, dev_num:0
dev:
test:Init-350 id:41772676, name:衣帽99, dev_num:0
dev:
rlottie_remove ha_loading.json
[10-10 16:20:06:558 TUYA D][subdev_upgrade_schema.c:530] start schema update subdev.
[10-10 16:20:06:558 TUYA D][subdev_upgrade_schema.c:541] schema update dev get.
-
- Posts: 41
Re: 中控初始化后,请求同步数据没有回调
调用了两次初始化。删掉后面tuya_home_control_demo.c:37调用的初始化
-
- Posts: 41
Re: 中控初始化后,请求同步数据没有回调
智能锁不支持。获取两个相同的问题,先把初始化改成1个再看
Re: 中控初始化后,请求同步数据没有回调
初始化数据库地址要填哪个数据库
Re: 中控初始化后,请求同步数据没有回调
把tuya_home_control_demo.c:37调用的初始化tuya_home_init去掉吗?好像没有其他地方有调用tuya_home_init呀,这个去掉不就把回调函数的注册也去掉了
-
- Posts: 41
Re: 中控初始化后,请求同步数据没有回调
另一次初始化在
[01-01 18:12:15 TUYA D][tuya_ctrl_center.c:184] ctrl center init success
Re: 中控初始化后,请求同步数据没有回调
我没调这个文件的初始化tuya_ctrl_center_init
Re: 中控初始化后,请求同步数据没有回调
所以我应不应该调用tuya_home_init初始化中控,看贵司的中控开发文档都是调这个初始化,是我其他地方写的不对吗