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

Add ZigBeeUtcTime class and client/server #1371

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

cdjackson
Copy link
Member

This is something I wrote a while back but didn't create a PR so I need to try and remember how it all works :)

This creates a ZigBeeUtcTime class for managing time on a remote device. It then supports a ZigBeeTimeExtension which in turn can provide a local ZclTimeClient or ZclTimeServer to manage the time on the remote device.

The ZclTimeServer is relatively simple in that it just responds to requests from the device.

The ZclTimeClient is in itself also simple in that it provides methods to set the time on the remote.

The ZigBeeTimeExtension tries to automate the time management by working out drift rates, and setting the clock proactively if the time has drifted outside spec and the device didn't update the time through a request to the ZclTimeServer.

There is also a ZigBeeConsoleTimeCommand console command to get or set the time, and display the various information.

This is potentially a breaking change if people are using time at the moment since this changes some interfaces from Calendar to ZigBeeUtcTime.

I welcome comments on this and will wait a week or two before merging.

Signed-off-by: Chris Jackson chris@cd-jackson.com

Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CodeQL found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.

@dschall
Copy link
Contributor

dschall commented Jan 27, 2023

Hey chris, apologies, I still didn't have time to test.
Thanks for coding this up, I hope to be able to run some testing soon...

@cdjackson
Copy link
Member Author

@dschall I've updated this to use the ZclCommandListener - this should avoid multiple responses. I also updated some initialisation code to register the clusters and merged master into this so it's up to date.

Signed-off-by: Chris Jackson <chris@cd-jackson.com>
Signed-off-by: Chris Jackson <chris@cd-jackson.com>
Signed-off-by: Chris Jackson <chris@cd-jackson.com>
Signed-off-by: Chris Jackson <chris@cd-jackson.com>
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

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

Successfully merging this pull request may close these issues.

None yet

2 participants