The presets for the camera need to be modified in the implementation file for the camera. E.g the camera device in Vera will have an implementation file like I_FoscamPTZ.xml. You'll need to add the lua / luup code to allow for the preset control. The settings you see in my App should be ignored, it was something I added when adding preset support for cameras that support it. I have removed this in an upcoming release.
Here is what an old implementation file I made for the foscam cameras I am using. I am now using zoneminder for camera recording and control and integrated into vera:
<?xml version="1.0"?>
<implementation>
<functions>
function lug_startup(lul_device)
cameraPresets = {
['1'] = 31,
['2'] = 33,
['3'] = 35,
['4'] = 37,
['5'] = 39,
['6'] = 41,
['7'] = 43,
['8'] = 45
}
lug_username = luup.devices[lul_device].user
lug_password = luup.devices[lul_device].pass
lug_path = luup.variable_get("urn:micasaverde-com:serviceId:Camera1", "URL", lul_device) or ""
if (lug_path == "") then
luup.variable_set("urn:micasaverde-com:serviceId:Camera1", "URL", "/snapshot.cgi", lul_device)
end
lug_stepSize = 1
end
</functions>
<startup>lug_startup</startup>
<actionList>
<action>
<serviceId>urn:micasaverde-com:serviceId:PanTiltZoom1</serviceId>
<name>MoveLeft</name>
<job>
luup.inet.wget("http://" .. luup.devices[lul_device].ip .. "/decoder_control.cgi?command=6&onestep=" .. lug_stepSize, 5, lug_username, lug_password)
</job>
</action>
<action>
<serviceId>urn:micasaverde-com:serviceId:PanTiltZoom1</serviceId>
<name>MoveRight</name>
<job>
luup.inet.wget("http://" .. luup.devices[lul_device].ip .. "/decoder_control.cgi?command=4&onestep=" .. lug_stepSize, 5, lug_username, lug_password)
</job>
</action>
<action>
<serviceId>urn:micasaverde-com:serviceId:PanTiltZoom1</serviceId>
<name>MoveUp</name>
<job>
luup.inet.wget("http://" .. luup.devices[lul_device].ip .. "/decoder_control.cgi?command=0&onestep=" .. lug_stepSize, 5, lug_username, lug_password)
</job>
</action>
<action>
<serviceId>urn:micasaverde-com:serviceId:PanTiltZoom1</serviceId>
<name>MoveDown</name>
<job>
luup.inet.wget("http://" .. luup.devices[lul_device].ip .. "/decoder_control.cgi?command=2&onestep=" .. lug_stepSize, 5, lug_username, lug_password)
</job>
</action>
<action>
<serviceId>urn:micasaverde-com:serviceId:PanTiltZoom1</serviceId>
<name>ZoomOut</name>
<job>
luup.inet.wget('http://' .. luup.devices[lul_device].ip .. '/decoder_control.cgi?command=26', 5, lug_username, lug_password)
</job>
</action>
<action>
<serviceId>urn:micasaverde-com:serviceId:PanTiltZoom1</serviceId>
<name>ZoomIn</name>
<job>
luup.inet.wget('http://' .. luup.devices[lul_device].ip .. '/decoder_control.cgi?command=28', 5, lug_username, lug_password)
</job>
</action>
<action>
<serviceId>urn:micasaverde-com:serviceId:PanTiltZoom1</serviceId>
<name>GoToPreset</name>
<job>
local preset = cameraPresets[lul_settings.presetNumber]
luup.inet.wget( 'http://' .. luup.devices[lul_device].ip .. '/decoder_control.cgi?command=' .. preset , 5, lug_username, lug_password )
</job>
</action>
</actionList>
</implementation>
This portion should be of interest:
cameraPresets = {
['1'] = 31,
['2'] = 33,
['3'] = 35,
['4'] = 37,
['5'] = 39,
['6'] = 41,
['7'] = 43,
['8'] = 45
}
<action>
<serviceId>urn:micasaverde-com:serviceId:PanTiltZoom1</serviceId>
<name>GoToPreset</name>
<job>
local preset = cameraPresets[lul_settings.presetNumber]
luup.inet.wget( 'http://' .. luup.devices[lul_device].ip .. '/decoder_control.cgi?command=' .. preset , 5, lug_username, lug_password )
</job>
</action>
If the presets are not working in Vera's UI, than it will not work in the app.
- Garrett