Wanscam HW0045 Help? [WORKING Mostly]

Post here to ask any questions about hardware suitability, configuration in ZoneMinder, or experiences. If you just want to know if something works with ZoneMinder or not, please check the Hardware Compatibility sections in the forum, and the Wiki first. Also search this topic as well.
Post Reply
lselinger
Posts: 35
Joined: Fri Oct 25, 2013 9:57 pm

Wanscam HW0045 Help? [WORKING Mostly]

Post by lselinger »

I grabbed this: http://www.wanscam.com/products/outdoor ... a/303.html from here: http://www.aliexpress.com/snapshot/7461260318.html

I've tried using some standard host paths and even found a bigger list here(although nothing for my specific model): https://www.ispyconnect.com/man.aspx?n=Wanscam. The only thing I'm missing I think would be the stream I connect to for ZM. I have a few but even the default one doesn't show a picture with these settings. I'd like to get the controls working eventually but I'd be happy with even just an image. In the main console it shows green but the logs are filling with

2016-03-29 13:40:32.383022 zmc_m3 23976 ERR Unable to get response, disconnecting zm_remote_camera_http.cpp 1141
2016-03-29 13:40:32.382639 zmc_m3 23976 ERR Failed authentication: zm_remote_camera_http.cpp 741

When I look at the image I see a blue screen@100+fps :shock: but no image.

Does anyone have any ideas on what to try or how to get new hardware working with ZM? I tried contacting the manufacturer but so far haven't gotten any kind of response.
Last edited by lselinger on Thu Apr 07, 2016 5:49 pm, edited 1 time in total.
PacoLM
Posts: 971
Joined: Wed Dec 02, 2009 9:55 pm
Location: Spain

Re: Wanscam HW0045 Help?

Post by PacoLM »

Hi,
I have a Wanscam, just another model, these are the settings I'm using to get the stream:

Code: Select all

GENERAL OPTIONS
Source type: Remote
Analysis FPS: leave empty
Maximum FPS: leave empty
Alarm Maximum FPS: leave empty

SOURCE OPTIONS
Remote protocol: HTTP
Remote method: Simple
Remote host name: youruser:yourpassword@your.cam.ip.address
Remote host port: cameraport
Remote host path: /videostream.cgi?usr=youruser&pwd=yourpassword
Target color space: 32 bit color
Capture width: 640 (check your config)
Capture height: 480 (check your config)
Use the camera user interface to set FPS settings, and the image resolution. Check that matches the stream resolution set in ZM, as the specs of the camera said:
First Stream->1080P(1920×1080), 960P(1280x960),720P(1280x720)
Second Stream->VGA-(640x352),(320x176)

Hope it helps,

PacoLM

After more than 15 years, no longer using ZM as surveillance system.
Now in the dark side, using a commercial system...
lselinger
Posts: 35
Joined: Fri Oct 25, 2013 9:57 pm

Re: Wanscam HW0045 Help?

Post by lselinger »

Very much appreciate the reply, I'm still having no luck sadly. I'm going to see if I can grab all the web related content from the camera to see what exactly it uses to provide the stream. I'd like to be able to connect to the second stream for recording but I need to know what option to pass and I'm not sure if it uses videostream.cgi or not. hopefully I can wget everything. If not I might be back to brute force trying every kind of config I can see lol
lselinger
Posts: 35
Joined: Fri Oct 25, 2013 9:57 pm

Re: Wanscam HW0045 Help?

Post by lselinger »

Ok I've grabbed the web content from the device and I think the remote host path is completely different. I found the cgi-bin directory and a reference to something similar Here with the full list Here however I can't get this to work either so I'm not positive if this is the same as mine. What I do know is the path looks similar

Code: Select all

web/cgi-bin/hi3510
I'll keep poking around or see if I can sniff the connection while using the web GUI.

Here's the current errors although I guess it makes sense if I'm not getting the stream:

Code: Select all

2016-03-30 08:41:33.315652	zmc_m3		30316	ERR	Unable to get response, disconnecting	zm_remote_camera_http.cpp	1141
2016-03-30 08:41:33.315316	zmc_m3		30316	ERR	Unable to read header	zm_remote_camera_http.cpp	628
I'm not sure if anyone can help so for now I'll just keep updating progress. As a side note, is there now ONVIF support and would this be an easier way to set this up? It has ONVIF support on another port *shrug*
lselinger
Posts: 35
Joined: Fri Oct 25, 2013 9:57 pm

Re: Wanscam HW0045 Help? - Another update

Post by lselinger »

Well I'm drawing more blanks than solutions. So far I've tried wget'ing and httrack'ing the damn device to step through all the html and whatever content I can scrape. Next step is breaking out wireshark from my Linux server and trying to do some connections to the device in a browser to see if I can see what gets submitted.

If anyone has any other suggestions please let me know :) I've found a couple other apps where the device is supported and works so I've reached out to a couple devs with no luck yet.
lselinger
Posts: 35
Joined: Fri Oct 25, 2013 9:57 pm

Re: Wanscam HW0045 Help?

Post by lselinger »

So I did some more local and remote testing using just random CGI commands I found all over ... specificaly the ones I tested successfully were from here: http://www.instar.com/faq_cgi_hd

I was able to use wget to submit the command to change the IR to auto:

Code: Select all

# wget --http-user=USER --http-password=PASS "http://MY_IP:MY_PORT/cgi-bin/hi3510/param.cgi?cmd=setinfrared&-infraredstat=auto"

# ls -lrt param.cgi\?cmd\=setinfrared\&-infraredstat\=auto 
-rw-r--r-- 1 root root 16 Mar 31 09:57 param.cgi?cmd=setinfrared&-infraredstat=auto

# cat param.cgi\?cmd\=setinfrared\&-infraredstat\=auto 
[Succeed]set ok.
Then to verify I tried sending a request for a snapshot:

Code: Select all

# wget --http-user=USER --http-password=PASS "http://MY_IP:MY_PORT/tmpfs/snap.jpg"
--2016-03-31 10:06:54--  http://MY_IP:MY_PORT/tmpfs/snap.jpg
Resolving MY_IP (MY_IP)... MY_IP
Connecting to MY_IP (MY_IP)|MY_IP|:MY_PORT... connected.
HTTP request sent, awaiting response... 401 Unauthorized
Authentication selected: Basic realm="tmpfs/snap.jpg"
Connecting to MY_IP (MY_IP)|MY_IP|:MY_PORT... connected.
HTTP request sent, awaiting response... 200 OK
Length: 117390 (115K) [image/jpeg]
Saving to: ‘snap.jpg’

snap.jpg     100%[=======================================================================================>] 114.64K   526KB/s   in 0.2s                                

Last-modified header invalid -- time-stamp ignored.
2016-03-31 10:06:55 (526 KB/s) - ‘snap.jpg’ saved [117390/117390]
Bur for the life of me I can't get the damn stream!!! ... I contacted the seller who did share with me a couple of possible cgi's

Code: Select all

/cgi-bin/hi3510/ptzzoomin.cgi
/cgi-bin/hi3510/ptzzoomout.cgi
This actually helped because the site I referenced for the cgi's that worked, doesn't have these and instead uses:

Code: Select all

/cgi-bin/hi3510/ptzctrl.cgi
Although I haven't tested these personally and I dont know what variables/options I can pass to the ptzoomin.cgi.
lselinger
Posts: 35
Joined: Fri Oct 25, 2013 9:57 pm

Re: Wanscam HW0045 Help?

Post by lselinger »

So everything I've tried so far (backup.cgi, snapshot.cgi, getserver info etc etc) has worked from This Doc EXCEPT the friggn live stream mjpegstream.cgi. Nothing I've tried so far works. I've verified on my other Non-Wanscam devices that wget'ing the stream in fact works so if most streams are the same if the CGI is correct (or I find the damn CGI for this cam) that it should capture with wget and I'll know what to configure in Zoneminder but so far no luck :?
lselinger
Posts: 35
Joined: Fri Oct 25, 2013 9:57 pm

Re: Wanscam HW0045 Help?

Post by lselinger »

Still no luck ... I decided to hook up wireshark on the server and checkout requests using the only method I know which sadly, is using the web interface. I did manage to filter for the full uri and grab what gets requested when you access the video feed from a browser .... sadly it's a damn swf file it embeds:

Code: Select all

[Full Request URI: http://<my IP>/web/swfs/StrobeMediaPlayback.swf]
I'm running out of steam and still am not sure how to get the valid live stream CGI file name as well as the actual options other than still pestering the company etc. :?

For now I'm done
PacoLM
Posts: 971
Joined: Wed Dec 02, 2009 9:55 pm
Location: Spain

Re: Wanscam HW0045 Help?

Post by PacoLM »

If you could get the static image you could use your camera in Zoneminder, if fact, it will save some CPU, as the ffmpeg will not need to decode the frames. Give it a try.

Hope it helps,

PacoLM

After more than 15 years, no longer using ZM as surveillance system.
Now in the dark side, using a commercial system...
lselinger
Posts: 35
Joined: Fri Oct 25, 2013 9:57 pm

Re: Wanscam HW0045 Help?

Post by lselinger »

I really want the video working lol .. I broke out wireshark and looked to see what my android apps use to get the video and they both seem to use the same thing:

Code: Select all

http://MY_IP:PORT/livestream/11?action=play&media=video
However when I try this in Zoneminder I get nothing and when trying from CLI and using wget I get this:

Code: Select all

$ wget --http-user=USER --http-password=PASS "http://MY_IP:PORT/livestream/11?action=play&media=video"
--2016-04-03 14:56:41--  http://MY_IP/livestream/11?action=play&media=video
Connecting to MY_IP:PORT... connected.
HTTP request sent, awaiting response... No data received.
Retrying.
Another weird thing is, in Wireshark my manual wget (which doesn't connect to the stream) request shows up like this:

Code: Select all

34742	18.978277000	SRC_IP	DST_IP	HTTP	218	GET /livestream/11?action=play&media=video HTTP/1.1 
While the working application request (which successfully connects to and plays the stream) shows up like this:

Code: Select all

8424	4.816721000	SRC_IP	DST_IP	HTTP	351	GET http://MY_IP:PORT/livestream/11?action=play&media=video HTTP/1.1
Still looking for help if anyone has any ideas :)
lselinger
Posts: 35
Joined: Fri Oct 25, 2013 9:57 pm

Re: Wanscam HW0045 Help? [WORKING Mostly]

Post by lselinger »

Ok so after days of ripping my hair out and moving over to try to get ONVIF working I got a config that gets me seeing the camera in ZM. I'll post to the wiki for this camera once I have everything worked out but I do see video so I'm stoked.

The high level was I abandoned Ubuntu's libav and compiled ffmpeg from scratch, then built ZM. Not sure if this was needed but I figured I may as well start right from scratch and included ONVIF support.

Next I messed around with zmonvif-probe.pl until I finally got some kind of response (still issues here but it got me in the right direction). What eventually got me some hints was scraping for profiles:

Code: Select all

# zmonvif-probe.pl -v profiles http://192.168.69.15:8080 USER USER_PASS
snip ----8<---
MainProfileToken, MainProfile, H264, 1920, 1080, 30, rtsp://192.168.69.15:554/11
SubProfileToken, SubProfile, H264, 640, 352, 25, rtsp://192.168.69.15:554/12
----8<---- snip
So I finally had an idea on what to hit, I just needed to create the monitor. To create the monitor, My settings are:
zm_monitor_conf.png
zm_monitor_conf.png (25.89 KiB) Viewed 20479 times
I went with the second image for now rather than going for the higher resolution image. All this being said I'm getting quite a few errors in ZM while I'm seeing the video but I'll post that as a different issue. The initial issue of not being able to see the camera in ZM has been resolved!! :D

Wanscam HW0045
zm_HW0045.png
zm_HW0045.png (400.17 KiB) Viewed 20479 times
Mikey8s
Posts: 3
Joined: Sun Sep 06, 2020 5:52 pm

Re: Wanscam HW0045 Help? [WORKING Mostly]

Post by Mikey8s »

I have a HW0045, I use the onvif connection and it gives very good image. The formula is : rtsp://user:login@ip address:554/11
Post Reply