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.

NetworX (Interlogic) Gateway
#1
Hi,

I am trying to implement a LM to a NetworkX NX-8E alarm panel gateway and i need some help creating the basic serial over IP comunication script as i haven't any experience with serial protocols.
If someone else has implement something relative and could help it would bu much appreciated.

Networx RS-232 Gateway Interface Protocol

Thank you in advance
George
Reply
#2
Any luck with this topic?
Reply
#3
I've a meter with a P1 port(=serial). To read the data is use this: 

Code:
lastchar = '!'

require('serial')
port = serial.open('/dev/ttyUSB1', {
  baudrate = 115200,             --DSMR 2/3 = 9600        DSMR 4 = 115200
  databits = 8,                    --DSMR 2/3 = 7            DSMR 4 = 8
  stopbits = 1,                    --DSMR 2/3 = 1            DSMR 4 = 1
  parity = 'none',            --DSMR 2/3 = even        DSMR 4 = none
  duplex = 'full'
})

function readdata(port)
  local char, buf

  buf = {}

  while true do
    char = port:read(1)
    -- error (timeout) or newline, stop
    if char == nil or char == lastchar then
      break
    -- ignore cr char
    elseif char ~= '\r' then
      table.insert(buf, char)
    end
  end

  return table.concat(buf)
end

data = readdata(port)
port:flush()

---------------------------------------------------------------

if data then
 
  AphA = data:match'31.7.0%((%d+.%d+)'
  AphA = tonumber(AphA) 
  grp.update('32/1/74', AphA)

-- "more code"

end
Reply


Forum Jump: