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.

Support Request on Lua Scripting
#13
(31.12.2022, 08:21)Erwin van der Zwart Wrote: You could use a string object, but i would use 3 byte objects 1.2.3 and fetch the entered values with script to avoid invalid user input.

Limit the input values to the KNX standard on the start and middle object value in the object parameters.
Code:
start = grp.getvalue('1/1/1')
middle = grp.getvalue('1/1/2')
ending = grp.getvalue('1/1/3')
dev = start .. '.' .. middle .. '.' .. ending
knxlib.ping(dev)

to confirm the reading would be like this? Thank you

Code:
start = grp.getvalue('32/3/43')
middle = grp.getvalue('32/3/44')
ending = grp.getvalue('32/3/45')
dev = start .. '.' .. middle .. '.' .. ending
knxlib.ping(dev)


if dev == false then
  alert('Check FAIL')
  grp.write('32/3/42 ', false)

 
elseif dev == true then
  alert('Check OK')
  grp.write('32/3/42 ', true)

 
end
Reply


Messages In This Thread
RE: Support Request on Lua Scripting - by nmedalacabeza - 31.12.2022, 09:16

Forum Jump: