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
#1
I have not been able to find any widgets that can turn off multiple objects at the same time. I would like to turn on scenes like night and away with Mosaic.

I am wondering if it is possible to maybe, make a virtual object, control this with a widget, and write an eventbased script that turns off multiple objects. Maybe I can use tags for this?

Are there anyone that know an easier way of doing this?
Reply
#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
#3
Hi
Alternatively the scene can be done via build in scene tab.
The scene widget will also send save telegram on long press of the button. If I remember well it was scene value + 127
BR
------------------------------
Ctrl+F5
Reply
#4
(25.09.2018, 07:19)Daniel. Wrote: Hi
Alternatively the scene can be done via build in scene tab.
The scene widget will also send save telegram on long press of the button.  If I remember well it was scene value + 127
BR

That’s a even better idea as you can have different values for different objects. Haven’t tried the scene module myself yet..
Reply


Forum Jump: