Posts: 411
Threads: 103
Joined: Oct 2016
Reputation:
9
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
Posts: 1764
Threads: 6
Joined: Jul 2015
Reputation:
117
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
Posts: 411
Threads: 103
Joined: Oct 2016
Reputation:
9
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
Posts: 7764
Threads: 42
Joined: Jun 2015
Reputation:
447
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
Posts: 940
Threads: 161
Joined: Jul 2015
Reputation:
33
How can I use these functions? What do you mean by scene object? 1byte object?
Posts: 7764
Threads: 42
Joined: Jun 2015
Reputation:
447
This is only available in newer firmwares which are not published yet
Posts: 940
Threads: 161
Joined: Jul 2015
Reputation:
33
(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 publishing
Posts: 1764
Threads: 6
Joined: Jul 2015
Reputation:
117
23.02.2017, 23:49
(This post was last modified: 24.02.2017, 00:02 by Erwin van der Zwart.)
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
Posts: 7764
Threads: 42
Joined: Jun 2015
Reputation:
447
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.
Posts: 155
Threads: 12
Joined: Sep 2015
Reputation:
13
please add timouts between sending telegrams
Posts: 411
Threads: 103
Joined: Oct 2016
Reputation:
9
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
Posts: 7764
Threads: 42
Joined: Jun 2015
Reputation:
447
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')
Posts: 411
Threads: 103
Joined: Oct 2016
Reputation:
9
(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
Posts: 185
Threads: 38
Joined: Feb 2017
Reputation:
3
28.07.2020, 10:58
(This post was last modified: 28.07.2020, 10:59 by Trond Hoyem.)
(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
Posts: 7764
Threads: 42
Joined: Jun 2015
Reputation:
447
That's because you have overridden scene table with a numeric variable, rename scene number variable to something else in your script.
Posts: 185
Threads: 38
Joined: Feb 2017
Reputation:
3
(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
There are 10 kinds of people in the world; those who can read binary and those who don't
|