22.11.2018, 21:03
(This post was last modified: 23.11.2018, 08:34 by Erwin van der Zwart.)
Hi,
Why don’t you just create 1 widget with a value box for setting the GW 1 to xx and a value box with EVG nr. Under this you create a slider and a on/off button.
Then you can handle the rest in a single script..
This way the user just selects the GW and EVG by selector and the 2 elements control the selected EVG
BR,
Erwin
Why don’t you just create 1 widget with a value box for setting the GW 1 to xx and a value box with EVG nr. Under this you create a slider and a on/off button.
Then you can handle the rest in a single script..
Code:
GW = grp.getvalue('1/1/1')
EVG = grp.getvalue('1/1/2')
if event.dst == '1/1/3' then -- bit value
grp.write('2/' .. GW .. '/' .. EVG, event.getvalue())
elseif event.dst == '1/1/4' then -- byte value
grp.write('3/' .. GW .. '/' .. EVG, event.getvalue())
end
BR,
Erwin