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.

Round of decimal values without triggering event?
#1
I have several motion detectors that also reports brightness in lux every 5 minutes or so. The associated group objects seem to require (?) 2-byte unsigned floats to function. But for visualization in Wiser for KNX Touch3 I would like to drop the decimals and show integers instead.

Now values look like: 25573.72 (lux)
I am happy with: 25574 (lux) for a less cluttered look

What is the best way to do this?

Changing the values with an event-based Lua-script will cause a loop (the script calls itself repeatedly) that can only be canceled by rebooting the Wiser for KNX unit.

All the best
Robert
Reply
#2
I recommend a resident script to round your Lux values.Resident script will not cause a loop.
Reply
#3
You don’t need any script, just set the decimals to zero in the vis params of the object..
Reply
#4
Vis. params do not affect object display in Mosaic/Touch3. The easiest solution is to create a virtual object with 2-byte unsigned data type and map an event script to the sensor object that has a floating point value.
Code:
value = event.getvalue()
grp.checkupdate('32/1/1', value)
Reply


Forum Jump: