Code:
function ecl_get_last_hour_counter(ls_address)
local obj_addressraw = knxlib.encodega(ls_address)
local query = "select count() as pulses_per_hour FROM objectlog WHERE datahex='01' AND objectlog.address="..obj_addressraw.." AND logtime>="..tostring(os.microtime()-3600)
local count = db:getall(query)
return count[1].pulses_per_hour
end
LM5Lp, firmware: 2018.08.22 and 2021.12.15, FlashSYS v2, ARMv7 Processor rev 5 (v7l), kernel 4.4.151 and 4.4.259