12.07.2018, 11:42
(12.07.2018, 11:29)buuuudzik Wrote: For this module this is enough configuration:Line 10
EnOcean->KNX: F6-02-01 (first object S2, second S1)
KNX->EnOcean: F6-01-03 (connect on/off to only first object to control relay; select "Send telegram")
One device is controlled via such set of objects:
Zone 1_on/off - command object from LM true = on, false = off
Zone 1_trigger 1 - status of click (used for update the Zone 1_status)
Zone 1_trigger 2 - status of click (used for switching other object)
Zone 1_status - calculated relay status
These objects should have tag e.g. "enocean_st":
Zone 1_on/off
Zone 1_trigger 1
This script should be connected to above tag "enocean_st":
Code:-- Updating relay state
value = event.getvalue()
alias = grp.alias(event.dst)
zone, mode = alias:match('(.*)_(.*)')
statusAlias = zone .. '_status'
status = grp.getvalue(statusAlias)
if mode == 'toggle 1' then
grp.write(statusAlias, not status)
elseif mode == 'on/off' then
grp.write(statusAlias, value)
end
'toggle 1' or should it be 'trigger 1' ?
------------------------------
Ctrl+F5
Ctrl+F5