Foscam IP Camera Plugin

I just finished tweaking the Foscam plugin version 2.0 and written some documentation. Now it has support for motion sensor and presets. It should work for both UI4 and UI5. Presets are supported only in firmware versions starting with 1.5.390.

The documentation is here:
http://code.mios.com/trac/mios_foscam-camera

Note: On firmwares older than 1.5.390 arming and bypassing the motion sensor won’t work unless you upload this file on Vera. After you upload the file, you must reload the Luup engine.

Edit: By the way, those who don’t like the new version can get the old one here: / – VistaCam PT&HD IP Cameras

Edit no.2: I updated the documentation with instructions for getting presets support in post 1.5.390 firmwares.

Edit no.3: It seems that the updated camera interface with 8 preset buttons didn’t make it into the beta release. I attached the updated file. Upload it on Apps >> Develop Apps >> Luup Files and reload Luup after uploading.

The updated plug-in installed this morning. The new motion sensor appeared, it auto-detected my Vera IP, etc.

However, when I click on “Arm” or “Bypass” on the sensor I get a “No Implemention” warning pop-up. Have I missed something in the set-up?

The sensor defaulted to “Arm” but unfortunatly I am not at home to test to see if it is acutally working.

I have a Vera Lite with FW 1.5.346 and am using a Foscam FI8910W.

Thanks,

@Trotsky40

Yeah, I forgot about this. See the note in the first post.

Thanks. I can confirm the motion sensor plug-in works well (my wife is working from home). The plug-in also turned on the the email function in the camera (it emails me five or six photos when motion is detected, set-up seperately directly through the camera). This is an added bonus as I was just expecting the motion trigger email from the Vera unit.

Now I just need to install the other file to turn it off :smiley:

Great, my Foscam has been pretty unstable using other device files. (generic ipcam plugin)

but, I feel kind of silly not knowing how to install this device by hand on UI4. Could you please provide me with some instructions…

I can’t say about UI4 but these instructions worked like a champ on UI5:

[url=http://forum.micasaverde.com/index.php/topic,10599.msg77991.html#new]http://forum.micasaverde.com/index.php/topic,10599.msg77991.html#new[/url]

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?

[quote=“mcvflorin, post:1, topic:171931”]I just finished tweaking the Foscam plugin version 2.0 and written some documentation. Now it has support for motion sensor and presets. It should work for both UI4 and UI5. Presets are supported only in firmware versions starting with 1.5.390.

The documentation is here:
http://code.mios.com/trac/mios_foscam-camera

Note: On firmwares older than 1.5.390 arming and bypassing the motion sensor won’t work unless you upload this file on Vera. After you upload the file, you must reload the Luup engine.

Edit: By the way, those who don’t like the new version can get the old one here: / – VistaCam PT&HD IP Cameras

Dear mcvflorin,

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.

Regards Johan

@mcvflorin

Is it possible to specify an existing NAS based FTP server for the resulting pictures/videos to be written to? Currently have it specified in all 14 cameras. Would like it to be in vera so I have the capability of applying conditions to it.

[quote=“ehillis, post:9, topic:171931”]@mcvflorin

Is it possible to specify an existing NAS based FTP server for the resulting pictures/videos to be written to? Currently have it specified in all 14 cameras. Would like it to be in vera so I have the capability of applying conditions to it.[/quote]

This has been asked several times. You’ll need to use luup code to save the image to the ftp server. If you do a search, you’ll be able to find a thread or two regarding your question.

  • Garrett

@garretwp

I’ve already read all the postings for writing the video/pictures from within Vera, and they were enlightening, but opted for using the built in features of the Foscam cameras to capture the video/pictures to a FTP server. My suggestion was to add additional function to vera that wouldn’t have to be maintained by the user in future releases of the product. A half century of IT experience has taught me to avoid custom code if at all possible, a lot of it self inflicted.

Unless MCV add this option, adding custom code is the only way to go. I understand what you are saying as I am to in the IT industry working with some of the most powerful computers in the world. Custom code can get messy. I would suggest that you open a feature request over at bugs.mios.com.

  • Garrett
[b]Note:[/b] On firmwares older than 1.5.390 arming and bypassing the motion sensor won't work unless you upload...
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.

I feel kinda silly but can’t figure it out…

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”.

Vera 2 1.5.346
Foscam FI8918W

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.

any tips are appreciated…

btw. thanks mcvflorin for updating this plugin!

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

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.

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

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?

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

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.

@Trotsky40
I do not agree with your request that if you set the BYPASS mode on the new Vtera Foscam Motion Sensor device that you want it to turn of Motion Capture on the parent IP camera as well. I regard the camera motion detection as my baseline. I do not want Vera to override my baseline. At most, I want Vera to supplement my camera baseline. If you want a button on the Foscam Motion Sensor tab to override the camera motion detection, then there needs to be 3 buttons: Armed, Bypass, Turn Off Parent Camera Motion Capture. This new motion module is still too experimental. I also consider it to be somewhat unnecessary, since I feel the prime location where camera motion capture should be Enabled/Disabled should be on the camera itself, with Vera providing supplemental functionality.

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.

Wow, I didn’t expect this much activity on this thread. :slight_smile:

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.

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.

This I have to investigate.

[quote=“Grain, post:14, topic:171931”]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.[/quote]

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

[quote=“silvereagle2208, post:15, topic:171931”]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). [/quote]

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

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.

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

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.

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 1. This means that all the actions used by the child devices of the camera will use the implementation from the camera.

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!

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.