3.2.42. Time Command Class, version 3¶
The Time Command Class, version 3 is used to set and read the local date and time from a supporting node in a Z-Wave network. Version 3 adds the commands to SET the date and time as well as adding the Time Source field to the Time Report. The time and date are the current time and date at the location where the primary controller of the network is located with the necessary time zone and daylight savings time offsets.
End Devices have varying accuracy and stability of their real-time clocks (RTC) and thus will send a Time Get based on their RTC needs. For example, some existing Z-Wave chips have two modes of RTC: an internal oscillator that can drift by as much as several minutes per day, and a 32 kHz crystal oscillator that is accurate to a couple of seconds per day. It is RECOMMENDED to use a crystal oscillator to minimize Z-Wave traffic and extend battery life.
3.2.42.1. Compatibility Considerations¶
In most cases Time Command Class, version 1 provides the necessary functionality unless the device has alternate means to obtain the time/date which may be UTC and thus need the timezone offset and other features of V2 and V3.
All commands not mentioned in this version remain unchanged from previous versions.
3.2.42.1.1. Node Information Frame (NIF)¶
\requirement{CC:008A.03.00.21.001}{0}
A supporting node MUST always advertise the Time Command Class in its NIF, regardless of the security bootstrapping outcome. This allows other nodes bootstrapped on any security level to request the current time from a supporting node.
3.2.42.2. Interoperability Considerations¶
Many nodes are both controlling and supporting Time CC: They are sending a Time Get (control) to request time update and reply to a Time Get (support) with a Time Report.
\requirement{CC:008A.03.00.32.001}{0} \requirement{CC:008A.03.00.33.001}{4}
For nodes based on an end node Role Type, it is RECOMMENDED to support a dedicated Association Group which issues the Time Get Command and/or the Date Get Command. If no destination is set into the Time Association Group, the Lifeline destinations MAY be used. If no Lifeline destination is configured, either, then the SUC Node ID MAY be used.
\requirement{CC:008A.03.00.32.002}{0}
Controlling nodes SHOULD automatically associate the Time Association group to a node supporting the Time Command Class which is typically the Primary Controller of the network.
3.2.42.3. Security Considerations¶
\requirement{CC:008A.03.00.41.001}{0}
A supporting node MUST NOT accept Set-type commands of Time CC (e.g. Time Offset Set, Time Set, Date Set) nor Report-type commands (e.g. Time Report, etc.), unless received using its own highest (granted) security class.
\requirement{CC:008A.03.00.41.003}{0}
A supporting node MUST still accept Get-type commands of Time CC (e.g. Time Get, Date Get, Time Offset Get) received using any lower security class.
\requirement{CC:008A.03.00.41.002}{0}
A supporting node issuing commands via association groups MUST send those commands with its highest granted Security Class.
\requirement{CC:008A.03.00.42.001}{0}
A supporting node issuing Set or Report type commands via association groups SHOULD use Supervision encapsulation only if sending commands with S2 (or higher security) encapsulation.
3.2.42.4. Time Report Command¶
This command is used to report the current time.
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|---|---|---|---|---|---|---|---|
Command Class = COMMAND_CLASS_TIME (0x8A) |
|||||||
Command = TIME_REPORT (0x02) |
|||||||
RTC failure |
Time Source |
Hour Local Time |
|||||
Minute Local Time |
|||||||
Second Local Time |
|||||||
RTC failure (1 bit)
\requirement{CC:008A.03.02.11.001}{0}
Many Real-Time-Clock (RTC) chips have a stop bit indicating if the oscillator has been stopped. The RTC failure bit MUST be set to 1 in order to indicate to the receiving node that the RTC has been stopped and that the advertised time might be inaccurate.
\requirement{CC:008A.03.02.11.002}{0}
If the sending node does not support this feature or if the oscillator has not been stopped, it MUST set this field to 0.
\requirement{CC:008A.03.02.11.003}{0}
If the receiving node does not control this feature, it MUST ignore this field.
Time Source (2 bits Read Only)
\requirement{CC:008A.03.02.11.004}{0} \requirement{CC:008A.03.02.11.005}{4} \requirement{CC:008A.03.02.11.006}{8} \requirement{CC:008A.03.02.11.007}{12}
Time Source identifies the source of accurate Local Time. If the device has a local source of accurate time such as GPS or Wi-Fi and uses that means to set the current local time, the device MUST set the Time Source field to GPS/Satellite Nav or Wi-Fi/Internet. If Time Source is GPS/Satellite Nav or Wi-Fi/Internet is set, Time Set and Time Report commands MUST be ignored by the supporting node unless the RTC Failure bit is set. If Time Source is GPS/Satellite Nav or Wi-Fi/Internet is set but the time has not yet been determined from the other source, the RTC Failure bit MUST be set until the time has been determined. If the sending node does not have a local source of time, this field MUST set to Z-Wave.
Value Z-Wave is used when the supporting device does not have a local time source and time is set via Z-Wave network using Time, Time Parameter or Clock Command Class. Note that Time command class Version 1 and Version 2 have this field as reserved and must be set to 00 which should be interpreted as UNKNOWN but may be assumed to be Z-Wave
This is a read-only field.
Value |
Description |
|---|---|
00 |
Z-Wave |
01 |
GPS/Satellite Nav |
10 |
Wi-Fi/Internet |
11 |
RESERVED |
Hour Local Time (5 bits)
This field is used to indicate the number of complete hours that have passed since midnight in local time.
\requirement{CC:008A.03.02.11.008}{0}
This field MUST be in the range 0..23 or 255 if the time has not been set.
Minute Local Time (8 bits)
This field is used to indicate the number of complete minutes that have passed since the start of the hour in local time.
\requirement{CC:008A.03.02.11.009}{0}
This field MUST be in the range 0..59 or 255 if the time has not been set.
Second Local Time (8 bits)
This field is used to indicate the number of complete seconds that have passed since the start of the minute in local time.
\requirement{CC:008A.03.02.11.010}{0}
This field MUST be in the range 0..59 or 255 if the time has not been set.
Note: the time synchronization between nodes may vary by a few seconds due to delays introduced by the wireless communication. Thus, a Time Set followed by a Time Get may result in the Time Report not being equal to the Time Set.
3.2.42.5. Time Set Command¶
\requirement{CC:008A.03.09.12.001}{0}
This command is used to set the current time. Supporting nodes SHOULD accept unsolicited Time Report commands equivalent to a Time Set if received using their highest security class. (As an exemption, this kind of control is not considered Full Control nor Partial Control in the sense of the Command Class Control Specification.)
\requirement{CC:008A.03.09.11.001}{0}
Supporting nodes MUST NOT change their local time due to a Time Report received using a lower security class than their own highest one.
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|---|---|---|---|---|---|---|---|
Command Class = COMMAND_CLASS_TIME (0x8A) |
|||||||
Command = TIME_SET (0x09) |
|||||||
Reserved |
Hour Local Time |
||||||
Minute Local Time |
|||||||
Second Local Time |
|||||||
RESERVED (3 bits)
\requirement{CC:008A.03.09.11.002}{0} \requirement{CC:008A.03.09.11.003}{4}
This field MUST be set to 0 by a sending node and MUST be ignored by a receiving node.
Hour Local Time (8 bits)
This field is used to indicate the number of complete hours that have passed since midnight in local time.
\requirement{CC:008A.03.09.11.004}{0}
This field MUST be in the range 0..23.
Minute Local Time (8 bits)
This field is used to indicate the number of complete minutes that have passed since the start of the hour in local time.
\requirement{CC:008A.03.09.11.005}{0}
This field MUST be in the range 0..59.
Second Local Time (8 bits)
This field is used to indicate the number of complete seconds that have passed since the start of the minute in local time.
\requirement{CC:008A.03.09.11.006}{0}
This field MUST be in the range 0..59.
Note: the time synchronization between nodes may vary by a few seconds due to delays introduced by the wireless communication.
3.2.42.6. Date Set Command¶
This command is used to set the current date adjusted according to the local time zone and Daylight Saving Time.
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|---|---|---|---|---|---|---|---|
Command Class = COMMAND_CLASS_TIME (0x8A) |
|||||||
Command = DATE_SET (0x08) |
|||||||
Year (MSB) |
|||||||
Year (LSB) |
|||||||
Month |
|||||||
Day |
|||||||
Year (16 bits)
\requirement{CC:008A.03.08.11.001}{0}
This field MUST specify the current year using the Gregorian calendar. The first byte (Year 1) MUST be the most significant byte.
For example, Year1 = 0x07 and Year2 = 0xD7 indicate year 2007
Month (8 bits)
\requirement{CC:008A.03.08.11.002}{0}
This field MUST specify the current month of the year.
\requirement{CC:008A.03.08.11.003}{0}
This field MUST be in the range 1..12 (representing respectively January…December).
Day (8 bits)
\requirement{CC:008A.03.08.11.004}{0}
This field MUST specify current the day of the month.
\requirement{CC:008A.03.08.11.005}{0}
This field MUST be in the range 1..31.