How To Turn Foscam FI8910W IR ON and OFF Thru MCV Scenes

This has been discussed a few times, but I just can?t seem to get it. Not sure if I?m interpreting the examples correctly, by inputting my user/password/IP and maybe leaving in (or out) some of the syntax. So if someone could kindly help type the command string with some parameters below as an example? I?m hoping to create a scene as, Spare1 IR On, and enter the commands in the Luup section of the scene creator. If that works, then create a scene called, Spare1 IR Off, for the same camera. Unless there?s a better way of doing this and still controlling it with my Iphone thru MCV. Any help greatly appreciated?

Camera IP: 192.168.0.200
Camera Name: Spare1
Camera Port: 80 (Foscam/MCV default)
Camera Login: yard
Camera Password: green

UPDATE 6-22-13:

Create a scene for camera IR ON
Go to Luup
Enter the info BETWEEN the dashed lines below, replacing the bold text with your info (bold text not required in Luup code).
Scroll down page and save Lua (important)
Scroll up to top of page and hit the red save button.


local IP_address = ‘192.168.0.200
local username = ‘yard
local password = ‘green
local timeout = 5

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


Now do the same for camera IR OFF
Repeat all steps
Enter the info BETWEEN the dashed lines below, replacing the bold text with your info (bold text not required in Luup code).


local IP_address = ‘192.168.0.200
local username = ‘yard
local password = ‘green
local timeout = 5

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


I was trying to fill in the wget command with my info and was not required.

I tried to do this with mine, same camera, kept getting luup errors. What finally worked for me was…

luup.inet.wget(“http//IPADDRESS:PORT/decoder_control.cgi?command=95&user=USERNAME&pwd=PASSWORD”)

and

luup.inet.wget(“http//IPADDRESS:PORT/decoder_control.cgi?command=94&user=USERNAME&pwd=PASSWORD”)

Same codes, different formatting, replace UPPERCASE with your info.
Hope it helps.

[quote=“smaktofix, post:2, topic:175463”]I tried to do this with mine, same camera, kept getting luup errors. What finally worked for me was…

luup.inet.wget(“http//IPADDRESS:PORT/decoder_control.cgi?command=95&user=USERNAME&pwd=PASSWORD”)

and

luup.inet.wget(“http//IPADDRESS:PORT/decoder_control.cgi?command=94&user=USERNAME&pwd=PASSWORD”)

Same codes, different formatting, replace UPPERCASE with your info.
Hope it helps.[/quote]

You had forgotten the “:” should be

luup.inet.wget(“http://IPADDRESS:PORT/decoder_control.cgi?command=95&user=USERNAME&pwd=PASSWORD”)

and

luup.inet.wget(“http://IPADDRESS:PORT/decoder_control.cgi?command=94&user=USERNAME&pwd=PASSWORD”)

What will be the code if I want to send such a command to 3 cameras with 3 different IP addresses?

luup.inet.wget(‘http://xx.xx.xx.xx:xxx…’) AND
luup.inet.wget(‘http://xx.xx.xx.xx:xxx…’) AND
luup.inet.wget(‘http://xx.xx.xx.xx:xxx…’)

Thanks