We have moved at community.getvera.com

Author Topic: Automatically controlling a Foscam  (Read 4947 times)

Offline mbairhead

  • Hero Member
  • *****
  • Posts: 516
  • Karma: +5/-2
Automatically controlling a Foscam
« on: December 20, 2010, 07:36:16 pm »
We have a cam in our family room that is on a timer that turns on when we are at work and off when we get home. What I'm wondering is, is it possible to have the cam automatically point up or rotate around to the wall before the outlet turns off? It kinda freaks people out if they see it so having the lens pointing away would help.

Offline shady

  • Hero Member
  • *****
  • Posts: 1331
  • Karma: +11/-0
  • This monkey knows his Window Coverings!
Re: Automatically controlling a Foscam
« Reply #1 on: December 20, 2010, 08:40:56 pm »
I thought about this too, maybe this could be done with a Lua script and scene using the patrol function.  If there was someway to read camera position we could use that (stop when it hits 0, etc.)...I'll see if I can look in the Foscam API...
Vera3 1.5.346, Schlage (3)DB (2)Lever, Kwikset (1)Lever, RCS TZ43 Thermo, (2) Vizia RZI06-1LX 600W Dimmers, (17) Monster (Leviton) Dimmers (6) Monster (Leviton) IWC Scene Controllers (1) Etherrain-8, (3) HSM 100's (1)GE 3-Way set

Offline Ap15e

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1998
  • Karma: +12/-0
Re: Automatically controlling a Foscam
« Reply #2 on: December 21, 2010, 06:03:19 am »
Use command 'center' (command 25), wait x seconds, then 'up' (command 0) (if required: wait y seconds, then issue a 'stop up' (command 1)).

Further reading:

http://wiki.micasaverde.com/index.php/Luup_Lua_extensions#function:_call_timer

www.foscam.es/descarga/ipcam_cgi_sdk.pdf
« Last Edit: December 21, 2010, 06:05:18 am by Ap15e »

Offline mbairhead

  • Hero Member
  • *****
  • Posts: 516
  • Karma: +5/-2
Re: Automatically controlling a Foscam
« Reply #3 on: December 21, 2010, 10:35:07 pm »
Use command 'center' (command 25), wait x seconds, then 'up' (command 0) (if required: wait y seconds, then issue a 'stop up' (command 1)).

Further reading:

http://wiki.micasaverde.com/index.php/Luup_Lua_extensions#function:_call_timer

www.foscam.es/descarga/ipcam_cgi_sdk.pdf

Thank you Ap15e but I'm afraid I'm not clear on this (still). Yes, I admit I'm a bit thick...sorry in advance.

Could you give me an example of this? I've been putzing with it and can't get it to do anything.

Offline Ap15e

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1998
  • Karma: +12/-0
Re: Automatically controlling a Foscam
« Reply #4 on: December 23, 2010, 05:46:44 pm »
Code is available at http://wiki.micasaverde.com/index.php/Luup_Scenes_Events#.27Privacy.27_mode_for_Foscam_FI8908.5Bw.5D.

Copy and paste the code to the 'Luup' tab of a scene. Adjust the variables at the beginning of the code accordingly.

Please note that the whole procedure takes about 125 seconds to complete, because we have to wait 120 seconds for the 'center' command to complete before issuing the 'up' command.