DIY: Support for Foscam FI8908[w] (pan, tilt, patrol)

Hello
Ok, I have tried everything. I can control the camera (UP, Down, Left, Right) but I do not get any video. I did download and uploaded the “shady special”. I can view it on a web browser and on my phone. I used a Dyndns address so I can view outside of local network. Here is what the settings I have put in.

URL:http://reefopticcam.dyndns.org:6578/snapshot.cgi
IP:192.168.1.102:6578 (tried with and without the Port)
Direct Streaming:http://reefopticcam.dyndns.org:6578

Like I said I can get it on other apps on my phone and I can control it, so what am I doing wrong ???
Thanks in Advance.
Wes

URL:http://reefopticcam.dyndns.org:6578/snapshot.cgi IP:192.168.1.102:6578 (tried with and without the Port) Direct Streaming:http://reefopticcam.dyndns.org:6578

This is all that should be in the URL’s

URL: /snapshot.cgi
Streaming URL: %2Fvideostream.cgi

The IP needs to contain the port.

JOD.

Thanks for the super fast response! The only thing I didn’t try was the Streaming URL. I never noticed anywhere stating that! Thanks again!

Wes

I’ve been playing with this plugin and it works perfectly with the Loftek CSX 2200 camera as well with the exact same code. Instead of the using the Panasonic IP camera plugin, however, I used the Generic IP camera plugin and inserted “I_PanasonicPTZ.xml.lzo” into the impl_file field of the camera’s Advanced configuration tab. I found this was much more easier and stable than creating the camera using the Panasonic IP camera plugin.

Here is my variant on the question …

I already have a Panasonic camera on my network and just added a new Foscam camera for the basement. So, I do not want to change the plugin that my Panasonic is using, So, is there a way to get the controls to work? (The picture comes through fine for both cameras.)

Roger

I think the panasonic and the foscam plugin can live next to eachother…

  • Henk

[quote=“elleirdad, post:65, topic:166007”]Here is my variant on the question …

I already have a Panasonic camera on my network and just added a new Foscam camera for the basement. So, I do not want to change the plugin that my Panasonic is using, So, is there a way to get the controls to work? (The picture comes through fine for both cameras.)

Roger[/quote]

Got a foscamset up and working perfect outside of the Vera but I cant get the snapshot or streaming controls to work

The snapshot comes up blank. And when I click on the streaming option, it comes up…but the controls don’t work

I’ve tried the following.

with and without the port and Mac address.
The urls suggested in this thread
User name and password (when it was blank and when it wasn’t.)

Any other suggestions.

The imp file is the Shady special, but the dev file appears to be the panasonic file. Is that the issue?

@Primetime,

I have the exact same issue with my Ycam.
Streaming works great, the snapshot not.

I have tried to implement the generic plugin, the panasonic plugin etc and all with flaky results. My experience is a 1 out 5 five succes when creating the camera from scratch.

I also have been thinking it was due to complex passwords accessing the cam using special characters (?!@#$%^&* etc) or interval timings but have never been able to pinpoint the issue…

  • Henk

[quote=“Primetime, post:67, topic:166007”]Got a foscamset up and working perfect outside of the Vera but I cant get the snapshot or streaming controls to work

The snapshot comes up blank. And when I click on the streaming option, it comes up…but the controls don’t work

I’ve tried the following.

with and without the port and Mac address.
The urls suggested in this thread
User name and password (when it was blank and when it wasn’t.)

Any other suggestions.

The imp file is the Shady special, but the dev file appears to be the panasonic file. Is that the issue?[/quote]

Just a quick one. Is it possible to create a scene that will move a Foscam to a given point at a given time or when a sensor is tripped?

Cheers

m0jon

@m0jon

Yes, click here

And for scene control to the presets: click here

JOD.

Thanks JOD for pointing me in the right direction.

I’m trying to turn my camera to the right by just a measured amount as opposed to all the way to the right. I’ve tried the following

luup.inet.wget( ‘http://’…IP_address…‘/decoder_control.cgi?command=4&onestep=100’ , timeout, username, password )

however the camera still only moves just one step. Have i missed something out ?

So far the only way i have been able to increase the steps is by adding the above line over and over again.

Cheers

m0jon

An hour later i came up with the following which works for me

local IP_address = ‘ip address here’
local username = ‘username here’
local password = ‘password here’
local timeout = 5

function move_right()

luup.inet.wget( ‘http://’…IP_address…‘/decoder_control.cgi?command=4’ , timeout, username, password )

end

function stop_right()

luup.inet.wget( ‘http://’…IP_address…‘/decoder_control.cgi?command=5’, timeout, username, password )

end

luup.call_delay( ‘move_right’, 5 )

luup.call_delay( ‘stop_right’, 37 )

@m0jon,

What I ended up doing was to use the camera’s presets. When a code is entered into my Front door Schlage lock, or the door is opened, the camera jumps to Preset #1. If the door is shut or locked, it jumps back to preset #8 which is my Courtyard.

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

JOD.

@JOD

Thanks for the reply. How did you set the presets ?

m0jon

Another hour later and found the answer. In case anyone else wants to do the same below are the instructions

here are the URL commands for the PRESET function

http://your.webcam.address/decoder_control.cgi?command=30 = Set preset 0
decoder_control.cgi?command=31 = Go preset 0

decoder_control.cgi?command=32 = Set preset 1
decoder_control.cgi?command=33 = Go preset 1

decoder_control.cgi?command=34 = Set preset 2
decoder_control.cgi?command=35 = Go preset 2

decoder_control.cgi?command=36 = Set preset 3
decoder_control.cgi?command=37 = Go preset 3

the list goes until preset 16

thanks for creating this plugin and for all the info in this thread!
it’s been really helpfull in getting my Foscam FI8918W to work with my Vera2
it works great with an different port than default btw.

with all the info from this thread I mashed up a generic function for controlling the device through lua code, might be useful to someone :slight_smile:

copy/paste this in “Dashboard - Toolbox - MiOS developers - Edit Startup Lua”

function foscam_control (cam_deviceid, cam_command, cam_timeout) local lug_Username=luup.variable_get( "urn:micasaverde-com:serviceId:Camera1", "Username",cam_deviceid) local lug_Password=luup.variable_get( "urn:micasaverde-com:serviceId:Camera1", "Password",cam_deviceid) luup.inet.wget('http://' .. luup.devices[cam_deviceid].ip .. '/decoder_control.cgi?command=' .. cam_command,cam_timeout, lug_Username, lug_Password) end

and copy paste this wherever you want to use it (argument 1 is deviceid, argument 2 is the actual command, argument 3 is the timeout)
all arguments need to be entered

foscam_control (5, 31, 5)

you don’t need to enter any credentials because they are taken from the device settings (was a copy/paste from the edited I_Foscam8918.xml)
even if you have 20 Foscams you can control them all with this 1 function because you need to send the deviceid as an argument when calling the function

This $59 camera works perfectly with Vera2 (UI4) following the Foscam instructions from this thread…

http://www.amazon.com/gp/product/B003NZWCTG/ref=oh_o01_s00_i00_details

SPent the last two days trying to make this work.

Using Google Chrome i had video, no control

Tried it in the darkside of IE

Works fine.

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

http://192.168.0.25/decoder_control.cgi?command=32

for example, so does that save preset 1? Or is there a different approach?

When I try the scene with the command for a preset, the camera doesn’t move anywhere, which makes me think the presets aren’t saved.

@JOD and m0jon, thanx for the preset codes, question how does one use these? I would like to be able to control either via the a) Camera Control Tab buttons (el manual) and/or via b) scene commands - Triggered event move to preset X. I noticed that whilst perusing the I_FoscamPTZ.xml file one can change the Left/Right and Up/Down command, but I would expect that the D_DigitalSecurityCamera1.xml file would have to be modified to add PTZ buttons? @Grain, reviewing your LUA start-up code, it appears to suggest that one would have the same camera ID and password for all cameras? Any suggestions would be greatly appreciated. Mike

A lot of the info here is for pre-Vera3 and some UI5.

Has anyone been successful setting up motion for the Foscam cameras with the Vera3 and UI5?

I added the ‘I_PanasonicPTZ.xml’ ‘shady’ file and now the current files list shows 2 of this name. I go to ‘view’ them and they both have the same updated contents. I am trying with Internet Explorer.

I ssh into Vera3 and search for the files and get this listing

root@MiOS_30001780:/# find / -name Panasonic -print | xargs ls -lart
-rw-r–r-- 1 root root 599 Dec 22 23:18 /overlay/etc/cmh-lu/I_PanasonicPTZ.xml.lzo
-rw-r–r-- 1 root root 599 Dec 22 23:18 /mios/etc/cmh-lu/I_PanasonicPTZ.xml.lzo
-rw-r–r-- 1 root root 599 Dec 22 23:18 /etc/cmh-lu/I_PanasonicPTZ.xml.lzo
-rw-r–r-- 1 root root 618 Jan 21 19:27 /overlay/etc/cmh-ludl/I_PanasonicPTZ.xml.lzo
-rw-r–r-- 1 root root 618 Jan 21 19:27 /etc/cmh-ludl/I_PanasonicPTZ.xml.lzo

The 2 bottom ones is the ‘one’ I uploaded apparently.

Any ideas on what I could be missing?

[quote=“MNB, post:78, topic:166007”]question how does one use these?[/quote]See if this answers the question:
http://forum.micasaverde.com/index.php/topic,9113.msg60458.html#msg60458
There are a few posts further up in the link about setting the presets.

[quote=“stee1hed, post:79, topic:166007”]whilst perusing the I_FoscamPTZ.xml file…I would expect that the D_DigitalSecurityCamera1.xml file would have to be modified to add PTZ buttons?[/quote]Just installing the I_xml and referencing it in the impl_file box is all that’s needed.

The Foscam’s don’t work for P&T in UI5 unless you upload @mcvflorin’s new I_xml. You can find it here. http://forum.micasaverde.com/index.php/topic,8832.msg58277.html#msg58277

If you know how to delete the Panasonic files you can remove them, or leave them as is…

JOD.