Reading HOS Timer Clocks

Platform Science · consumer.hos_timer feed

Reading HOS Timer Clocks

How the 11, 14, 70 and 8-hour clocks behave, when they reset, when they go negative, and how to keep your display in step with the Platform Science portal between messages.

The short version

The driver's in-cab HOS application calculates every clock, including all duty-status, sleeper berth, split sleeper and exception rules. Each message tells you, per timer, whether that clock is counting down (running) and when it will reset on its own (next_reset_timestamp).

Your integration should not apply its own duty-status rules. Use the three fields below and your clocks will match what the portal shows.

Recommended calculation

This is the same logic the Platform Science portal uses to display live clocks between messages. Apply it to each entry in data.attributes.timers.

for each timer in data.attributes.timers:

    if timer.next_reset_timestamp is not null
       and NOW() >= timer.next_reset_timestamp:
        # the driver completed the qualifying rest; clock is full
        current = timer.available_hours * 3600

    else if timer.running == true:
        current = timer.seconds_left
                  - seconds_between(data.attributes.submitted_at, NOW())

    else:
        # paused clock: hold the value exactly as sent
        current = timer.seconds_left

Use submitted_at, not submitted_at_original. Before publishing, Platform Science advances seconds_left to the moment the message is sent and sets submitted_at to that moment. submitted_at_original is the time the device calculated the clocks. Counting down from it subtracts the same elapsed time twice, so running clocks drift low.

A new message replaces everything. When one arrives, discard your running values and start again from its fields.

Which clocks run in which duty status

US 70-hour / 8-day property ruleset. The running flag in each message already reflects this table. It is here so you can check what you see in the data.

ClockCounts down whilePaused while
11 hrDrivingOn duty, off duty, sleeper berth
14 hrAll statuses, once the shift starts with on duty or drivingNo status pauses it. A qualifying split sleeper period is excluded from the 14-hour window.
70 hrDriving, on dutyOff duty, sleeper berth
8 hrDrivingAny non-driving status

Personal conveyance is treated as off duty. Yard move is treated as on duty. The 60-hour / 7-day ruleset follows the same pattern with a 60-hour cycle and a 7-day window.

Q1

Where do the clocks stop when the driver is in the sleeper berth?

We see drift compared to the UI while the driver is in the sleeper.

In the sleeper berth the 11 and the 70 stop, and the 14 keeps running until a qualifying rest is complete. When the device determines that a sleeper period qualifies as part of a split sleeper pair, the 14 is adjusted to exclude that period, and the 11 and 14 are recalculated from the end of the first rest period of the pair.

Two things commonly cause drift in sleeper:

Messages are sent on events (duty status changes, violations, scheduled recalculation points such as a reset), not on a fixed interval. A driver can sit in the sleeper for hours with no new message. During split sleeper, the device can change a clock's paused or running state at a scheduled point between messages. The feed carries a snapshot, not that schedule, so a short difference from the portal is possible until the next message arrives.

Q2

When the device stops communicating, does Platform Science reset the clocks?

There is no communication-loss threshold. The portal shows full clocks when, and only when, the next_reset_timestamp sent by the device has passed. That timestamp is the device's forecast of when the driver's current rest will complete the reset (10 hours for the 11 and 14, 30 minutes for the 8, 34 hours for the 70).

Do the same on your side: once NOW() >= next_reset_timestamp, show available_hours in full for that clock. No separate reset message is sent when that time passes.

When next_reset_timestamp is null, the driver is not currently in a rest that would reset that clock, and the clock should not reset automatically.

Q3

Should a negative 11 or 14 be reset to full?

No. A clock does not reset because it went negative. It stays negative until the driver completes a qualifying rest (see Q4). There is no threshold that restores hours.

Q4

Reset rules for each clock

Each clock resets under its own rule, independently of the others. A partial state, where one clock is full and another is not, is normal and correct. For example, after a 10-hour break the 11 and 14 are full while the 70 can still be partly used.

ClockReturns to full when
11 hr10 consecutive hours off duty and/or sleeper berth
14 hr10 consecutive hours off duty and/or sleeper berth
70 hr34 consecutive hours off duty and/or sleeper berth (a restart). Without a restart, hours older than the 8-day window drop off at midnight and are given back.
8 hr30 consecutive minutes in any non-driving status, including on duty

Changes that are not a full reset

Off duty and sleeper berth time count equally toward every full reset.

Q5

When is a negative value expected?

Clocks are not limited to zero. A negative seconds_left means the driver has used more than the limit, but a negative value alone is not a violation. Use the violations array on each timer to see actual violations.

Show negative values as sent until a reset occurs or a new message arrives.

Q6–Q8

When should seconds be subtracted, by duty status?

When do we subtract elapsed drive seconds when the status is not Driving? Some of our rules subtract only when the driver is off duty, not in sleeper.

Do not base subtraction on duty status. Subtract elapsed time from a clock only when that clock's running flag is true, and measure elapsed time from submitted_at. The device sets running per clock, taking duty status, split sleeper and exceptions into account.

For reference, a rule that subtracts only during off duty does not match the HOS rules for any clock:

There is no other duty-status-based subtraction logic to apply on your side.

Other things to know