def timy_checksum(msg):
    """Return the checksum for the Timy message string."""
    # Note: Defer fix to py3 where read returns bytes
    ret = 0
    for ch in msg:
        ret = ret + ord(ch)
    return ret & 0xff