Skip to content

313F: System Date & Time

David Bonnes edited this page Jan 21, 2020 · 1 revision

When asked, an evohome controller will RP the date & time::

078 RQ --- 04:189076 01:145038 --:------ 313F 001 00
045 RP --- 01:145038 04:189076 --:------ 313F 009 00FC2F0024070107E4

Non-evohome configurations have been seen to:

095  I --- --:------ --:------ 12:259810 313F 009 0038020AAD170B07E3

Regardless, the Python code to decode this payload is:

import datetime as dt

def parser_313f(payload, msg) -> Optional[dict]:
    assert len(payload) / 2 == 9

    datetime_str = dt(
        year=int(seqx[14:18], 16),
        month=int(seqx[12:14], 16),
        day=int(seqx[10:12], 16),
        hour=int(seqx[8:10], 16) & 0b11111,  # 1st 3 bits: DayOfWeek
        minute=int(seqx[6:8], 16),
        second=int(seqx[4:6], 16),
    ).strftime("%Y-%m-%d %H:%M:%S")

    return {"datetime": datetime_str}
Payload decode:
Value [2:4] FC (write to device) or 60 (write to controller)
Time (seconds) [4:6]
Time (minutes) [6:8]
Time (hours) [8:10]
Date (day) [10:12]
Date (month) [12:14]
Date (year) [14:18]

Clone this wiki locally