Adjust Foscam FI9826P camera position when one of the doors is opened

Here you go…

I have this code in a scene that is run when the back door opens in a non-home mode…

local status, result = luup.inet.wget(‘http://[camera_ip]:[camera_port]/cgi-bin/CGIProxy.fcgi?cmd=ptzGotoPresetPoint&name=BackDoor&usr=[user_name]&pwd=[user_password]’)

My preset is just named ‘BackDoor’ - you’ll need to change that value to whatever you named yours (from the sound of it, 7, but you can use more descriptive names in the web interface)

You’ll also need to change the camera_ip and port values to fit your camera.

I use the code to look at the doors if anything gets tripped, as it can see the front and back door from where it sits. I also have a ‘TopMost’ preset that I send the camera to when we’re home, so it’s not sitting there staring at us when it doesn’t need to be.

Hope that helps!