Author Topic: How To Turn Foscam FI8910W IR ON and OFF Thru MCV Scenes  (Read 5361 times)

Offline billg

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
How To Turn Foscam FI8910W IR ON and OFF Thru MCV Scenes
« on: May 20, 2013, 12:03:15 pm »
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.

« Last Edit: June 23, 2013, 12:48:20 am by billg »

Offline smaktofix

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: How To Turn Foscam FI8910W IR ON and OFF Thru MCV Scenes
« Reply #1 on: July 13, 2013, 10:10:23 am »
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.


Offline brownbucks11

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
Re: How To Turn Foscam FI8910W IR ON and OFF Thru MCV Scenes
« Reply #2 on: September 21, 2013, 01:59:32 pm »
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.

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")

Offline Albert1

  • Sr. Newbie
  • *
  • Posts: 25
  • Karma: +1/-0
Re: How To Turn Foscam FI8910W IR ON and OFF Thru MCV Scenes
« Reply #3 on: May 17, 2017, 02:49:08 pm »
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