Author Topic: how to: use java ip camera in linuxmce with motion.  (Read 11485 times)

domotiqa.com

  • Guru
  • ****
  • Posts: 206
    • View Profile
    • home automation
how to: use java ip camera in linuxmce with motion.
« on: September 18, 2007, 04:17:15 pm »
hello and thank you for any help.

Waht is the process of making a java ip camera working ?? Was is the process for these applet for example:

camera ip:
192.168.100.20

applet:
<APPLET name="cvcs" CODEBASE="http://192.168.1.20:80/" CODE="xplug.class" WIDTH=160 HEIGHT=112>
            <param name="RemotePort" value=80>
            <param name="Timeout" value=5000>
            <param name="RotateAngle" value=0>
            <param name="PreviewFrameRate" value=2>
            <param name="DeviceSerialNo" value="">
</APPLET>

I had a look in gsd device and the ruby code of the getVideoFrame, without any result !!!
Thanks
« Last Edit: September 21, 2007, 09:28:36 am by gilles.cresci »
http://www.domotiqa.com - home automation

domotiqa.com

  • Guru
  • ****
  • Posts: 206
    • View Profile
    • home automation
Re: how to: use java ip camera in linuxmce.
« Reply #1 on: September 19, 2007, 03:32:14 pm »
I'm being crazy with this stuff !!!! I tried lots of things and no way to find good how to...

I tried
Monitor surveillance cameras: http://plutohome.com/wiki/index.php/Monitor_surveillance_cameras
Make a DCE Device in 5 minutes: http://wiki.linuxmce.org/index.php/Make_a_DCE_Device_in_5_minutes
gsd: http://wiki.linuxmce.org/index.php/GSD
device template: http://wiki.linuxmce.org/index.php/Device_Templates
surveillance camera: http://wiki.linuxmce.org/index.php/Surveillance_Cameras
monitor surveillance camera: http://wiki.linuxmce.org/index.php/Monitor_surveillance_cameras
Control regular A/V equipment: http://wiki.linuxmce.org/index.php/Control_regular_A/V_equipment
axis network camera: http://wiki.linuxmce.org/index.php/Axis_Network_Cameras
ip camera: http://wiki.linuxmce.org/index.php/IP_Cameras

I tried this:
http://forum.linuxmce.org/index.php?topic=2469.0

But I start to be borring not find anything !!! This camera is simple, and got both jpeg image and java applet, but no way to make it work !!!! I'm sure I'm close to the solution but can't figure it!!!

It's the same for translating the gui, I want to make it available in french but the tutorial are very short and no explicit !!
see: http://forum.linuxmce.org/index.php?topic=2558.0

Thank's for you time !!

http://www.domotiqa.com - home automation

darrenmason

  • Addicted
  • *
  • Posts: 529
    • View Profile
Re: how to: use java ip camera in linuxmce.
« Reply #2 on: September 20, 2007, 01:18:23 am »
I have only worked with local USB cameras, but I assume that IP cameras are controlled by Motion_wrapper as well?
If so, then maybe concentrate on getting your camera working with Motion first rather than any of teh linuxMCE stuff. If it works with Motion then it should work with linuxMCE - at least that is true for USB cameras.

bulek

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 909
  • Living with LMCE
    • View Profile
Re: how to: use java ip camera in linuxmce.
« Reply #3 on: September 20, 2007, 01:52:14 am »
Hi,

I've described briefly procedure to add IP camera under Motion wrapper (if that's what you want) - GSD based solution connects to it directly without Motion wrapper - but in this way you loose features of motion (recording, triggering security breaches, etc...)....

But that description only existed in Pluto Wiki, so I have transfer that part also to LMCE wiki - go ahead and take a look :

http://wiki.linuxmce.org/index.php/Motion

HTH,

regards,

Bulek.
Thanks in advance,

regards,

Bulek.

domotiqa.com

  • Guru
  • ****
  • Posts: 206
    • View Profile
    • home automation
Re: how to: use java ip camera in linuxmce.
« Reply #4 on: September 20, 2007, 09:18:08 am »
thank's two of you for helping, i start being crazy !!!
Right, I add motion interface, then make the gsd controled by the motion !
However there is this wiki page that explain how to create conf file threadX.conf and motion.conf !!

http://wiki.linuxmce.org/index.php/IP_Cameras

I will have a look
thanks both
http://www.domotiqa.com - home automation

bulek

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 909
  • Living with LMCE
    • View Profile
Re: how to: use java ip camera in linuxmce.
« Reply #5 on: September 20, 2007, 10:24:05 am »
thank's two of you for helping, i start being crazy !!!
Right, I add motion interface, then make the gsd controled by the motion !
However there is this wiki page that explain how to create conf file threadX.conf and motion.conf !!

http://wiki.linuxmce.org/index.php/IP_Cameras

I will have a look
thanks both
Forget that page, it's outdated... You just simply add Motion_Wrapper device and then add cameras as its child devices... All config files should be autocreated for you after reboot... If not post your problems and we will help...

Regards,

Bulek.
Thanks in advance,

regards,

Bulek.

domotiqa.com

  • Guru
  • ****
  • Posts: 206
    • View Profile
    • home automation
Re: how to: use java ip camera in linuxmce.
« Reply #6 on: September 20, 2007, 12:00:13 pm »
you was right, it's working, I put

netcam_url  http://192.168.0.20/VIDEO.CGI

in configuration field !!
However I would be great to make a driver with a java applet !!

I 'v got a little problem with floorplan, when I drag and drop the camera in floorplan wizard, I've got the camera on the MD, but When I click on it, I can't have the view button activ ??? Any idea? Is it beause it's controled by motion wrapper ???

thanks for your great help !!
http://www.domotiqa.com - home automation

domotiqa.com

  • Guru
  • ****
  • Posts: 206
    • View Profile
    • home automation
Re: how to: use java ip camera in linuxmce.
« Reply #7 on: September 20, 2007, 12:17:22 pm »

I 'v got a little problem with floorplan, when I drag and drop the camera in floorplan wizard, I've got the camera on the MD, but When I click on it, I can't have the view button activ ??? Any idea? Is it beause it's controled by motion wrapper ???
In fact I put camera instead of motion detector !

2 bugs!
1/ If I got many floorplan, if I click on one camera button, then not click on view button but on another floorplan, the camera button still display on other floorplan that I didn't drag n drop on it !!!
2/ I don't know if it's bug (I have to see how motion wrapper work), but If i'm on security disarmed, the alert still come when mouvemment are detected on the camera !!! Have to figure out why !!
http://www.domotiqa.com - home automation

domotiqa.com

  • Guru
  • ****
  • Posts: 206
    • View Profile
    • home automation
Re: how to: use java ip camera in linuxmce.
« Reply #8 on: September 20, 2007, 01:00:37 pm »
I fixed the second point going in admin site, there is "active sensor" where you can choose action for each mode !!!
http://www.domotiqa.com - home automation

domotiqa.com

  • Guru
  • ****
  • Posts: 206
    • View Profile
    • home automation
Re: how to: use java ip camera in linuxmce.
« Reply #9 on: September 21, 2007, 09:36:03 am »
Hello,

I still continue finding some solution for my need and digg in the http://www.lavrsen.dk/twiki/bin/view/Motion/MotionGuide website for info.
The parameters are:
http://www.lavrsen.dk/twiki/bin/view/Motion/MotionGuideGettingItRunning
http://www.lavrsen.dk/twiki/bin/view/Motion/MotionGuideBasicFeatures#Capture_Device_Options_The_Basic



1/ I'm looking for a way of making video recorded when motion detect it! I though it was in the motion field, putting 3 make it record but not find any video file.
2/ The worst is that when I change the action in "active sensor" for each mode, if I make just snapshot in disarmed mode then reload, then when I change mode to armed, alarm don't work at all like if the mode was still in disarmed ! Is there a way of showing the mode in the gui !! I tried some other conbination in the alctive sensor, but I got a probleme with the mode !!! shity ! because the threadx.conf is correct and motion.conf also for record when motion !
any help would be appreciate !
« Last Edit: September 21, 2007, 09:56:33 am by gilles.cresci »
http://www.domotiqa.com - home automation

bulek

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 909
  • Living with LMCE
    • View Profile
Re: how to: use java ip camera in linuxmce.
« Reply #10 on: September 21, 2007, 10:07:55 am »
...
1/ I'm looking for a way of making video recorded when motion detect it! I though it was in the motion field, putting 3 make it record but not find any video file.
Did you check /home/cameras tree. I have motion triggered and time-lapse videos in there...

2/ The worst is that when I change the action in "active sensor" for each mode, if I make just snapshot in disarmed mode then reload, then when I change mode to armed, alarm don't work at all like if the mode was still in disarmed ! Is there a way of showing the mode in the gui !! I tried some other conbination in the alctive sensor, but I got a probleme with the mode !!! shity ! because the threadx.conf is correct and motion.conf also for record when motion !
any help would be appreciate !
I don't quite understand all statements, but will try to respond. Integration with motion is not fully done. Actually only config files are auto generated from settings in admin page and then more or less motion works on its own. Communication happens only on few occasions :
- when LMCE needs snapshots it sends signal to motion and than motion_wrapper reads latest snapshots and send it back (view camera scenarios for instance)
- when motion is detected, then proper DCE messages are sent. In ThreadX.conf you have :

Quote
# sending pluto tripped on/off events on motion start/end
on_event_start /usr/pluto/bin/MessageSend 127.0.0.1 51 -1001 2 9 25 1
on_event_end /usr/pluto/bin/MessageSend 127.0.0.1 51 -1001 2 9 25 0
and that cause sensor tripped on and tripped off events that are sent to LMCE. Currently even motion http interface is not supported - I did all the work I could at that time, but now have no time to enhance it. But everone is welcome to rool sleeves up, I'll help as much as I can with internals and how to do it...

BTW, I think that you have current house status displayed on main page of Orbiter...

HTH,

regards,

Rob.
 
Thanks in advance,

regards,

Bulek.

domotiqa.com

  • Guru
  • ****
  • Posts: 206
    • View Profile
    • home automation
Re: how to: use java ip camera in linuxmce with motion.
« Reply #11 on: September 21, 2007, 12:09:16 pm »
than's you bulek your the best ;) !!!

you are wright, all videos are stores there in a particular way !!! However, will try to change the stored path in order to see it in the media directory if the link send to mobile phone still work !!

Thanks.

For the state, I though there as been in the gui display of the MD there should be on top banner the state. In fact my other problem is that the alert mpg video don't display when I change the parameters for disarmed mode (snapshot for example), and let security in armed mode. The disarmed mode is ok but armed don't show message as in scenario event 16 or 17 I don't remember !!
ps: also do you know why when security "breech " appears, a move or click of the mouse... don't turn off the display of the mpg file ???

thanks helping !
« Last Edit: September 21, 2007, 12:14:42 pm by gilles.cresci »
http://www.domotiqa.com - home automation

domotiqa.com

  • Guru
  • ****
  • Posts: 206
    • View Profile
    • home automation
Re: how to: use java ip camera in linuxmce with motion.
« Reply #12 on: September 21, 2007, 12:19:30 pm »
For the path I have to modify the "target dir value", I will try in the configuration field !
target dir value = /home/media/N°ofCamera

hoppe will not broke link with cellphone alert !!
http://www.domotiqa.com - home automation

domotiqa.com

  • Guru
  • ****
  • Posts: 206
    • View Profile
    • home automation
Re: how to: use java ip camera in linuxmce with motion.
« Reply #13 on: September 21, 2007, 01:02:31 pm »
In fact I will make a link I guess in the "/home/public/data/video" folder

1/ For my security mode problem, when I change mode, bellow alert, I have:
camera X (announce only), I guess it's the part of the problem. However I didn't check the monitor mode buton

2/And It don't display the state mode in top bar
http://www.domotiqa.com - home automation

domotiqa.com

  • Guru
  • ****
  • Posts: 206
    • View Profile
    • home automation
Re: how to: use java ip camera in linuxmce with motion.
« Reply #14 on: September 21, 2007, 01:16:37 pm »
I thing my problem was that I needed to reboot computer when change active sensor, reload and regen is not enough !!

For the state, in the top banner, I've got Ox and nothing else... will figure out why !
http://www.domotiqa.com - home automation