25.09.2018, 06:32
On W4KNX and SpaceLYnk the Touch visu have a widget called scenes. This is a widget for a 1-Byte object, with optional values. I'm sure LM and Mosaic have it too? This is what it looks like:
Make a 1-Byte unsigned object either as a virtual or real object in the configurator. If the object is real KNX, then the object can be manipulated on the bus by light switches, for instance. Set up the widget:
It will look like this:
Next, create a event based script in your shiny new 1-Byte object. Paste this code in:
Tag your desired objects with modes. Those objects can be 1-bit or 1-byte objects. Just remember that for a 1-bit object any value you send to it over 1 will be on, and 0 will be off.
Hope this helps and gets your imagination for what's possible
Make a 1-Byte unsigned object either as a virtual or real object in the configurator. If the object is real KNX, then the object can be manipulated on the bus by light switches, for instance. Set up the widget:
It will look like this:
Next, create a event based script in your shiny new 1-Byte object. Paste this code in:
Code:
local state = event.getvalue()
local tag = grp.tag('modes')
local awayVal = 0 -- away value
local homeVal = 50 -- home value
local nightVal = 10 -- night value
for _, object in ipairs(tag) do
address = object.address
if state == 0 then
grp.write(address, awayVal)
elseif state == 1 then
grp.write(address, homeVal)
elseif state == 2 then
grp.write(address, nightVal)
else
-- Do nothing
end
end
Tag your desired objects with modes. Those objects can be 1-bit or 1-byte objects. Just remember that for a 1-bit object any value you send to it over 1 will be on, and 0 will be off.
Hope this helps and gets your imagination for what's possible
