You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi. i am working with esp_zigbee_all_device_types_app code. it works, but not fully with Tuya keys. i have 2 Tuya keys, each with 2 gang. i start the device like this:
factoryreset
# 1. Set device role: Zigbee Coordinator
role zc
# 2. Use centralized Trust Center security (standard Home Automation behavior)
network type c
# 3. Allow up to 50 children (routers/end devices)
network childmax 50
# 4. Security: set a 128-bit network key (example value; keep consistent across boots)
network key 0xA123456789ABCDEF0123456789ABCDEF
# 5. Set PAN IDs (16-bit PAN and 64-bit extended PAN)
panid 0xEBCD
panid -x 0x0A23456789ABCDEF
# 6. Choose an operating channel
# for bdb Set primary channel 19, secondary channel 20
bdb_comm channel 19 20
# Choose an operating channel (example: 19) and allow commissioning across all HA channels
/*
Parameters:
channel_mask – [in] Valid channel mask is from 0x00000800 (only channel 11) to 0x07FFF800 (all channels from 11 to 26)
Returns:
- ESP_OK on success
channel 19
*/
channel -m 0x07fff800
# 7. Create a local HA endpoint with On/Off capability to receive binds and send control
zha add 2 on_off_switch
# 8. Register the data model (apply endpoints/clusters)
dm register
# 9. Form the network (coordinator will pick channel 19 as set above)
bdb_comm start form
# 10. Permit joining for 180 seconds (extend as needed)
network open -t 250
network close
aps dump open
and this is the log, and i do on/off a gang on each key:
role zc
esp> network type c
esp> network childmax 50
esp> network key 0xA123456789ABCDEF0123456789ABCDEF
esp> panid 0xEBCD
esp> panid -x 0x0A23456789ABCDEF
esp> bdb_comm channel 19 20
esp> channel -m 0x07fff800
esp> zha add 2 on_off_switch
�[0;32mI (62496) cli_cmd_zha: on_off_switch created with endpoint_id 2�[0m
esp> dm register
esp> bdb_comm start form
�[0;32mI (77071) Hanta_ZB_CONSOLE: ZDO signal: ZDO Config Ready (0x17), status: ESP_FAIL�[0m
�[0;32mI (77071) Hanta_ZB_CONSOLE: Initialize Zigbee stack�[0m
esp> �[0;33mW (81566) Hanta_ZB_CONSOLE: Network(0xebcd) closed, devices joining not allowed.�[0m
�[0;32mI (81566) Hanta_ZB_CONSOLE: Formed network successfully (Extended PAN ID: 0a:23:45:67:89:ab:cd:ef, PAN ID: 0xebcd, Channel:12, Short Address: 0x0000)�[0m
network open -t 250
esp> �[0;32mI (97636) Hanta_ZB_CONSOLE: Network(0xebcd) is open for 250 seconds�[0m
�[0;32mI (101041) Hanta_ZB_CONSOLE: ZDO signal: NWK Device Associated (0x12), status: ESP_OK�[0m
�[0;32mI (101041) Hanta_ZB_CONSOLE: ZDO signal: ZDO Device Update (0x30), status: ESP_OK�[0m
�[0;32mI (101076) Hanta_ZB_CONSOLE: ZDO signal: NLME Status Indication (0x32), status: ESP_OK�[0m
�[0;32mI (108221) Hanta_ZB_CONSOLE: ZDO signal: NWK Device Associated (0x12), status: ESP_OK�[0m
�[0;32mI (108226) Hanta_ZB_CONSOLE: ZDO signal: ZDO Device Update (0x30), status: ESP_OK�[0m
�[0;32mI (108261) Hanta_ZB_CONSOLE: New device commissioned or rejoined (short: 0xd3f7)�[0m
�[0;32mI (108606) Hanta_ZB_CONSOLE: ZDO signal: NWK Device Associated (0x12), status: ESP_OK�[0m
�[0;32mI (108606) Hanta_ZB_CONSOLE: ZDO signal: ZDO Device Update (0x30), status: ESP_OK�[0m
�[0;32mI (108636) Hanta_ZB_CONSOLE: New device commissioned or rejoined (short: 0xd1a5)�[0m
�[0;32mI (109511) Hanta_ZB_CONSOLE: ZDO signal: ZDO Device Authorized (0x2f), status: ESP_OK�[0m
�[0;32mI (109536) Hanta_ZB_CONSOLE: Network(0xebcd) is open for 180 seconds�[0m
�[0;32mI (109886) Hanta_ZB_CONSOLE: ZDO signal: ZDO Device Authorized (0x2f), status: ESP_OK�[0m
�[0;32mI (109911) Hanta_ZB_CONSOLE: Network(0xebcd) is open for 180 seconds�[0m
network close
esp> �[0;33mW (124886) Hanta_ZB_CONSOLE: Network(0xebcd) closed, devices joining not allowed.�[0m
aps dump open
esp> Received aps data frame successful, src ep 1 src addr 0xd1a5 -> dst ep 1 dst addr 0x0000
�[0;32mI (148021) : 0x4081df1c 08 4c 0a 00 00 10 01 |.L.....|�[0m
Received aps data frame successful, src ep 1 src addr 0xd1a5 -> dst ep 1 dst addr 0x0000
�[0;32mI (148221) : 0x4081df1c 08 4c 0a 00 00 10 01 |.L.....|�[0m
Received aps data frame successful, src ep 1 src addr 0xd1a5 -> dst ep 1 dst addr 0x0000
�[0;32mI (148421) : 0x4081df1c 08 4c 0a 00 00 10 01 |.L.....|�[0m
Received aps data frame successful, src ep 1 src addr 0xd1a5 -> dst ep 1 dst addr 0x0000
�[0;32mI (148621) : 0x4081df1c 08 4c 0a 00 00 10 01 |.L.....|�[0m
Received aps data frame successful, src ep 1 src addr 0xd1a5 -> dst ep 1 dst addr 0x0000
�[0;32mI (148821) : 0x4081df1c 08 4c 0a 00 00 10 01 |.L.....|�[0m
Received aps data frame successful, src ep 1 src addr 0xd1a5 -> dst ep 1 dst addr 0x0000
�[0;32mI (149371) : 0x4081df1c 08 4d 0a 00 00 10 00 |.M.....|�[0m
Received aps data frame successful, src ep 1 src addr 0xd1a5 -> dst ep 1 dst addr 0x0000
�[0;32mI (149576) : 0x4081df1c 08 4d 0a 00 00 10 00 |.M.....|�[0m
Received aps data frame successful, src ep 1 src addr 0xd1a5 -> dst ep 1 dst addr 0x0000
�[0;32mI (149776) : 0x4081df1c 08 4d 0a 00 00 10 00 |.M.....|�[0m
Received aps data frame successful, src ep 1 src addr 0xd1a5 -> dst ep 1 dst addr 0x0000
�[0;32mI (149976) : 0x4081df1c 08 4d 0a 00 00 10 00 |.M.....|�[0m
Received aps data frame successful, src ep 1 src addr 0xd1a5 -> dst ep 1 dst addr 0x0000
�[0;32mI (150176) : 0x4081df1c 08 4d 0a 00 00 10 00 |.M.....|�[0m
Received aps data frame successful, src ep 2 src addr 0xd3f7 -> dst ep 1 dst addr 0x0000
�[0;32mI (150291) : 0x4081df1c 08 64 0a 00 00 10 01 |.d.....|�[0m
Received aps data frame successful, src ep 2 src addr 0xd3f7 -> dst ep 1 dst addr 0x0000
�[0;32mI (150491) : 0x4081df1c 08 64 0a 00 00 10 01 |.d.....|�[0m
Received aps data frame successful, src ep 2 src addr 0xd3f7 -> dst ep 1 dst addr 0x0000
�[0;32mI (150691) : 0x4081df1c 08 64 0a 00 00 10 01 |.d.....|�[0m
Received aps data frame successful, src ep 2 src addr 0xd3f7 -> dst ep 1 dst addr 0x0000
�[0;32mI (150891) : 0x4081df1c 08 64 0a 00 00 10 01 |.d.....|�[0m
Received aps data frame successful, src ep 2 src addr 0xd3f7 -> dst ep 1 dst addr 0x0000
�[0;32mI (151091) : 0x4081df1c 08 64 0a 00 00 10 01 |.d.....|�[0m
Received aps data frame successful, src ep 2 src addr 0xd3f7 -> dst ep 1 dst addr 0x0000
�[0;32mI (152421) : 0x4081df1c 08 65 0a 00 00 10 00 |.e.....|�[0m
Received aps data frame successful, src ep 2 src addr 0xd3f7 -> dst ep 1 dst addr 0x0000
�[0;32mI (152621) : 0x4081df1c 08 65 0a 00 00 10 00 |.e.....|�[0m
Received aps data frame successful, src ep 2 src addr 0xd3f7 -> dst ep 1 dst addr 0x0000
�[0;32mI (152821) : 0x4081df1c 08 65 0a 00 00 10 00 |.e.....|�[0m
Received aps data frame successful, src ep 2 src addr 0xd3f7 -> dst ep 1 dst addr 0x0000
�[0;32mI (153026) : 0x4081df1c 08 65 0a 00 00 10 00 |.e.....|�[0m
it recognizes the keys, but it doesn't work with each gang, instead, it on/off both gangs together. if i send zcl send_raw -d 0xd3f7 --dst-ep 1 -e 2 -c 0x0006 --cmd 0x01 command, both gangs turn on and so on. the log:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
hi. i am working with
esp_zigbee_all_device_types_appcode. it works, but not fully with Tuya keys. i have 2 Tuya keys, each with 2 gang. i start the device like this:and this is the log, and i do on/off a gang on each key:
it recognizes the keys, but it doesn't work with each gang, instead, it on/off both gangs together. if i send
zcl send_raw -d 0xd3f7 --dst-ep 1 -e 2 -c 0x0006 --cmd 0x01command, both gangs turn on and so on. the log:the
--cmd 0x00turn both off. i dont understand it! how can i control each gang in Tuya?i am using esp32-c6.
thanks.
Beta Was this translation helpful? Give feedback.
All reactions