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.

HIKVision support
#5
Try this for alert stream:
Code:
socket = require('socket')
mime = require('mime')

host = '192.168.1.2'
port = 80
auth = 'user:password'

init = 'GET /ISAPI/Event/notification/alertStream HTTP/1.1\r\n' ..
'Host: ' .. host .. ':' .. port .. '\r\n' ..
'Authorization: Basic ' .. mime.b64(auth) .. '\r\n' ..
'Accept: multipart/x-mixed-replace\r\n\r\n'

sock = socket.tcp()
sock:settimeout(60)
res, err = sock:connect(host, port)

if res then
  alert('connection ok')
  
  sock:send(init)
  line, err = sock:receive('*l')
  log(line, err)
else
  alert('connection failed: ' .. tostring(err))
end
Reply


Messages In This Thread
HIKVision support - by buuuudzik - 05.10.2018, 20:27
RE: HIKVision support - by buuuudzik - 05.10.2018, 21:41
RE: HIKVision support - by admin - 06.10.2018, 05:01
RE: HIKVision support - by buuuudzik - 06.10.2018, 06:19
RE: HIKVision support - by admin - 09.10.2018, 06:26
RE: HIKVision support - by buuuudzik - 09.10.2018, 07:11
RE: HIKVision support - by buuuudzik - 09.10.2018, 14:16
RE: HIKVision support - by admin - 09.10.2018, 14:36
RE: HIKVision support - by buuuudzik - 09.10.2018, 14:45
RE: HIKVision support - by admin - 09.10.2018, 15:35
RE: HIKVision support - by buuuudzik - 09.10.2018, 16:33
RE: HIKVision support - by admin - 09.10.2018, 16:50
RE: HIKVision support - by buuuudzik - 09.10.2018, 17:30
RE: HIKVision support - by admin - 10.10.2018, 10:22
RE: HIKVision support - by buuuudzik - 10.10.2018, 11:00
RE: HIKVision support - by admin - 10.10.2018, 11:51
RE: HIKVision support - by buuuudzik - 10.10.2018, 12:33
RE: HIKVision support - by Alberto.ricof - 28.05.2020, 14:40
RE: HIKVision support - by Alberto.ricof - 29.05.2020, 11:43

Forum Jump: