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.

Get Snapshot from Hikvision Camera
#1
Hi,

I´ve tried to get snapshot with socket http request

Code:
function SnapshotCamaraIP2()
 
  local IP = "192.168.1.100"
  local UrlCamara = 'http://user:pass@'..IP..'/ISAPI/Streaming/channels/101/picture' 
  local response
      
  require('socket.http')
  socket.http.TIMEOUT = 5
  response,err = socket.http.request(UrlCamara)
 
  log(response,err)
  return response
 
end

And response is:

Code:
* arg: 1
  * string: <!DOCTYPE html>
<html><head><title>Document Error: Unauthorized</title></head>
<body><h2>Access Error: 401 -- Unauthorized</h2>
<p>Authentication Error</p>
</body>
</html>

* arg: 2
  * number: 401

If I put this url in explorer it works.

Thanks
Reply


Messages In This Thread
Get Snapshot from Hikvision Camera - by DGrandes - 13.03.2023, 12:36

Forum Jump: