215
b) create one object with 4-byte unsigned integer data type and another with 1-byte
scaled. 4-byte object should be mapped to KNX EnOcean object with 4-byte RAW
profile.
c) Add the following script to the 1-byte scaled object (just for initial teach command)
b3 = 0xE0
b2 = 0x47
b1 = 0xFF
b0 = 0x00
a3 = bit.lshift(b3, 24)
a2 = bit.lshift(b2, 16)
a1 = bit.lshift(b1, 8)
res = bit.bor(a3,a2,a1,b0)
grp.update('1/1/5', res, dt.uint32)
d) Put the actuator into learning mode: turn bottom rotary to EC1, upper rotary to LRN
e) Set an object value for 1-byte scaled object (0-100) to teach in. (The actuator should
stop flashing)
f) Turn back actuator to desired functionality
g) Add the following script to 1-byte scaled object (to be able to control the actuator)
-- dimming
b3 = 0x02
-- dimmer value [0..100]
b2 = event.getvalue()
-- ramp time in seconds
b1 = 1
-- data telegram, absolute value, store final
b0 = 9
a3 = bit.lshift(b3, 24)
a2 = bit.lshift(b2, 16)
a1 = bit.lshift(b1, 8)
res = bit.bor(a3,a2,a1,b0)
grp.update('1/1/5', res, dt.uint32)
h) The dimmer can now be controlled through the 1-byte scaled object
If you need to read the values from the actuator as a 1-byte scaled object:
a) In EnOcean >> KNX tab find the actuator (that should send confirmation signals if step 1
above was followed)
b) Set profile as "RAW 4-bytes, split"
c) Map Data Byte 2 to an object.
d) Create a new object as "5.001 scale" (in the example 1/1/6)
e) Add the following script to the Data Byte 2 object created in point 3: