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.

Scenes
#1
Hi
Can I modify scenes defined in LM in visualisation?
I mean change of brightness, room temperature etc.
"Autolearn" button would be great too.
Thank you
LM5Lp, firmware: 2018.08.22 and 2021.12.15, FlashSYS v2, ARMv7 Processor rev 5 (v7l), kernel 4.4.151 and 4.4.259
Reply
#2
Hi Thomas,

Not yet (for now you need to login to configuration part), but i have plans to create a app for this so end user can change and define his own scenes.

BR,

Erwin
Reply
#3
Can I access scene objects from Lua? If so I can simulate the required "Save" button in this way.
LM5Lp, firmware: 2018.08.22 and 2021.12.15, FlashSYS v2, ARMv7 Processor rev 5 (v7l), kernel 4.4.151 and 4.4.259
Reply
#4
Available functions:

Code:
scene.run = function(alias)
 run scene, alias can be a name or an id

scene.savelive = function(alias)
 save live value for the given scene alias

scene.set = function(alias, active)
 enable/disable scene, this will only disable running the scene
 by sending a specified value to trigger object. scene can be
 still executed via run() no matter if it is enabled or not

scene.enable = function(alias)
 shortcut for scene.set(alias, true)

scene.disable = function(alias)
 shortcut for scene.set(alias, false)

scene.status = function(alias)
 returns true when scene is enabled, false otherwise

scene.tagset = function(tag, active)
 enable/disable all scenes having the given tag

scene.tagenable = function(tag)
 shortcut for scene.tagset(tag, true)

scene.tagdisable = function(tag)
 shortcut for scene.tagset(tag, false)

scene.tagstatus = function(tag)
 returns two values: number of enabled and disabled scenes
 for the given tag

scene.tagsavelive = function(tag)
 save live values for all scenes having the given tag

scene.tagrun = function(tag)
 run all scenes having the given tag
Reply
#5
How can I use these functions? What do you mean by scene object? 1byte object?
Reply
#6
This is only available in newer firmwares which are not published yet
Reply
#7
(23.02.2017, 18:06)admin Wrote: This is only available in newer firmwares which are not published yet

Super info, I am waiting for publishingWink
Reply
#8
Hi Admin,

Will there also be a mapping option added for 1 byte feedback to 1 byte value when using 4bit dimming? Issue is when you use 4 bit dimming from sensor the feedback is update only, and value object doesn't have this latest value. So when you save live values the value object might have different value then the real dimming value (as send by feedback object).

I noticed also the function scene.reload() that is not specified in your list, what does it do?

BR,

Erwin
Reply
#9
Reload is used to tell the scene handler to reload scene data from the database. It is used by functions like enable/disable and should not usually be run manually. For now status objects won't be supported, but we might look into it later on.
Reply
#10
please add timouts between sending telegrams Smile
Reply
#11
Hi
Can I get scene table by some search function? Like I can use
myobjects = grp.tag('tag name')
for getting a list of group objects tables.

Thank you
LM5Lp, firmware: 2018.08.22 and 2021.12.15, FlashSYS v2, ARMv7 Processor rev 5 (v7l), kernel 4.4.151 and 4.4.259
Reply
#12
Do you want to get get a list of all scenes? Then the only way for now is to a database query:
Code:
scenes = db:getall('SELECT * FROM scenes')
Reply
#13
(29.11.2017, 07:28)admin Wrote: Do you want to get get a list of all scenes? Then the only way for now is to a database query:
Code:
scenes = db:getall('SELECT * FROM scenes')

Thank you
LM5Lp, firmware: 2018.08.22 and 2021.12.15, FlashSYS v2, ARMv7 Processor rev 5 (v7l), kernel 4.4.151 and 4.4.259
Reply
#14
(23.02.2017, 16:31)admin Wrote: Available functions:

Code:
scene.run = function(alias)
 run scene, alias can be a name or an id

scene.savelive = function(alias)
 save live value for the given scene alias

scene.set = function(alias, active)
 enable/disable scene, this will only disable running the scene
 by sending a specified value to trigger object. scene can be
 still executed via run() no matter if it is enabled or not

scene.enable = function(alias)
 shortcut for scene.set(alias, true)

scene.disable = function(alias)
 shortcut for scene.set(alias, false)

scene.status = function(alias)
 returns true when scene is enabled, false otherwise

scene.tagset = function(tag, active)
 enable/disable all scenes having the given tag

scene.tagenable = function(tag)
 shortcut for scene.tagset(tag, true)

scene.tagdisable = function(tag)
 shortcut for scene.tagset(tag, false)

scene.tagstatus = function(tag)
 returns two values: number of enabled and disabled scenes
 for the given tag

scene.tagsavelive = function(tag)
 save live values for all scenes having the given tag

scene.tagrun = function(tag)
 run all scenes having the given tag
I am not able to do this.  I every time get an error stating; attempt to call field 'savelive' (a nil value)

The code is

Code:
if scene > 0 and scene < 63 then
  scene.savelive(navn)
end


Am I missing something, or just doing it wrong?
There are 10 kinds of people in the world; those who can read binary and those who don't  Cool
Reply
#15
That's because you have overridden scene table with a numeric variable, rename scene number variable to something else in your script.
Reply
#16
(28.07.2020, 11:00)admin Wrote: That's because you have overridden scene table with a numeric variable, rename scene number variable to something else in your script.
Of course...

Thx for the patience  Blush
There are 10 kinds of people in the world; those who can read binary and those who don't  Cool
Reply


Forum Jump: