Profiles¶
The library supports the 270 profiles of the official EnOcean Alliance specification (EEP 2.6.8), listed in SUPPORTED_PROFILES.md. From code:
from enocean import EEP
eep = EEP()
print(len(list(eep.profiles())), 'profiles')
for variant in eep.describe('D2-01-12'):
print('command', variant.command, [field.shortcut for field in variant.fields])
output_value = next(variant for variant in eep.describe('D2-01-12') if variant.command == 1).field('OV')
print(output_value.kind, output_value.offset, output_value.size) # enum 17 7
print(output_value.items[0], output_value.ranges[0])
assert output_value.items[0] == 'Output value 0% or OFF'
Fields¶
- value fields map a raw range linearly to a physical scale (e.g. 255..0 → 0..40 °C);
valueis a number. - enum fields map raw values to descriptions; some ranges of raw values carry a scale and decode to a number
(e.g. D2-05
POS: 0..100 %). When building a telegram, give an enum by raw value, by description, or by the label before the colon of long descriptions (R1='Button AI'). - status fields are bits of the telegram's status byte (e.g. T21, NU of rocker switches).
Where the profiles come from¶
enocean/protocol/profiles/ (one file per profile, loaded on first use) is generated from the official specification
by tools/generate_eep.py (make eep), plus tools/eep_additions.xml for profiles missing from or unusable in the
specification. Some things the specification expresses can't be represented and are reported at generation: values
split over two fields (MSB/LSB) or signed, decoded raw; masked enum values; variants the specification gives no way to
tell apart (D2-30, D2-31 families).