Automatically controlling a Foscam

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.

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…

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

[quote=“Ap15e, post:3, topic:167156”]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[/quote]

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.

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.