Skip to content

0100: Localisation (language)

David Bonnes edited this page Jan 21, 2020 · 16 revisions

In this pair of packets, a TRV has had it's language set to de (German) by the user and so sent an RQ. The controller has forced it back to en (English) via an RP.

045 RQ --- 04:056057 01:145038 --:------ 0100 005 006465FFFF
047 RP --- 01:145038 04:056057 --:------ 0100 005 00656EFFFF

The controller will always respond to an 0100 with an empty payload, indicating its language:

045 RQ --- 04:056057 01:145038 --:------ 0100 005 00
047 RP --- 01:145038 04:056057 --:------ 0100 005 00656EFFFF

The language codes appear to be ISO 639-compatible.

Payload Structure

segment size contents
unused [0:2] always 00
language [2:6] ISO 639 string
unused [6:8] always FF

It is assumed that the ISO 639 string could be 4 characters, such as de-ch (Swiss German), although none of these have been seen in the wild.

Sample Code

Using Python, the payload can be decoded as:

from curses.ascii import isprint

def _str(seqx) -> Optional[str]:
    _string = bytearray([x for x in bytearray.fromhex(seqx) if x < 128 and isprint(x)])
    return _string.decode() if _string else None

def parser_0100(payload, msg) -> Optional[dict]:
    assert len(payload) / 2 == 5  # len(RQ) = 5 too
    assert payload[:2] == "00"
    assert payload[6:] == "FFFF"

    return {"language": _str(payload[2:6])}

Notes

The Controller has a language setting.

There's also a setting in the TRVs where you can set the language; if it is changed, the controller will overrule it later on.

In both cases it looks like there's only a selection between about 5 languages, and no sublanguage (e.g. en-ca, fr-ca), although it appears there's a space for it inside the payload segment.

Supported languages: English, Deutsch, Italiano, Francais, Nederlands, Espanol, Polski, Cesky, Magyar, Romana, Slovencina & Dansk.

Clone this wiki locally