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.

Scene trigger diffrent values
#1
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
Reply
#2
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
Reply
#3
Thank you.
Reply
#4
Hi
You can do the same with scene tab. No scripting needed.
BR
------------------------------
Ctrl+F5
Reply
#5
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
Reply
#6
(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?
Reply
#7
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
Reply
#8
Sometime later this year Smile
Reply


Forum Jump: