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.

Speed to on/off
#1
Hi, i nedd to change status on/off of knx adress if speed exceed 10%, can you help please?
Reply
#2
This event script will send ON (true) to 1/1/1 when event value is larger than 10, otherwise it will send OFF (false) to 1/1/1.
Code:
value = event.getvalue()
grp.checkwrite('1/1/1', value > 10)
Reply
#3
(22.09.2022, 12:39)admin Wrote: This event script will send ON (true) to 1/1/1 when event value is larger than 10, otherwise it will send OFF (false) to 1/1/1.
Code:
value = event.getvalue()
grp.checkwrite('1/1/1', value > 10)

what is wrong on my script below

Code:
if event.getvalue() > 10
  then
grp.write('2/3/5', true)
  else
grp.write('2/3/5', false)
  end

Yours works fine. Thank you
Reply
#4
Your script does the same thing as mine. Not sure why it didn't work for you. I've tested and it works for me.
Reply


Forum Jump: