Premise cheap generic ip camera that works with premise?

Motorola Premise

etc6849

Senior Member
i noticed on the wiki page that premise supports the following cameras:
Axis
Leadtek
Panasonic
Generic IP camera

what module do I use to set up such a "generic ip camera"? Also, if you were to buy a "best value" ethernet based camera, which model/brand would it be (i'd also be interested in night vision too)? Will any of the newer panasonic ip based cameras work with premise? Will I be able to view the camera through the autmoation browser from anywhere in the world? Also, any chance there is a plug in that detects motion by analyzing video? I'm guessing premise can't record video on motion detection?

thanks in advance ;)
 
Premise Browser uses web-standards (HTML, JavaScript, etc) so you can display whatever you want, such as images from an IP camera, within an IFRAME. The WebFrames module provides a simple interface for displaying any URL within Premise Browser (it uses an IFRAME).

Refer to this post for information about the WebFrames module. It also refers to a module specifically designed to handle D-Link cameras but can be easily adapted for other brands.

If you review WebFrames, and the D-Link module, it'll give you a good idea on how to create one for whatever camera you choose.

Premise doesn't have video-recording nor video-analysis capabilities.
 
thanks. it appears the i ended up buying a d-link dcs-920. I have it set up and I'm able to navigate to the camera's webpage behind and outside of my firewall (using dyndns.org).

however, i get a grey screen when i try to use the dlink module...

if I understand you correctly, I need to replace the applet settings below with an html iframe tag?

the code the dlink module uses is:
if not sysevent.ClientSession is nothing then
dim iW,iH,strAddr,iPort,strHeader

iW = 320
iH = 240
strAddr = ""
iPort = 0
strHeader = ""

if not this.DefaultMode is nothing then
iW = this.DefaultMode.width
iH = this.DefaultMode.height
end if

if sysevent.ClientSession.ClientContext = "Internet" then
strHeader = "External "
strAddr = this.ExternalAddress
iPort = this.ExternalPort
else
strHeader = "Internal "
strAddr = this.Address
iPort = this.Port
end if

if strAddr = "?.?.?.?" or strAddr = "" then
strOutput = "<CENTER><font color=white>" & strHeader & "IP Address not defined!</font></CENTER>"
else
'output java applet
strOutput = "<CENTER>"
strOutput = strOutput & "<APPLET name=" & chr(34) & "cvcs" & chr(34) & " CODEBASE=" & chr(34) & "http://" & strAddr & ":" & iPort & "/" & chr(34) & " CODE=" & chr(34) & "xplug.class" & chr(34) & " WIDTH=" & iW & " HEIGHT=" & iH & ">"
strOutput = strOutput & "<param name=" & chr(34) & "RemotePort" & chr(34) & " value=80>"
strOutput = strOutput & "<param name=" & chr(34) & "Timeout" & chr(34) & " value=5000>"
strOutput = strOutput & "<param name=" & chr(34) & "RotateAngle" & chr(34) & " value=0>"
strOutput = strOutput & "<param name=" & chr(34) & "PreviewFrameRate" & chr(34) & " value=2>"
strOutput = strOutput & "<param name=" & chr(34) & "DeviceSerialNo" & chr(34) & " value=" & chr(34) & chr(34) & ">"
strOutput = strOutput & "</APPLET>"
strOutput = strOutput & "</CENTER>"
end if

method.RenderHTML = strOutput
end if
 
a closer look reveals the following issues with the dlink module:

this line:
strOutput = strOutput & "<param name=" & chr(34) & "RemotePort" & chr(34) & " value=80>"

should specify the input port, not always 80 (i set my port setting for the camera to something weird instead of 80).

Also, this line:
strOutput = strOutput & "<param name=" & chr(34) & "DeviceSerialNo" & chr(34) & " value=" & chr(34) & chr(34) & ">"

MUST specify the serial number of the camera! (atleast the model I have requires you to know the camera's serial number, else you only see a white page...)

FYI: for other non programers like me:
To figure out what the parameters should be, I opened the camera's website and viewed source after displaying the video. Look for the code surrounded by APPLET. I'm assuming IFRAME works the sameway as the APPLET tag?
 
... i get a grey screen when i try to use the dlink module...
... I need to replace the applet settings below with an html iframe tag?
No.

The D-Link module was written several years ago and designed for use with a Java applet supplied by D-Link (transparently delivered by the camera). I have no idea if the current generation of D-Link camera uses a Java applet. If it does, then the applet may take different parameters than what is described in the module. Some experimentation is required ...
 
... I'm assuming IFRAME works the sameway as the APPLET tag?
IFRAME and APPLET are different plus APPLET has been deprecated in favour of the OBJECT tag.

Try this:
  1. View the D-Link camera using IE8.
  2. Use IE8's "Page> View Source" to see the web-page's HTML tags (IFRAME? OBJECT? APPLET?).
  3. Modify the D-Link module using the tag found in step 2.
 
Thanks 123. I also tried out a linksys camera WVC54GCA. It turns out the linksys uses the "Object" tag. The neat thing about the linksys is the activex control includes a mic so I can also listen into the other room and it costs $99 at most places.

Does this mean all that is needed for audio/video communication between rooms is a PA system? I wonder if cameras are made that also have speakers built in with a similar activex control? This could be a great PA system in my opinion.

FYI for other newbies like me, I added the following code; replace YOUR CAMERA ADDRESS:PORT with your cameras ip address:port.

strOutput = "<object classid=" & chr(34) & "clsid:7B133798-FAA8-4A7e-950D-BEB35D3363AF" & chr(34) & "CODEBASE=" & chr(34) & "LinksysViewer.cab#Version=2,0,0,16" & chr(34) & "id=" & chr(34) & "LinksysViewer" & chr(34) & "width=" & chr(34) & "505" & chr(34) & "height=" & chr(34) & "415" & chr(34) & ">"
strOutput = strOutput + "<param name=" & chr(34) & "Text" & chr(34) & "value=" & chr(34) & "http://YOUR CAMERA ADDRESS:PORT/img/video.asf IE" & chr(34)& ">"
strOutput = strOutput + "<param name=" & chr(34) & "BackColor" & chr(34) & "value=" & chr(34) & "0" & chr(34) & ">"
strOutput = strOutput + "<param name=" & chr(34) & "_Version" & chr(34) & "value=" & chr(34) & "65536" & chr(34) & ">"
strOutput = strOutput + "<param name=" & chr(34) & "_ExtentX" & chr(34) & "value=" & chr(34) & "11774" & chr(34) & ">"
strOutput = strOutput + "<param name=" & chr(34) & "_ExtentY" & chr(34) & "value=" & chr(34) & "6562" & chr(34) & ">"
strOutput = strOutput + "</object>"
method.RenderHTML = strOutput

... I'm assuming IFRAME works the sameway as the APPLET tag?
IFRAME and APPLET are different plus APPLET has been deprecated in favour of the OBJECT tag.

Try this:
  1. View the D-Link camera using IE8.
  2. Use IE8's "Page> View Source" to see the web-page's HTML tags (IFRAME? OBJECT? APPLET?).
  3. Modify the D-Link module using the tag found in step 2.
 

Attachments

  • linksys_activeXcontrol.JPG
    linksys_activeXcontrol.JPG
    78.6 KB · Views: 62
Nice job!

If you are using a modified version of the D-Link module, you can reduce the top margin (i.e. move the camera image higher) by adding a DIV with a STYLE tag and appropriate parameters. For example, here's what you need to change in the RenderHTML function:

Code:
	' >>> Next line was added
	strOutput = "<div STYLE=""Position:absolute;Left:7px;Top:-30px;Color:#FFFFFF;width:95%;font-family:Tahoma;font-size:14pt;font-weight:bold;text-align:center;padding-top:2px;border-style:inset;border-color:#A9A9A9;Overflow:auto;"">"

	if strAddr = "?.?.?.?" or strAddr = "" then
		' >>> Next line was modified
		strOutput = strOutput & strHeader & "IP Address not defined!"
	else
		'output java applet
		' >>> Next line was modified
		strOutput = strOutput & "<CENTER>"
		strOutput = strOutput & "<APPLET name=" & chr(34) & "cvcs" & chr(34) & " CODEBASE=" & chr(34) & "http://" & strAddr & ":" & iPort & "/" & chr(34) & " CODE=" & chr(34) & "xplug.class" & chr(34) & " WIDTH=" & iW & " HEIGHT=" & iH & ">"
		strOutput = strOutput & "<param name=" & chr(34) & "RemotePort" & chr(34) & " value=80>"
		strOutput = strOutput & "<param name=" & chr(34) & "Timeout" & chr(34) & " value=5000>"
		strOutput = strOutput & "<param name=" & chr(34) & "RotateAngle" & chr(34) & " value=0>"
		strOutput = strOutput & "<param name=" & chr(34) & "PreviewFrameRate" & chr(34) & " value=2>"
		strOutput = strOutput & "<param name=" & chr(34) & "DeviceSerialNo" & chr(34) & " value=" & chr(34) & chr(34) & ">"
		strOutput = strOutput & "</APPLET>"
		strOutput = strOutput & "</CENTER>"
	end if

	' >>> Next line was added
	strOutput = strOutput & "</div>"

Note that the "Top" parameter is a negative value and will move the image higher within the web-page. To get an idea of what the STYLE tag's parameters do, tweak each value and then refresh Premise Browser to see the resulting effect.

For example, "border-style:inset;border-color:#A9A9A9;Overflow:auto;" will create a dark gray, inset border around the image and display scroll bars only if the contents exceed the viewable space. It is all just standard CSS stuff and well-documented on several web sites.

If you are using the Webframes module and you wish to reduce the top margin, go to Modules > Plugins > Selectors > Webframes and locate the "Top" property in the CSS section. Change the "Top" property to a negative value and the embedded image will be displayed higher on the page (see the attached image).
 

Attachments

  • Webframes_Selector.jpg
    Webframes_Selector.jpg
    83.2 KB · Views: 34
Thanks 123, I really appreciate all of your help. I didn't know about the stuff below, so I will definitely implement it when I get back home :icon_pai:

One thing that I was wondering is this:

if I download the inf and ocx files from the camera's cab files, I can place similar html code in a file in the same directory as the folder containing the ocx and inf files and I'm able to run the page from my desktop in it's entirety. Right now with premise, I'm relying on the camera giving out the activex ocx file.

So my question is where would I paste the folder containing the ocx and inf file within premise if I'm using the modified camera driver? is there some sort of root web directory under program files that I am missing?

Also, webframes didn't work for me. After I install it and script tools, I run the install macro. Next, I browse to the media folder in premise building and I don't see any option called webframes when I right click. I do see something called Internet content provider, but I thought that was there before I installed webframes. Am I using a non working version or somthing? I got the file from the old forums following your link.

Nice job!

If you are using a modified version of the D-Link module, you can reduce the top margin (i.e. move the camera image higher) by adding a DIV with a STYLE tag and appropriate parameters. For example, here's what you need to change in the RenderHTML function:

Code:
	' >>> Next line was added
	strOutput = "<div STYLE=""Position:absolute;Left:7px;Top:-30px;Color:#FFFFFF;width:95%;font-family:Tahoma;font-size:14pt;font-weight:bold;text-align:center;padding-top:2px;border-style:inset;border-color:#A9A9A9;Overflow:auto;"">"

	if strAddr = "?.?.?.?" or strAddr = "" then
		' >>> Next line was modified
		strOutput = strOutput & strHeader & "IP Address not defined!"
	else
		'output java applet
		' >>> Next line was modified
		strOutput = strOutput & "<CENTER>"
		strOutput = strOutput & "<APPLET name=" & chr(34) & "cvcs" & chr(34) & " CODEBASE=" & chr(34) & "http://" & strAddr & ":" & iPort & "/" & chr(34) & " CODE=" & chr(34) & "xplug.class" & chr(34) & " WIDTH=" & iW & " HEIGHT=" & iH & ">"
		strOutput = strOutput & "<param name=" & chr(34) & "RemotePort" & chr(34) & " value=80>"
		strOutput = strOutput & "<param name=" & chr(34) & "Timeout" & chr(34) & " value=5000>"
		strOutput = strOutput & "<param name=" & chr(34) & "RotateAngle" & chr(34) & " value=0>"
		strOutput = strOutput & "<param name=" & chr(34) & "PreviewFrameRate" & chr(34) & " value=2>"
		strOutput = strOutput & "<param name=" & chr(34) & "DeviceSerialNo" & chr(34) & " value=" & chr(34) & chr(34) & ">"
		strOutput = strOutput & "</APPLET>"
		strOutput = strOutput & "</CENTER>"
	end if

	' >>> Next line was added
	strOutput = strOutput & "</div>"

Note that the "Top" parameter is a negative value and will move the image higher within the web-page. To get an idea of what the STYLE tag's parameters do, tweak each value and then refresh Premise Browser to see the resulting effect.

For example, "border-style:inset;border-color:#A9A9A9;Overflow:auto;" will create a dark gray, inset border around the image and display scroll bars only if the contents exceed the viewable space. It is all just standard CSS stuff and well-documented on several web sites.

If you are using the Webframes module and you wish to reduce the top margin, go to Modules > Plugins > Selectors > Webframes and locate the "Top" property in the CSS section. Change the "Top" property to a negative value and the embedded image will be displayed higher on the page (see the attached image).
 
The camera plugins you've described (ocx, inf, etc) are support files used by Internet Explorer to render the camera's user-interface and video-image. Premise does not manage the delivery of these files and has no place to store them. The ocx will be dynamically delivered whenever IE attempts to access the camera. This should not affect your customized camera driver.

Upon installation, Webframes creates a Media folder ... but there's a bug in Builder. Builder fails to display new Media folders that are created programmatically. You need to restart Builder to refresh the list of Media folders; open Builder again and you should see the Media > Webframes folder.

PS
Ensure the ScriptTools module is listed before the WebFrames module (and other modules written by Rob Brun). If it isn't, just drag it higher up in the treeview. When Premise boots up, it reads the modules in the order they are listed in the Modules treeview. It needs to read the functions defined in ScriptTools before it encounters modules that use these functions.
 

Attachments

  • Module_Order.png
    Module_Order.png
    16.1 KB · Views: 28
thanks 123. a reboot and moving script tools did the trick. i think webframes looks handy. as always premise modules are reliable when you know what you are doing ;) i'll have to remember these little tricks of yours.
 
I needed to modify the WVC54G xdo to work with the WVC11B - I took the code from the view source on the web cam image from IE:

Code:
<object classid="clsid:1D9EFA3B-4E85-41A8-9092-14012CD447C9" CODEBASE="img/NetCamPlayerWeb.ocx#Version=1,0,3,3" id="NetCamPlayerWeb1" WIDTH=320 HEIGHT=240>
 
<param name="_Version" value="65536">
 
<param name="_ExtentX" value="11774">
 
<param name="_ExtentY" value="6562">
 
<param name="_StockProps" value="0">
 
</object></td>

then modified it to this:


Code:
		'output java applet
	strOutput = "<div STYLE=""Position:absolute;Left:7px;Top:-70px;Overflow:auto;"">"
	strOutput = strOutput + "<object classid=" & chr(34) & "clsid:1D9EFA3B-4E85-41A8-9092-14012CD447C9" & chr(34) & "CODEBASE=" & chr(34) & "/img/NetCamPlayerWeb.ocx#Version=1,0,3,3"  & chr(34) & "id=" & chr(34) & "NetCamPlayerWeb1"  & chr(34) & "width=" & chr(34) & iW & chr(34) & "height=" & chr(34) & iH & chr(34) & ">"
	strOutput = strOutput + "<param name=" & chr(34) & "Text" & chr(34) & "value=" & chr(34) & "http://" & strAddr & ":" & iPort & "/img/video.asf  IE" & chr(34)& ">" 				  
	strOutput = strOutput + "<param name=" & chr(34) & "BackColor" & chr(34) & "value=" & chr(34) & "0" & chr(34) & ">"
	strOutput = strOutput + "<param name=" & chr(34) & "_Version" & chr(34) & "value=" & chr(34) & "65536" & chr(34) & ">"
	strOutput = strOutput + "<param name=" & chr(34) & "_ExtentX" & chr(34) & "value=" & chr(34) & "11774" & chr(34) & ">"
	strOutput = strOutput + "<param name=" & chr(34) & "_ExtentY" & chr(34) & "value=" & chr(34) & "6562" & chr(34) & ">"
	strOutput = strOutput + "</object>"
	strOutput = strOutput & "</div>"
	end if

All I get is a lovely white screen with AB....ideas?
 
You should inspect the HTML code that your script generates. When viewing the white screen, press F5 to refresh the page (you'll still get a white screen), and then use IE's View Source command. Look for missing double-quotes or other punctuation problems that might render the HTML invalid.

FWIW, instead of chr(34) I use two double-quotes in order to insert a single literal double-quote in the generated HTML.

For example, the following two lines of code will produce the same result.
"<param name=" & chr(34) & "BackColor" & chr(34) & "value="
"<param name=""BackColor"" value="

Result:
<param name="BackColor" value=
 
Back
Top