I have the cameras working and can control them in UI5. So all is happy there.
Now I’m trying to follow the above to move the camera to point towards the back door. I think i’ve done the LUA code correctly when the scene runs, it seems to pan left or whatever I tell it to do.
Im struggling with pre-sets though - I can’t see how to save a preset, there is a link on the camera control but that doesn’t seem to do anything and ive tried positing the camera and then going to
Thanks for the reply, it’s that thread I originally started on. I can’t seem to set the presets on my camera, am i missing something on that thread that will help?
am i missing something on that thread that will help?
All the relevant info is in that thread.
You can set the presets by saving the camera’s position via the camera’s software.
or
a few posts down on the above link, @m0jon shows how to save the preset via code.
decoder_control.cgi?command=32 = Set preset 1
decoder_control.cgi?command=34 = Set preset 2
decoder_control.cgi?command=36 = Set preset 3
for example, so does that save preset 1? Or is there a different approach?[/b]
So I can see the link on the web interface (using IE) but i’ve positioned the camera, and clicjked save Preset and it doesn’t seem to do anything. Or how would we use the code approach, through LUA?
I’ve been working on getting the presets to work. I have them programmed, but I can’t seem to figure out how to make them work based on a scene.
For example:
Lock button is pressed
Rotate camera to Preset X
Take an image
After 1 minute, return to preset Y
I am assuming this takes some programming, since I can’t seem to find anything for the cameras when I create or edit a scene. I tried following the directions in [url=http://forum.micasaverde.com/index.php/topic,3720.msg50825.html#msg50825]http://forum.micasaverde.com/index.php/topic,3720.msg50825.html#msg50825[/url] to get a feel for it, but couldn’t seem to get it to work.
It looks so easy in the ad for Vera, where a text message pops up with an image when I door is opened
Does anyone have any advice or good references for learning how to make this happen?
Add this to the luup tab of that scene.[code]local IP_address = 'ip address here'
local username = 'username here'
local password = 'password here'
local timeout = 5
Change the command = number to the preset you want.
Preset #1 = command=31
Preset #2 = command=33
Preset #3 = command=35
Preset #4 = command=37
Preset #5 = command=39
Preset #6 = command=41
Preset #7 = command=43
Preset #8 = command=45
3) Take an image
I'm not sure that Vera can do this.
4) After 1 minute, return to preset Y
I have mine change to a different preset when the door is locked, but adding a delay is a good idea! A scene could then be used to patrol a camera through various presets over a set period of time and repeat....
How would one add a delay in Luup? & how could a luup loop be created to repeat it? Anyone?
So, rather than a delay - my temporary solution was to create a scene that runs every hour - just in case I forget to put cameras back where they belong, it will move them to the preset I want to keep them at most of the time. But, when I lock/unlock doors there will be an instant focus on the doors.
Thanks again for the code- worked like a charm!
-Evan
[quote=“JOD, post:10, topic:170205”]Add this to the luup tab of that scene.[code]local IP_address = ‘ip address here’
local username = ‘username here’
local password = ‘password here’
local timeout = 5
Any change to add a delay after the initial trigger before the luup code activates and starts moving the camera. Just in case there is more movement before returning.
[quote=“JOD, post:10, topic:170205”]Add this to the luup tab of that scene.[code]local IP_address = ‘ip address here’
local username = ‘username here’
local password = ‘password here’
local timeout = 5
Just a note - I updated my FI8910W today to the latest firmware 11.37.2.65. Now the above code I have been using for the past three years stopped working. After a LOT of trial and error, I found this does work: