I have a Foscam 9821V2 that is partially functional in openLuup/AltUI. The video feed is the “snapPicture2” taken every 1.5 seconds by AltUI. The AltUI screen shows the preset buttons for me numbered 1 to 8 at the bottom of the screen. I used the I_Foscam98HD.xml file in the forums. This file uses “Preset1” to “Preset8” for the presets. I didn’t realize that the camera can have arbitrary string names for the presets, so you have to use the web interface of the camera to set these names and positions for them. Or you can painfully issue the CGI commands to also name them.
Note that the password handling is goofy right now. Since openLuup doesn’t implement password handling for the image call, you have to embed the user name and password in the URL variable. But the above pan/tilt/preset commands don’t use the URL, they build their own http call, so they need to get the password some other way. And the above I_Foscam98HD.xml tries 2 ways to get them, but that didn’t work for me.
lug_username = luup.devices[lul_device].user or luup.variable_get(CAM_SID, "Username", lul_device) or ""
I’m not 100% sure what you get when you “OR” strings in lua. Need to look that up…
I changed that to (same change for Password)
lug_username = luup.variable_get(CAM_SID, "Username", lul_device) or ""
and added the Username and Password variables manually. At that point the presets started working. But what I don’t see on the screen are the up/down/left/right arrows to do pan and tilt. But if I go into actions and click on moveLeft or moveRight, I get the “OK” message that you mentioned, and the camera moves a short distance appropriately.
Note that what it is really doing is sending a pan command to the camera, waiting 1 second, and calling for a stop. I didn’t realize that the cameras (at least mine) has no step, it only moves continuously and then must be told to stop. And that means that you might want to fiddle with the pan rate. If it is too slow, you won’t get much movement in 1 second; if it is too fast, you’ll get too much movement. And it all depends on how well the start pan and stop commands are timed.
Also, I get no thumbnail picture on the device page. Need to sort that out too. Do you see the thumbnail? How about the pan/tilt control?