19.04.2016, 14:09
(This post was last modified: 19.04.2016, 14:09 by gjniewenhuijse.)
maybe something like this?
But how to show the datahex in readable format?
And is it possible to add a general handler, also for groupreads etc?
But how to show the datahex in readable format?
And is it possible to add a general handler, also for groupreads etc?
Code:
if not client then
require('genohm-scada.eibdgm')
-- handle group writes
function eventhandler(event)
log(event) -- later send this to mysql
--log(knxdatatype.decode(event.datahex,?))
end
-- knx connection
client = eibdgm:new({ timeout = 1 })
client:sethandler('groupwrite', eventhandler)
-- start-up time
sec, usec = os.microtime()
end
-- handle knx
client:step()