Logic Machine Forum
Scene trigger diffrent values - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: Scene trigger diffrent values (/showthread.php?tid=1437)



Scene trigger diffrent values - benthoma - 08.06.2018

Hello I am new to scripting.
Knx
I need a script to send a couple of different 1byte values when a scene is trigged.

Need another script to do the same when a bit is trigged


RE: Scene trigger diffrent values - Erwin van der Zwart - 08.06.2018

Hi,

You don't need a script to do that, just use the scene module that is default in the controller.

With script you can use this: (add as event based script to the scene object)
Code:
scenevalue = event.getvalue()
if scenevalue == 1 then
  grp.write('1/1/1', 10)
  grp.write('1/1/2', true) -- binary
  grp.write('1/1/3', 30)
  os.sleep(2) -- delay if needed
  grp.write('1/1/3', 40)
elseif scenevalue == 2 then
  grp.write('1/1/1', 50)
  grp.write('1/1/2', false) -- binary
  grp.write('1/1/3', 70)
  os.sleep(1) -- delay if needed
  grp.write('1/1/3', 80)
end
For binary object:  (add as event based script to the binary object)
Code:
bitvalue = event.getvalue()
if bitvalue == true then
  grp.write('1/1/1', 10)
  grp.write('1/1/2', true) -- binary
  grp.write('1/1/3', 30)
  os.sleep(2) -- delay if needed
  grp.write('1/1/3', 40)
else
  grp.write('1/1/1', 50)
  grp.write('1/1/2', false) -- binary
  grp.write('1/1/3', 70)
  os.sleep(1) -- delay if needed
  grp.write('1/1/3', 80)
end
BR,

Erwin


RE: Scene trigger diffrent values - benthoma - 09.06.2018

Thank you.


RE: Scene trigger diffrent values - Daniel - 11.06.2018

Hi
You can do the same with scene tab. No scripting needed.
BR


RE: Scene trigger diffrent values - Erwin van der Zwart - 11.06.2018

Hi Daniel,

That's what i wrote already, but i added the scripting for the option to add a delay, that's not possible (yet) with the scene tab (:

BR,

Erwin


RE: Scene trigger diffrent values - d.r soutras - 04.02.2020

(11.06.2018, 22:04)Erwin van der Zwart Wrote: Hi Daniel,

That's what i wrote already, but i added the scripting for the option to add a delay, that's not possible (yet) with the scene tab (:

BR,

Erwin

Hello Erwin!!
It will be very handy if they install delay function in the scene tab!
They haven’t include it at the latest firmware update.
Do you know when they are gonna release it?


RE: Scene trigger diffrent values - Erwin van der Zwart - 04.02.2020

Hi,

No i don’t know if it is still on the development list, i have not seen the updated version yet but admin should be able to tell...

I still have it on my wishlist so i will push for it (:

BR,

Erwin


RE: Scene trigger diffrent values - admin - 05.02.2020

Sometime later this year Smile