Zoneminder and Trendnet TV-IP110

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.
mawindholz
Posts: 1
Joined: Fri Apr 25, 2008 10:10 pm

Zoneminder and Trendnet TV-IP110

Post by mawindholz »

Is there anyway to make the Trendnet TV-IP110 work with Zoneminder? If not, does anybody know if it will be supported in the future?
User avatar
kp4djt
Posts: 224
Joined: Mon Jun 18, 2007 1:53 am
Location: Tampa, FL

Post by kp4djt »

I have on too, and am in the same boat. If there is anyone out there that knows how to make it work sure would like to have that info...
Chuck Hast -- KP4DJT --
Web site www.wchast.com
ZM demo www.wchast.com/zm
tzm
Posts: 4
Joined: Fri May 09, 2008 4:04 pm

Trendnet TV-IP110W

Post by tzm »

I have been trying to use TV-IP110W in ZoneMinder. According to its
CGI command manual (send by Trendnet customer support), mjpeg
stream is available at:

http://192.168.1.30/cgi/mjpg/mjpeg.cgi

When I entered the path above in ZM, I could not see the video.
I tried to add username and password in the "Remote Host Name"
section as

admin:passwd@192.168.1.30

but it did not work. If username&passwd are not supplied, the camera
does not allow access, however the above method is not useful for
authentication. If I use lynx to dump the stream to a file:

lynx -dump http://192.168.1.30/cgi/mjpg/mjpeg.cgi > file

then I have the message HTTP: Access authorization required.
I can save the stream if I provide authentication as:

lynx -dump -auth=user:passwd http://192.168.1.30/cgi/mjpg/mjpeg.cgi > file

If ZM can pass authentication similar to lynx, then it may be possible
to use this camera. I am also trying to find a way to disable user
authentication in IP110W, but I am not sure if this is possible (I am
waiting for an answer from Trendnet).
onidlo
Posts: 8
Joined: Wed Nov 14, 2007 10:02 pm

Re: Trendnet TV-IP110W

Post by onidlo »

Please, take a look at my post:
http://www.zoneminder.com/forums/viewtopic.php?t=11649

Even I have a different model, the URL seems to be very similar and probably they use the same software in the camera. Could you please copy-paste result of:

wget -S http://<CAMERA-IP>/cgi/mjpg/mjpeg.cgi -user=admin -password=pass

In my case, the camera returned something like:

...
Content-Type: multipart/mixed; boundary=--myboundary
...
28 bytes of strange data... jpeg header...jpeg....jpeg footer
...

So, it did not provide:
1) content-type for every part of the response
2) valid content-type (only multipart/mixed instead multipart/x-mixed-replace)
3) valid JPEG code
tzm
Posts: 4
Joined: Fri May 09, 2008 4:04 pm

Re: Trendnet TV-IP110W

Post by tzm »

Even I have a different model, the URL seems to be very similar and probably they use the same software in the camera. Could you please copy-paste result of:

wget -S http://<CAMERA>/cgi/mjpg/mjpeg.cgi -user=admin -password=pass
Here is the result of wget:

wget -S http://192.168.1.30/cgi/mjpg/mjpeg.cgi --http-user=admin --http-password=passwd
--01:36:40-- http://192.168.1.30/cgi/mjpg/mjpeg.cgi
Connecting to 192.168.1.30:80... connected.
HTTP request sent, awaiting response...
HTTP/1.1 200 OK
Content-Type: multipart/mixed;boundary=myboundary
Length: unspecified [multipart/mixed]
Saving to: `mjpeg.cgi'

After that, it keeps on saving the stream. The file mjpeg.cgi starts
with something like this:

--myboundary
Content-Length: 10537
ä¾&JVQ›E...

I am not sure if this stream is useful for ZM, is there a way to check?
tzm
Posts: 4
Joined: Fri May 09, 2008 4:04 pm

Re: Trendnet TV-IP110W

Post by tzm »

I checked your camera, I guess Micronet SP5511W and Trendnet IP110W
are identical models. Their shapes and specifications are the same, you
can check this web page:

http://trendnet.com/products/proddetail ... 10W&cat=48

In your other post, you mentioned that you had some changes in
zm_remote_camera.cpp to get it working. Could you post the modified
file (and any other step)? Does it work well after that?
onidlo
Posts: 8
Joined: Wed Nov 14, 2007 10:02 pm

Re: Trendnet TV-IP110W

Post by onidlo »

tzm wrote:
In your other post, you mentioned that you had some changes in
zm_remote_camera.cpp to get it working. Could you post the modified
file (and any other step)?
I can post also diff file, if you know, how to create it ;-) The most important part of the code follows:

Code: Select all

					if ( format == JPEG && buffer.Size() >= 2 )				{																
						if (
						      (micronet_mode == MICRONET_MODE)&&
						      ( buffer[0] != 0xff || buffer[1] != 0xd8 )
						   )  {
						   Debug (3, ("Fixing Micronet problem, buffersize = %d, content_length = %d", buffer.Size(), content_length));
						   buffer.Consume(28);
						   content_length -= 28;
						   //Debug (3, ("Micronet problem fixed!, buffersize = %d, content_length = %d", buffer.Size(), content_length));						   						   
						   
						   micronet_fix_count++;
						   Disconnect();
						}
					}
					
					/*
					if (micronet_fix_count>=10) {
					    micronet_fix_count = 0;
					    // close the connection when 10 images were received
					    Disconnect();
					}
					*/
					
					Debug( 3, ( "Returning %d (%d) bytes of captured content", content_length, buffer.Size() ));
					return( content_length );
The "enum" variable microned_mode is set, if header multipart/mixed is found.

tzm wrote:
Does it work well after that?
Yes, now it works. But it has to disconnect after every image, otherwise the system load rises to very high numbers (after 5 minutes to 12 with only one camera and quite good CPU). And also, with every minute the video delayed approximately 10 seconds.
tzm
Posts: 4
Joined: Fri May 09, 2008 4:04 pm

Re: Trendnet TV-IP110W

Post by tzm »

OK, I replaced the original code:

Code: Select all

if ( format == JPEG && buffer.Size() >= 2 )
  {
    if ( buffer[0] != 0xff || buffer[1] != 0xd8 )
      {
        Error(( "Found bogus jpeg header '%02x%02x'", buffer[0], buffer[1] ));
        return( -1 );
      }
  }
with the modified version:

Code: Select all

if ( format == JPEG && buffer.Size() >= 2 )
  {
    if ( buffer[0] != 0xff || buffer[1] != 0xd8 )
      {
        Debug (3, ("Fixing Micronet problem, buffersize = %d, content_length = %d", buffer.Size(), content_length));
        buffer.Consume(28);
        content_length -= 28;
        Disconnect();
      }
  }
I assumed MICRONET_MODE is always ON, and removed the commented
sections, so micronet_fix_count was not needed. After compiling and
starting zm (I have version 1.23.3), I still do not have any video. After
checking the /tmp/zmwatch.log file, I have seen the following errors:

zmwatch[13823].ERR [Can't get shared memory id '7a6d0003', 3: No such file or directory]
zmwatch[13823].INF [Restarting capture daemon for Ipcam1, shared memory not valid]
zmwatch[13823].INF ['zmc -m 3' starting at 08/05/12 16:39:22, pid = 14275]

Did you have these kind of messages? By the way, my remote camera
name is ipcam1 (I also tried IP addr, made no difference), and I have
the following settings:

Remote Host Name: admin:passwd@ipcam1
Remote Host Port: 80
Remote Host Path: /cgi/mjpg/mjpeg.cgi
Remote Image Colors: 24 bit color
Capture Width (pixels): 640
Capture Height (pixels): 480
Aressel
Posts: 2
Joined: Thu May 29, 2008 2:05 am
Location: Canada

Post by Aressel »

Here's a question,
Does anyone think that it would be possible to write a wrapper, such that it would be able to handle this sort of input, clean it up into a form that ZM can read, and rebroadcast it? I'm looking to run a heterogeneous camera system, so I don't really want to change the ZM code.

Someone did something similar for a different type of camera, http://d-austin.net/maxipcam.html. I tried editing the pertinent connection strings, but with no luck. It appears to connect, but cannot seem to make any sense of the stream. I'm not much of a programmer, so I can only look at the code and make some sense of it, but not make any major changes myself.
Thanks for any help,
Aressel
we4zonM
Posts: 56
Joined: Fri May 30, 2008 7:21 am

Try jpg stream!

Post by we4zonM »

I have a different camera, the Airlink101 AIC250, and I could not find the right settings to get it to work with the cgi video. The Zoneminder Wiki says you can get 10 fps with "/video.cgi" but I do not get any video with it! You have the cgi command manual, so see if there is a command to get a jpg and adjust your Zoneminder settings so that you tell ZM to stream jpg and use "ffmpeg" to encode it. For me, it meant changing the Monitor settings to use "host=<ip>", "path= /image.jpg" and setting the camera to have NO password and NO user, not even "admin". It did not work with the password protection with those settings. There may be a syntax to get it to work with password protection, I just have not found that in the documentation yet, if it is there.

Summary: Try jpg stream, use no password / username on camera, use ffmpeg, use jpg stream.

Downside: may get low fps (I get only 2 fps in 640x480). You must select the right resolution for your camera and the right color mode.
pen1010b
Posts: 2
Joined: Thu Sep 11, 2008 7:32 pm

new solution

Post by pen1010b »

It might be an old thread, but a solution is now possible with this, and has been tested with the newest .80 firmware.

http://[WEBCAMIP]/cgi/jpg/image.cgi

This will take a snapshot image, on my setup it seems to capture about 2 pictures/second..

It was kinda easy to find, as they released the GPL of of their linux setup...
Andi
Posts: 1
Joined: Sat Sep 13, 2008 2:45 pm

Post by Andi »

pen1010b,

Can I ask what settings you used?

I've installed ZM, set it up with my TV card without problems, but cannot access my Trendnet IP110 cameras.

Using that link direct in a browser I do get a picture, however, through ZM I just get an image placeholder.

Thanks!
User avatar
kp4djt
Posts: 224
Joined: Mon Jun 18, 2007 1:53 am
Location: Tampa, FL

Post by kp4djt »

That worked just fine for me, all I did was plug in the web cam address and off it took.

By way, I had to upgrade the software to get it to work but once that was done it works great.
Chuck Hast -- KP4DJT --
Web site www.wchast.com
ZM demo www.wchast.com/zm
Cal-G
Posts: 2
Joined: Wed Feb 04, 2009 9:17 pm

Post by Cal-G »

By way, I had to upgrade the software to get it to work but once that was done it works great.
Do you mean you upgraded the firmware on the TV-IP110 ?
If so, did you upgrade from build 37 to build 51 ?
Cal-G
Posts: 2
Joined: Wed Feb 04, 2009 9:17 pm

Post by Cal-G »

Hi

Trying to edit the zm_remote_camera.cpp as indicated above but can't find any such file:


]# find / -name zm_r*
/usr/share/zoneminder/www/zm_request_alarm.php
/usr/share/zoneminder/www/zm_request_event.php
/usr/share/zoneminder/www/zm_request_control.php
/usr/share/zoneminder/www/zm_request_stream.php
/usr/share/zoneminder/www/zm_request_status.php

what am i doing wrong ?
Post Reply