Author Topic: Foscam IP Camera Plugin  (Read 266306 times)

Offline Brientim

  • Sr. Hero Member
  • ******
  • Posts: 2497
  • Karma: +78/-7
Foscam IP Camera Plugin
« Reply #15 on: July 01, 2012, 01:55:02 pm »
Since I uploaded the new version of  D_DigitalSecurityCamera1.xml that MCVFlorin provided,  I now also have two copies of the  D_DigitalSecurityCamera1.xml  file listed.

The second copy of the camera is your system updating after the changes were put in place. You need to be patient and allow the changes to be written to memory and then the duplicate will disappear without your intervening. Whilst it is in this phase, it is best to to be doing anything on you system as this uses the resources that would otherwise be allocated to this task.

As identified in other post on this forum, if you have a Vera2 you can improve perform by logging to. USB and if required, set up an external swap file on a USB.

Offline mcvflorin

  • Administrator
  • Hero Member
  • *****
  • Posts: 1755
  • Karma: +11/-3
Re: Foscam IP Camera Plugin
« Reply #16 on: July 02, 2012, 05:47:23 am »
Wow, I didn't expect this much activity on this thread. :)

I have noticed that "Bypass" disables the motion detection in the Vera but leaves it on in the camera. I don't get email notifications from Vera but I still get the email alerts from the camera. Is there anyway to make the "Bypass" switch disable the motion detection in the camera itself?

It's possible to implement this, but Bypass and Arm have always been only for Vera devices and not for the real (physical) devices, so I won't change this.

I managed in no time to get the plugin working. Two weeks later, Vera 3 is now producing the error "Missing Vera IP address" although the Foscam camera is working well in Vera 3 UI5. Do you know why? I haven't change a thing.

That's because the plugin requires the Vera IP address or URL to configure the camera to send the alarm notifications to, and it failed to detect it based on the camera's IP address. You must enter the IP address or URL of the Vera in the camera's control panel, Advanced tab.

Installed the plug-in while running 1.5.407 and getting No Implementation of Arm/Bypass on the motion sensor, uploaded the new D_DigitalSecurityCamera1.xml anyway, but same scenario.

This I have to investigate.

I installed the plugin, uploaded the extra file, created the device and can see live video.
Can't use PTZ as it says "No Implementation".

what I did was:
- Apps - Install Apps - install Foscam IP Camera 2.0
- Apps - Develop Apps - Luup files - upload D_DigitalSecurityCamera1.xml (this file appears twice now in the list)
- Apps - Develop Apps - Create device - enter D_DigitalSecurityCamera1.xml as "upnp Device Filename" and Foscam as "Description"

I don't seem to have the StepSize, ReverseControls & VeraAddress Variables.
I also can't seem to find the Motion Sensor.

You must add I_FoscamPTZ.xml to the impl_file field on the Camera Advanced tab.

I have a Foscam FI8910W, and I also am not seeing the step size, reverse control, or Vera  address variables.

I cannot get the Activation Icon for my Foscam camera to indicate that the camera's motion sensor was tripped (activated). 

You add I_FoscamPTZ.xml to the impl_file field on the Camera Advanced tab.

I added I_FoscamPTZ.xml to the impl_file field on the Motion Sensor Advanced tab.  It appeared to have no effect.  Is this field needed at this time?

I don't recommend this because the motion sensor will have the same startup code as the camera and it's possible you'll get some errors.

Email images are being sent.  However, the source of the emails is the camera, not the motion sensor module.

That's normal, the motion sensor is a child device of the camera.

If I change the "Controlled via" from the parent camera to Vera (or some other parent), the Motion Sensor device for that camera disappears from the UI5 interface.  The only way I could restore the lost motion sensor device was to Restore the system from a previous backup.

I don't recommend changing the Controlled via parameter. This can cause the Luup engine on your Vera to enter a restart loop if you make a wrong change.


Offline mcvflorin

  • Administrator
  • Hero Member
  • *****
  • Posts: 1755
  • Karma: +11/-3
Re: Foscam IP Camera Plugin
« Reply #17 on: July 02, 2012, 05:55:17 am »
The reason there are two copies of the D_DigitalSecurityCamera1.xml file listed is because this file is found both in /etc/cmh-lu and /etc/cmh-ludl. All the uploaded files go in /etc/cmh-ludl. If you click any of the files, the one in /etc/cmh-ludl will always be displayed. There were plans to update the script that displays the files, but this was never implemented.

The only difference between the existing file and the one you upload is this: the file you upload contains the XML tag <handleChildren>1</handleChildren>. This means that all the actions used by the child devices of the camera will use the implementation from the camera.

Offline Grain

  • Sr. Newbie
  • *
  • Posts: 41
  • Karma: +0/-0
Re: Foscam IP Camera Plugin
« Reply #18 on: July 02, 2012, 06:20:08 am »
thanks a lot for your reply mcvflorin!
adding I_FoscamPTZ.xml to the impl_file field on the Camera Advanced tab made the fields show up, PTZ control is enabled and the Motion Sensor shows up.

gonna play some more with this during the following days, thanks again!

Offline napolitano172

  • Jr. Member
  • **
  • Posts: 65
  • Karma: +0/-0
Re: Foscam IP Camera Plugin
« Reply #19 on: July 02, 2012, 12:05:32 pm »
I finally got around to updating this today and it is great!

Do have a question though.  I have alarm sensors and they change from green to red back to green when motion is detected.  This device started out green and then went to red and stays red.  I have not been able to get it to change back to a green - no motion state.

Interesting enough though, I asked the Vera 3 unit  to take a picture when the motion sensor detected motion and it only takes a picture when motion is sensed, regardless of what the sensor device is actually showing.  So it appears to be working correctly, just not representing correctly within the Foscam Motion Sensor device itself.  This is within Vera 3 Firmware 1.5.346.

I also have a Vera 2 running on UI4 and it installed great and works on that unit as well, but again once tripped it doesn't seem to reset.

Played with the ontime to seem if that would reset the sensor but didn't seem to do anything.

I'm sure I must be missing something, any help would be great.

Offline silvereagle2208

  • Full Member
  • ***
  • Posts: 118
  • Karma: +0/-0
Re: Foscam IP Camera Plugin - Additional question
« Reply #20 on: July 02, 2012, 12:11:41 pm »
@mcvflorin,

Thank you for the prompt reply.  There is a great deal of activity on this thread because tying Remote Cameras to Vera is very important to a large number of MCV customers.

I had many questions over the weekend.  After your email, I think I now where to begin to resolve them.
The first thing that I need to be do is to provide the MAC address and the IP address of the Vera Unit on the Camera Motion Sensor Advanced tab.  This is not intuitive, because in the Advanced tab of the Camera model, you want the MAC address and IP address of the camera itself.  The field names are the same, but the information they require is very different.  Would it be possible to provide different names for these fields to minimize confusion?

Under this set of circumstances, the id_parent field in the Camera Motion Sensor Advanced tab is critical because it is the only way that Vera knows the Camera parent of the Motion Sensor child.

I have a question regarding the new Camera Motion Sensor and emails: Do I use the Notifications tab of the Camera Sensor Device to tell Vera where to send emails in case the Camera Motion Sensor is tripped?

« Last Edit: July 02, 2012, 12:36:27 pm by silvereagle2208 »

Offline JOD

  • Hero Member
  • *****
  • Posts: 1973
  • Karma: +4/-0
Re: Foscam IP Camera Plugin
« Reply #21 on: July 02, 2012, 04:11:02 pm »
Quote
Interesting enough though, I asked the Vera 3 unit  to take a picture when the motion sensor detected motion and it only takes a picture when motion is sensed, regardless of what the sensor device is actually showing
When I looked at this yesterday, this appeared to be a one way street, once the plugin enables the motion notification within the camera, setting the UI motion detector to Bypass only disengages Vera's trigger part, motion detection is still enabled on the camera.

@mcvflorin, presets 1 - 6 work great, any plans on adding 7 & 8 to the device?
Also, I'm sure users will be asking for the presets to be added into automation, so that triggers can move the camera to a preset.
I'm sorry, my responses are limited. You must ask the right questions.

Offline Trotsky40

  • Full Member
  • ***
  • Posts: 125
  • Karma: +4/-0
Re: Foscam IP Camera Plugin
« Reply #22 on: July 02, 2012, 05:05:46 pm »
Do have a question though.  I have alarm sensors and they change from green to red back to green when motion is detected.  This device started out green and then went to red and stays red.  I have not been able to get it to change back to a green - no motion state.

I have noticed the same thing. I started having the problem after I adjusted the "Ontime" setting down to 10 minutes (600 seconds). For almost a day, none of the motion sensor went green although they continued to correctly register motion ("last trip" time updated and I got photos both through the Vera and the camera). Now they have started registering both tripped and not tripped (system reboot?), but the "Ontime" is still at 20 minutes even thought I changed it to 10 minutes.
Vera Plus- A wide variety of z-wave devices, a few zigbee devices, Sonos, and Phillips Hue bulbs via Hue Bridge.

Offline silvereagle2208

  • Full Member
  • ***
  • Posts: 118
  • Karma: +0/-0
Re: Foscam IP Camera Plugin
« Reply #23 on: July 03, 2012, 12:16:51 am »
@mcvflorin

Should there be any values entered for the ip and mac fields of the Foscam Motion Sensor Advanced tab? Also, could you provide .jpg's that show sample entries for the entire Camera and Motion Sensor Advanced tabs fields for dthe Foscam Camera app?  The sample .jpg's that you have provided thus far do no show the full Advanced settings and I wonder if I am missing values or if I have values in the wrong locations.

I have not been able as yet to get the new Camera Motion Sensor to work.  The camera works fine, but the Motion Sensor is still not functional.


Offline mcvflorin

  • Administrator
  • Hero Member
  • *****
  • Posts: 1755
  • Karma: +11/-3
Re: Foscam IP Camera Plugin
« Reply #24 on: July 03, 2012, 06:41:06 am »
Do have a question though.  I have alarm sensors and they change from green to red back to green when motion is detected.  This device started out green and then went to red and stays red.  I have not been able to get it to change back to a green - no motion state.

That's probably because the camera sent motion notifications at time intervals less than 20 minutes.

Played with the ontime to seem if that would reset the sensor but didn't seem to do anything.

There was a bug in the plugin: the OnTime value was only initialized, but never read. I fixed it in the new version which I just published.

@silvereagle2208

The camera IP and address can be entered either in the camera's Settings tab or in the Advanced tab, in the ip and mac fields. The Vera's IP address must be entered in the VeraAddress field.

@mcvflorin, presets 1 - 6 work great, any plans on adding 7 & 8 to the device?
Also, I'm sure users will be asking for the presets to be added into automation, so that triggers can move the camera to a preset.

I added presets 7 & 8. Just upload the attached Json and reload Luup. Presets can be used in scenes only from the Advanced section. The action to be used is GoToPreset.
« Last Edit: July 03, 2012, 08:34:43 am by mcvflorin »

Offline mcvflorin

  • Administrator
  • Hero Member
  • *****
  • Posts: 1755
  • Karma: +11/-3
Re: Foscam IP Camera Plugin
« Reply #25 on: July 03, 2012, 06:44:20 am »
Should there be any values entered for the ip and mac fields of the Foscam Motion Sensor Advanced tab?

No.

Also, could you provide .jpg's that show sample entries for the entire Camera and Motion Sensor Advanced tabs fields for dthe Foscam Camera app?

I attached images with the camera Settings and Advanced tabs.

Offline silvereagle2208

  • Full Member
  • ***
  • Posts: 118
  • Karma: +0/-0
Re: Foscam IP Camera Plugin
« Reply #26 on: July 03, 2012, 01:30:02 pm »
@mcvflorin

My Foscam Camera device Advanced tab is quite different from yours.  It appears that all the debugging work I did on the Foscam app did not do it any favors.  I have attached images of the Advanced Tab for my Foscam camera.  Do you have any ideas what I can do to make my Foscam Advanced tab look more like yours or does it matter?

Offline mcvflorin

  • Administrator
  • Hero Member
  • *****
  • Posts: 1755
  • Karma: +11/-3
Re: Foscam IP Camera Plugin
« Reply #27 on: July 04, 2012, 03:26:14 am »
Your camera's Advanced tab looks OK. My device was manually created for screenshots purpose, that's why it lacks several fields.

Offline knewmania

  • Sr. Member
  • ****
  • Posts: 255
  • Karma: +0/-0
Re: Foscam IP Camera Plugin
« Reply #28 on: July 04, 2012, 03:19:56 pm »
Updated my Foscam's with the new plugin today. Everything is working well. Thanks for the enhancements!
Vera 2. UI 1.5.622 / Vera 3. UI 1.7.760

Offline silvereagle2208

  • Full Member
  • ***
  • Posts: 118
  • Karma: +0/-0
Re: Foscam IP Camera Plugin
« Reply #29 on: July 04, 2012, 06:06:51 pm »
@mvcflorin

If my advanced tab looks OK and the Motion Sensor of the Foscam module does not appear to work for any of my five cameras (3 Linksys WVC80N and 2 Foscam FI8910W), what would your recommend as a next step?  Would it make sense to remove a couple of the cameras and let Vera refind them?