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

Schedule feature in HA_thermostat end device (TZ-1529) #560

Open
GangadharShinde-Copeland opened this issue Feb 7, 2025 · 5 comments
Open
Labels

Comments

@GangadharShinde-Copeland

Question

How is time parameter considered in the set schedule command? I understand that it is in minutes from midnight (e.g 06:00 AM: 480min).
How does sdk know what time is it to change the attributes?
Does sdk automatically synchronize its time with UTC?
Do we need to declare/initialize anything for sdk to trigger attribute change events as per schedule?

Additional context.

No response

@github-actions github-actions bot changed the title Schedule feature in HA_thermostat end device Schedule feature in HA_thermostat end device (TZ-1529) Feb 7, 2025
@lhespress
Copy link
Contributor

@GangadharShinde-Copeland

  • ESP_ZB_ZCL_CLUSTER_ID_TIME is used for sync its time with coordinator.
  • esp_zb_get_utc_time_callback_register is used for sync UTC time.
  • No, you don't do anything.

@GangadharShinde-Copeland
Copy link
Author

@lhespress
For set schedule command to work properly, do I need to declare/initialize the time cluster in my application program?

Does sdk itself manage the time and time-zone for the schedule and update the attribute as per schedule?

@lhespress
Copy link
Contributor

@GangadharShinde-Copeland

  • Yes, you need declare/initialize the time cluster in your application program.
  • No, SDK doesn't care the time zone which get real time by esp_zb_get_utc_time_callback_register function.

@GangadharShinde-Copeland
Copy link
Author

@lhespress
Thank you, I appreciate your response.
I have one follow up question. You said SDK gets the real time by using esp_zb_get_utc_time_callback_register function.

where does the SDK get the real time from? (Zigbee HUB?)

@lhespress
Copy link
Contributor

@GangadharShinde-Copeland The example as follows:

static uint32_t zb_utc_time_handler(void)
{
    return real time;
}

static void esp_zb_task(void *pvParameters)
{
    ......

    esp_zb_get_utc_time_callback_register(zb_utc_time_handler);
    
    ......
}

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