-
Notifications
You must be signed in to change notification settings - Fork 114
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
Device Streams allow driver to set timestamp. #292
Comments
I like #2. -Matt -- On Tue, Mar 1, 2016 at 12:21 PM, Adam Magaluk [email protected]
|
Timestamps are, always have been, and always will be problematic. The biggest problem is that there are too many events for which you could grab the time. Relating to device data:
And if we really tried, we could probably find 5 more. Some questions:
This would make the |
I agree there is a number of events you could get the time from but I think in most cases what the consumer of the api is going to want is the time closest to the event happening whether that's provided by the physical devices or supplied by the zetta hub that it's connecting through in cases where the physical device doesn't have a RTC. I think all the other timestamps you refer to are things we might/probably want in the internals of zetta and potentially used as someone who hosts zetta but not as the timestamp that's important to the consumer. |
Zigbee has a device type called an IAS Zone, which deals with security devices like door and motion sensors. One of the features of this type of device is that it can implement "guaranteed delivery" of messages. This means that when it sends an event to the network coordinator, it will save a copy of the message until the coordinator acknowledges it. If the message is not acknowledged, it will resend the message until it is, buffering any new messages. Whenever a buffered message is resent, it includes a time delta since it was originally recorded. The network coordinator can look at this time and realize this is a "past" event and not a real-time notification. In this case, it would be nice to be able to override the timestamp of the stream to match that of the delayed events actual time of happening. |
In drivers today a device driver implementer has no control over the timestamp in the streams on streams. The timestamp is generated when
stream.write()
is called.For example:
This would be helpful in a few cases where you're receiving events from your device with a timestamp set on the physical device.
Some possible options for implementing:
The text was updated successfully, but these errors were encountered: