Skip to content

10E0: Device Information

David Bonnes edited this page Jan 24, 2020 · 23 revisions
074  I --- 34:136285 63:262142 --:------ 10E0 038 000001C8380F0100F1FF040A07E1030507E15438375246323032350000000000000000000000
062  I --- 34:205645 63:262142 --:------ 10E0 038 000001C8380A0100F1FF120807E0030B07DE5438375246323032350000000000000000000000
045  I --- 34:064023 63:262142 --:------ 10E0 038 000001C8380A0100F1FF1C0307E1030B07DE5438375246323032350000000000000000000000
067  I --- 34:064023 63:262142 --:------ 10E0 038 000001C8380A0100F1FF1C0307E1030B07DE5438375246323032350000000000000000000000
059  I --- 34:064023 63:262142 --:------ 10E0 038 000001C8380A0100F1FF1C0307E1030B07DE5438375246323032350000000000000000000000
Payload decode: To do

Python Code

def parser_10e0(payload, msg) -> Optional[dict]:  # device_info
    def _date(seqx) -> Optional[str]:
        try:  # the seqx might be "FFFFFFFF"
            return dt(
                year=int(seqx[4:8], 16), 
                month=int(seqx[2:4], 16), 
                day=int(seqx[:2], 16)
            ).strftime("%Y-%m-%d")
        except ValueError:
            return None

    assert len(payload) / 2 in [30, 38]  # a non-evohome seen with 30

    return {  # TODO: add version?
        "description": _str(payload[36:]),
        "date_1": _date(payload[20:28]),  # could be 'FFFFFFFF'
        "date_2": _date(payload[28:36]),
        "unknown_0": payload[:20],
    }
Clone this wiki locally