03.10.2016, 07:11
The only solution that I see is that you create another object for each one you want to log and then filter the input value in an event script.
Add this to Common functions:
Create an event script for each object where you want to log only value changes. 1/1/1 is your "virtual" object which is logged, 2 is minimum delta between current "virtual" object value which causes new value to be sent. Adjust as needed.
As for storage, do you mean script storage? In newer releases it's stored in a separate database and there's no easy way to delete some of the entries unless you know all of their names. You can only do a full clear operation.
Add this to Common functions:
Code:
function checkupdate(sendto, mindelta)
-- event value
local newvalue = event.getvalue()
-- current object value
local curvalue = grp.getvalue(sendto)
-- absolute delta between event and current value
local valdelta = math.abs(curvalue - newvalue)
-- send if delta value is large enough
if valdelta >= mindelta then
grp.update(sendto, newvalue)
end
end
Create an event script for each object where you want to log only value changes. 1/1/1 is your "virtual" object which is logged, 2 is minimum delta between current "virtual" object value which causes new value to be sent. Adjust as needed.
Code:
checkupdate('1/1/1', 2)
As for storage, do you mean script storage? In newer releases it's stored in a separate database and there's no easy way to delete some of the entries unless you know all of their names. You can only do a full clear operation.