Issue with snapshot.cgi on Ubiquiti Cameras or NVR
Posted: Fri Mar 18, 2016 1:08 am
ZM Version 1.29.0 on Ubuntu 14.04 - Main Release, not compiled.
I am trying to add some Ubiquiti camera to Zoneminder, and have been for a couple years, but each time I give up. This time, I am really trying hard.
RTSP is to unstable, and has to many glitches, both from the camera (which the added back in the 3.2 beta firmware) or from the NVR.
There is API access to snapshots, from the NVR, and there is a CGI script that produces an image. I can get to them unauthenticated from a browser, but when I load them into the ZM monitor, I get the following in the logs;
03/17/16 17:55:55.789219 zmc_m9[28652].ERR-zm_remote_camera_http.cpp/1040 [Unable to read content]
03/17/16 17:55:55.810501 zmc_m9[28652].ERR-zm_remote_camera_http.cpp/1141 [Unable to get response, disconnecting]
So I turned on debugging. It is accessing the camera, but seems to have an issue reading from the camera, then after trying, the camera shuts out the monitor. Here is the debugging output.
03/17/16 17:55:55.608829 zmc_m9[28652].DB3-zm_remote_camera_http.cpp/124 [Connected to host, socket = 5]
03/17/16 17:55:55.608841 zmc_m9[28652].DB2-zm_remote_camera_http.cpp/138 [Sending request: GET /api/2.0/snapshot/camera/0a665d09-f0ba-32ea-a78d-f8cde28de971?force=true&apiKey=EHKDifNngCoCiCr6 HT
TP/1.0
User-Agent: ZoneMinder/1.29.0
Host: 172.23.4.191
Connection: Keep-Alive
]
03/17/16 17:55:55.608862 zmc_m9[28652].DB3-zm_remote_camera_http.cpp/147 [Request sent]
03/17/16 17:55:55.788814 zmc_m9[28652].DB3-zm_remote_camera_http.cpp/207 [Just getting 14480]
03/17/16 17:55:55.788991 zmc_m9[28652].DB3-zm_remote_camera_http.cpp/210 [Expecting 14480 bytes]
03/17/16 17:55:55.789045 zmc_m9[28652].DB3-zm_remote_camera_http.cpp/232 [Read 14480 bytes]
03/17/16 17:55:55.789060 zmc_m9[28652].DB4-zm_remote_camera_http.cpp/238 [HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: image/jpg
Date: Thu, 17 Mar 2016 21:55:37 GMT
Connection: close
▒▒▒▒]
03/17/16 17:55:55.789071 zmc_m9[28652].DB3-zm_remote_camera_http.cpp/773 [Got status '200' (OK), http version 1.1]
03/17/16 17:55:55.789076 zmc_m9[28652].DB3-zm_remote_camera_http.cpp/780 [Got connection 'close']
03/17/16 17:55:55.789080 zmc_m9[28652].DB3-zm_remote_camera_http.cpp/814 [Got content type 'image/jpg']
03/17/16 17:55:55.789089 zmc_m9[28652].DB3-zm_remote_camera_http.cpp/205 [Just getting 32K]
03/17/16 17:55:55.789093 zmc_m9[28652].DB3-zm_remote_camera_http.cpp/210 [Expecting 32768 bytes]
03/17/16 17:55:55.789148 zmc_m9[28652].DB3-zm_remote_camera_http.cpp/232 [Read 32768 bytes]
03/17/16 17:55:55.789155 zmc_m9[28652].DB4-zm_remote_camera_http.cpp/238 [▒▒▒▒]
03/17/16 17:55:55.789161 zmc_m9[28652].DB3-zm_remote_camera_http.cpp/205 [Just getting 32K]
03/17/16 17:55:55.789164 zmc_m9[28652].DB3-zm_remote_camera_http.cpp/210 [Expecting 32768 bytes]
03/17/16 17:55:55.789181 zmc_m9[28652].DB3-zm_remote_camera_http.cpp/232 [Read 32768 bytes]
03/17/16 17:55:55.789185 zmc_m9[28652].DB4-zm_remote_camera_http.cpp/238 [▒▒▒▒]
03/17/16 17:55:55.789190 zmc_m9[28652].DB3-zm_remote_camera_http.cpp/207 [Just getting 11743]
03/17/16 17:55:55.789194 zmc_m9[28652].DB3-zm_remote_camera_http.cpp/210 [Expecting 11743 bytes]
03/17/16 17:55:55.789206 zmc_m9[28652].DB3-zm_remote_camera_http.cpp/232 [Read 11743 bytes]
03/17/16 17:55:55.789210 zmc_m9[28652].DB4-zm_remote_camera_http.cpp/238 [▒▒▒▒]
03/17/16 17:55:55.789215 zmc_m9[28652].DB3-zm_remote_camera_http.cpp/197 [Socket closed remotely]
03/17/16 17:55:55.789219 zmc_m9[28652].ERR-zm_remote_camera_http.cpp/1040 [Unable to read content]
03/17/16 17:55:55.810501 zmc_m9[28652].ERR-zm_remote_camera_http.cpp/1141 [Unable to get response, disconnecting]
03/17/16 17:55:55.838106 zmc_m9[28652].DB3-zm_remote_camera_http.cpp/132 [Disconnected from host]
Anyone have any ideas? I am use the following to pull and it is the exact same results:
http://[NVR IP]:7080/api/2.0/snapshot/camera/[camera UUID]?force=true&apiKey=EHKDifNngCoCiCr6
or
http://[Camera IP]:80/snapshot.cgi
Thanks for any thoughts.
I am trying to add some Ubiquiti camera to Zoneminder, and have been for a couple years, but each time I give up. This time, I am really trying hard.
RTSP is to unstable, and has to many glitches, both from the camera (which the added back in the 3.2 beta firmware) or from the NVR.
There is API access to snapshots, from the NVR, and there is a CGI script that produces an image. I can get to them unauthenticated from a browser, but when I load them into the ZM monitor, I get the following in the logs;
03/17/16 17:55:55.789219 zmc_m9[28652].ERR-zm_remote_camera_http.cpp/1040 [Unable to read content]
03/17/16 17:55:55.810501 zmc_m9[28652].ERR-zm_remote_camera_http.cpp/1141 [Unable to get response, disconnecting]
So I turned on debugging. It is accessing the camera, but seems to have an issue reading from the camera, then after trying, the camera shuts out the monitor. Here is the debugging output.
03/17/16 17:55:55.608829 zmc_m9[28652].DB3-zm_remote_camera_http.cpp/124 [Connected to host, socket = 5]
03/17/16 17:55:55.608841 zmc_m9[28652].DB2-zm_remote_camera_http.cpp/138 [Sending request: GET /api/2.0/snapshot/camera/0a665d09-f0ba-32ea-a78d-f8cde28de971?force=true&apiKey=EHKDifNngCoCiCr6 HT
TP/1.0
User-Agent: ZoneMinder/1.29.0
Host: 172.23.4.191
Connection: Keep-Alive
]
03/17/16 17:55:55.608862 zmc_m9[28652].DB3-zm_remote_camera_http.cpp/147 [Request sent]
03/17/16 17:55:55.788814 zmc_m9[28652].DB3-zm_remote_camera_http.cpp/207 [Just getting 14480]
03/17/16 17:55:55.788991 zmc_m9[28652].DB3-zm_remote_camera_http.cpp/210 [Expecting 14480 bytes]
03/17/16 17:55:55.789045 zmc_m9[28652].DB3-zm_remote_camera_http.cpp/232 [Read 14480 bytes]
03/17/16 17:55:55.789060 zmc_m9[28652].DB4-zm_remote_camera_http.cpp/238 [HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: image/jpg
Date: Thu, 17 Mar 2016 21:55:37 GMT
Connection: close
▒▒▒▒]
03/17/16 17:55:55.789071 zmc_m9[28652].DB3-zm_remote_camera_http.cpp/773 [Got status '200' (OK), http version 1.1]
03/17/16 17:55:55.789076 zmc_m9[28652].DB3-zm_remote_camera_http.cpp/780 [Got connection 'close']
03/17/16 17:55:55.789080 zmc_m9[28652].DB3-zm_remote_camera_http.cpp/814 [Got content type 'image/jpg']
03/17/16 17:55:55.789089 zmc_m9[28652].DB3-zm_remote_camera_http.cpp/205 [Just getting 32K]
03/17/16 17:55:55.789093 zmc_m9[28652].DB3-zm_remote_camera_http.cpp/210 [Expecting 32768 bytes]
03/17/16 17:55:55.789148 zmc_m9[28652].DB3-zm_remote_camera_http.cpp/232 [Read 32768 bytes]
03/17/16 17:55:55.789155 zmc_m9[28652].DB4-zm_remote_camera_http.cpp/238 [▒▒▒▒]
03/17/16 17:55:55.789161 zmc_m9[28652].DB3-zm_remote_camera_http.cpp/205 [Just getting 32K]
03/17/16 17:55:55.789164 zmc_m9[28652].DB3-zm_remote_camera_http.cpp/210 [Expecting 32768 bytes]
03/17/16 17:55:55.789181 zmc_m9[28652].DB3-zm_remote_camera_http.cpp/232 [Read 32768 bytes]
03/17/16 17:55:55.789185 zmc_m9[28652].DB4-zm_remote_camera_http.cpp/238 [▒▒▒▒]
03/17/16 17:55:55.789190 zmc_m9[28652].DB3-zm_remote_camera_http.cpp/207 [Just getting 11743]
03/17/16 17:55:55.789194 zmc_m9[28652].DB3-zm_remote_camera_http.cpp/210 [Expecting 11743 bytes]
03/17/16 17:55:55.789206 zmc_m9[28652].DB3-zm_remote_camera_http.cpp/232 [Read 11743 bytes]
03/17/16 17:55:55.789210 zmc_m9[28652].DB4-zm_remote_camera_http.cpp/238 [▒▒▒▒]
03/17/16 17:55:55.789215 zmc_m9[28652].DB3-zm_remote_camera_http.cpp/197 [Socket closed remotely]
03/17/16 17:55:55.789219 zmc_m9[28652].ERR-zm_remote_camera_http.cpp/1040 [Unable to read content]
03/17/16 17:55:55.810501 zmc_m9[28652].ERR-zm_remote_camera_http.cpp/1141 [Unable to get response, disconnecting]
03/17/16 17:55:55.838106 zmc_m9[28652].DB3-zm_remote_camera_http.cpp/132 [Disconnected from host]
Anyone have any ideas? I am use the following to pull and it is the exact same results:
http://[NVR IP]:7080/api/2.0/snapshot/camera/[camera UUID]?force=true&apiKey=EHKDifNngCoCiCr6
or
http://[Camera IP]:80/snapshot.cgi
Thanks for any thoughts.