This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Making scenes in mosaic
#2
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:


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 Smile
Reply


Messages In This Thread
Making scenes in mosaic - by 02dag - 24.09.2018, 18:26
RE: Making scenes in mosaic - by FatMax - 25.09.2018, 06:32
RE: Making scenes in mosaic - by Daniel - 25.09.2018, 07:19
RE: Making scenes in mosaic - by FatMax - 25.09.2018, 07:23

Forum Jump: