We have moved at community.getvera.com

Author Topic: How do I install a Foscam camera  (Read 552 times)

Offline Jim McGhee

  • Full Member
  • ***
  • Posts: 139
  • Karma: +5/-1
How do I install a Foscam camera
« on: October 03, 2018, 04:24:14 pm »
I can find several post of people saying their Foscam camera is working on openLuup but I can't find any posts that say step by step how to install it. It is a Foscam FI9828P.
I tried using the device/Create button using

D_DigitalSecurityCamera2.xml/D_DigitalSecurityCamera1.xml
I_FoscamHD.xml/I_openLuupCamera.xml/I_FoscamPTZ.xml

and all produce devices with no username or password fields and no URL variable.

As I recall, when I created this device on my VeraPlus, customer support had to tweak some stuff to make it work.  Unfortunately, I don't recall what/how.

Can someone please give me a "click this and type that" kind of instruction?

TIA
« Last Edit: October 03, 2018, 04:26:29 pm by Jim McGhee »

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: How do I install a Foscam camera
« Reply #1 on: October 04, 2018, 02:33:49 am »
Take a look at:

http://forum.micasaverde.com/index.php/topic,63465.msg356698.html#msg356698

openLuup now has its own implementation file for cameras.

If those instructions are not clear enough, we can go through it step by step.

You must be running a recent version.
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline Maegda

  • Customer Care
  • Global Moderator
  • Jr. Member
  • *****
  • Posts: 92
  • Karma: +2/-1
Re: How do I install a Foscam camera
« Reply #2 on: October 04, 2018, 08:20:45 am »
Hello Jim,

I may try to remotely add the camera once I have all the details, could you reply my email?

Thank you!
Vera Control, Ltd.  Smarter Home Control
support@getvera.com  +1 (866) 966-2272

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: How do I install a Foscam camera
« Reply #3 on: October 04, 2018, 08:31:59 am »
I may try to remotely add the camera once I have all the details, could you reply my email?

We're talking openLuup here, so I don't think you can!
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline Jim McGhee

  • Full Member
  • ***
  • Posts: 139
  • Karma: +5/-1
Re: How do I install a Foscam camera
« Reply #4 on: October 04, 2018, 10:51:39 pm »
Here's what I did so far.  I'd love to have your comments on this process.

1. Click the Device/Create button

2. Enter 'D_DigitalSecurityCamera1.xml' and 'I_openLuupCamera1.xml' for D_xxx.xml filename and I_xxx.xml filename

3. Click 'Save Changes' and reload the engine (Misc/'Reload Luup Engine') and refresh your browser

4. Go to Misc/'Lua Code Test' and enter the following 4 lines in the box:

   luup.attr_set ("username", "<Your user name>", <device#>)
   luup.attr_set ("password", "<Your password>", <device#>)
   luup.variable_set ("urn:micasaverde-com:serviceId:Camera1", "URL", "<Your snapshot commane>", <device#>)
   return true

(My snapshot command for the Foscam 9828 was "/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&amp;usr=<Your user name>&amp;pwd=<Your password>")
   
5. Click 'Submit' and Reload engine

6. Go to 'Attributes' and enter the ip of the camera including the port number and set category to 6

7. Reload Engine

After this, I get a single snapshot on the camera's control panel but AltUI doesn't seem to recognize this as a camera because it doesn't appear in the camera device dropdown in the 'Custom Pages Editor".

Will this let me access my PZT buttons and the presets in my Custom Pages?

Please let me know how I can improve this.

TIA

Edit:  Ok, it now shows in the Custom Pages camera device list.  Don't know why it wasn't working before, don't know why it is working now...
« Last Edit: October 05, 2018, 01:15:19 am by Jim McGhee »

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: How do I install a Foscam camera
« Reply #5 on: October 05, 2018, 05:50:45 am »
Glad you have it going.  You would need to use a different device file, IIRC, for a PZT camera...

...however, I've not implemented the commands in the implementation file yet.
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline Jim McGhee

  • Full Member
  • ***
  • Posts: 139
  • Karma: +5/-1
Re: How do I install a Foscam camera
« Reply #6 on: October 05, 2018, 03:29:48 pm »
Glad you have it going.  You would need to use a different device file, IIRC, for a PZT camera...

...however, I've not implemented the commands in the implementation file yet.

Maybe I misunderstood.  I was under the impression that the Vera Implementation files like I_FoscamHD.xml wouldn't work on openLuup.

On another note...
I started this thread because as I began creating new Custom Pages in openLuup to match the ones I have on my VeraPlus openLuup kept getting slower and slower.  I suspected this had something to do with adding 4 cameras to the pages.  I thought the large amount of camera data flowing through the bridge was overwhelming it.

I created the new camera devices to talk to the cameras without the bridge and much to my surprise, it was even slower still.
When I display the page with the cameras it updates them every second at first but if I click on 'Edit Pages' then immediately click back to 'Custom Pages' the whole openLuup bogs down to a standstill.
If I point the camera property to non-existent cameras, everything goes back to normal.
Is this to be expected?  Have I created the cameras improperly?
When I use the bridged cameras it works for a couple of days before it starts to slow down.  This makes no sense to me.
This all works fine on Vera but I'd really like to move as much as possible to openLuup.

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: How do I install a Foscam camera
« Reply #7 on: October 05, 2018, 03:46:32 pm »
If you're not using the DirectStreamingURL variable, then you're not doing it right.

If you rely on URL, then AltUI will repeatedly poll openLuup to synthesise a video stream. Four cameras would certainly bog things down.  DirectStreamingURL, on the other hand, will stream directly to the browser, with no load on openLuup at all.
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline amg0

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +210/-8
Re: How do I install a Foscam camera
« Reply #8 on: October 05, 2018, 06:31:03 pm »
If you're not using the DirectStreamingURL variable, then you're not doing it right.

If you rely on URL, then AltUI will repeatedly poll openLuup to synthesise a video stream. Four cameras would certainly bog things down.  DirectStreamingURL, on the other hand, will stream directly to the browser, with no load on openLuup at all.

Direct video streaming is also in altui options, it must be checked to enable it

Offline Jim McGhee

  • Full Member
  • ***
  • Posts: 139
  • Karma: +5/-1
Re: How do I install a Foscam camera
« Reply #9 on: October 05, 2018, 07:30:06 pm »
If you're not using the DirectStreamingURL variable, then you're not doing it right.
Glad to know I'm doing it wrong.   :)
I tried adding DirectStreamingURL as both
/cgi-bin/CGIStream.cgi?cmd=GetMJStream&usr=<username>&pwd=<passwd> and
/videostream.cgi?user=<username>&pwd=<passwd>
and neither got a picture on the device/control page. Was I supposed to blank out the URL variable or should it have both filled out?

And if amg0 means Options/'Show Video Thumbnail in Local mode' then yes, it is checked.

The variables list looks pretty sparse.  There's no Commands, Timeout or ModeSetting.  Shouldn't there be?
Don't know what else to try...   :(
Guess I can go back to a previous backup and create the cameras again.

Offline Jim McGhee

  • Full Member
  • ***
  • Posts: 139
  • Karma: +5/-1
Re: How do I install a Foscam camera (Solved)
« Reply #10 on: October 06, 2018, 02:32:20 pm »
 :) :) :) :) :) :)   MY FOSCAM FI9828P WORKS!!!   :) :) :) :) :) :)

Here was the problem.
On the Foscam firmware web page it lists:

V-2.x.1.120_p3    2018/5/17    2.83MB    Improved security.
V-2.x.1.120_p1    2018/5/17    2.5MB    Fixed the failure of fetching the MJ stream.
V-2.x.1.120       2017/07/07    8.7MB    Fixed some bugs.

I had previously installed V-2.x.1.120_p3 assuming (yes, I've heard that one) it to be an upgrade of V-2.x.1.120_p1 but it either doesn't include p1 or else it broke it again.

I simply downgraded (???) from p3 to p1 and now streaming works!!!
It even works on the VeraPlus!!

Just to recap, I am now using:
DirectStreamingURL   /cgi-bin/CGIStream.cgi?cmd=GetMJStream&usr=<username>&pwd=<password>
URL     /cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=<username>&pwd=<password>

and I also added 'username' and 'password' to the attributes.  Just like my previous post.

Hope this saves some from spending 4 days adding a Foscam FI9828P.
Now if I can just figure out the magic needed to stream my DLink cameras.  :-\ :-\ :-\