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.

Log all packets from 15.15.*
#1
Hi

Is there any easy way to log all packets coming from source 15.15.* ? (without making a tag on all objects)
I have some units that use 15.15.* when they are starting up and after a while change the address to the right configured address. And I want to log if these units have any other strange behavior.

Thanks

Regards
Klaus
Reply
#2
Hi Klaus,

you could use such script and customize handleLog function according to your needs.


Code:
if not client then
  require('genohm-scada.eibdgm')

  objects = grp.all()
  datatypes = {}

  for _, object in ipairs(objects) do
    datatypes[ object.id ] = object.datatype
  end
 
  function handleLog(src, eventType, ga, value, rawEvent)
    local isLoggedAddress = src:find("15.15.%d+") ~= nil
    if isLoggedAddress then
      log(src, eventType, ga, value, os.time())
    end
  end

  function writehandler(event)
    local dpt, dst = datatypes[ event.dstraw ], event.dst
    local value = nil
   
    if dpt then
      value = knxdatatype.decode(event.datahex, dpt)
    end
   
    handleLog(event.src, event.type, dst, value, event)
  end
   
  client = eibdgm:new({ timeout = 0.5 })
  client:sethandler('groupwrite', writehandler)
end

-- handle knx
client:step()


You could look also into these posts:
https://forum.logicmachine.net/showthrea...ght=eibdgm
https://forum.logicmachine.net/showthrea...ght=eibdgm
Done is better than perfect
Reply
#3
It did the job - thanks

Smile
Reply
#4
Awesome!
Done is better than perfect
Reply


Forum Jump: