18.03.2025, 10:16
(18.03.2025, 10:02)admin Wrote: See if the script triggers something else. One telegram per second should not cause high CPU load.
Set event script execution mode to "Last instance only".
Well, it does because the light is WLED led strip so it is not directly KNX but through API it became KNX. It actually works like this:
light group address > triggers an event-based script > calls a function from the library i created
is that too much? Does using metatables heavily impact the CPU? I attached the TAG- activated event-script
Code:
ga = event.dst
dt = grp.find(ga).datatype
ga_stato = get_st_add(ga)
value = event.getvalue()
wled = wled_ctrl:init({ip = "10.11.24.106", debug_mode = false})
if dt==1001 then
wled:accensione(value, ga_stato)
elseif dt == 5001 then
wled:luminosita(value, ga_stato)
elseif dt == 232600 then
wled:colore(value, ga_stato)
elseif dt == 6 then
wled:effetto(value, ga_stato)
elseif dt == 7 then
wled:color_temp(value, ga_stato)
elseif dt == 8 then
wled:palette(value, ga_stato)
else
log("rec")
log(wled:stato())
end