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

How to send "On With Timed Off" command? (TZ-554) #209

Closed
g-chevalier opened this issue Jan 8, 2024 · 2 comments
Closed

How to send "On With Timed Off" command? (TZ-554) #209

g-chevalier opened this issue Jan 8, 2024 · 2 comments
Labels

Comments

@g-chevalier
Copy link

Question

Hi,

I would like to send an On/off command using the "On With Timed Off" variant (0x42).
Up to now, I was able to declare the 2 new ESP_ZB_ZCL_ATTR_ON_OFF_ON_TIME and ESP_ZB_ZCL_ATTR_ON_OFF_OFF_WAIT_TIME attributes to the On/Off cluster.
My code is working with the Toggle command, I can control a Zigbee lamp using esp_zb_zcl_on_off_cmd_req()

But I cannot figure out how to send the "On With Timed Off".
Simply using the below code is not working.

esp_zb_zcl_on_off_cmd_t cmd_req;
cmd_req.zcl_basic_cmd.dst_addr_u.addr_short = 0x4EC4; // Constant to test...
cmd_req.zcl_basic_cmd.dst_endpoint = 1;
cmd_req.zcl_basic_cmd.src_endpoint = 1;
cmd_req.address_mode = ESP_ZB_APS_ADDR_MODE_16_ENDP_PRESENT;
//cmd_req.on_off_cmd_id = ESP_ZB_ZCL_CMD_ON_OFF_TOGGLE_ID; This is working well
cmd_req.on_off_cmd_id = ESP_ZB_ZCL_CMD_ON_OFF_ON_WITH_TIMED_OFF_ID;
// Attributes bellow created using esp_zb_on_off_cluster_add_attr(esp_zb_on_off_cluster, ESP_ZB_ZCL_ATTR_ON_OFF_ON_TIME, &onoff_on_time);
onoff_on_time = 10;
onoff_of_wait_time = 0;
esp_zb_zcl_on_off_cmd_req(&cmd_req);

Is this currently supported or is there something missing in esp_zigbee_zcl_command.h?

Additional context.

No response

@github-actions github-actions bot changed the title How to send "On With Timed Off" command? How to send "On With Timed Off" command? (TZ-554) Jan 8, 2024
@xieqinan
Copy link
Contributor

@g-chevalier ,

This command is not supported in the current version (v1.0.9), but it will be added in the subsequent version. Thank you for your patience.

@xieqinan
Copy link
Contributor

Hello,

The issue has been fixed in esp-zigbee-sdk v1.1.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants