Logic Machine Forum
Scenes - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Visualization (https://forum.logicmachine.net/forumdisplay.php?fid=9)
+--- Thread: Scenes (/showthread.php?tid=640)



Scenes - Thomas - 22.02.2017

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


RE: Scenes - Erwin van der Zwart - 22.02.2017

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


RE: Scenes - Thomas - 23.02.2017

Can I access scene objects from Lua? If so I can simulate the required "Save" button in this way.


RE: Scenes - admin - 23.02.2017

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



RE: Scenes - buuuudzik - 23.02.2017

How can I use these functions? What do you mean by scene object? 1byte object?


RE: Scenes - admin - 23.02.2017

This is only available in newer firmwares which are not published yet


RE: Scenes - buuuudzik - 23.02.2017

(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


RE: Scenes - Erwin van der Zwart - 23.02.2017

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


RE: Scenes - admin - 24.02.2017

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.


RE: Scenes - AEK - 27.02.2017

please add timouts between sending telegrams Smile


RE: Scenes - Thomas - 28.11.2017

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


RE: Scenes - admin - 29.11.2017

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')



RE: Scenes - Thomas - 29.11.2017

(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


RE: Scenes - Trond Hoyem - 28.07.2020

(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?


RE: Scenes - admin - 28.07.2020

That's because you have overridden scene table with a numeric variable, rename scene number variable to something else in your script.


RE: Scenes - Trond Hoyem - 28.07.2020

(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