Foscam FI8910W

Im trying to get my Foscam FI8910W working with ST and, admittedly, I am a html newbie :-/

I tried using @imbrian code but cant get it working… can anyone offer any guidance?

Some of the errors I get are:

12:03:29: error null: Name or service not known @ line 263
12:03:29: debug http://null:null/get_params.cgi?user=null&pwd=null

12:03:32: error null @ line 259
12:03:32: debug http:/null:null/snapshot.cgi?user=null&pwd=null&
12:03:32: debug Take a photo

12:07:20: error null: Name or service not known @ line 259
12:07:20: debug http://null:null/set_alarm.cgi?user=null&pwd=null&motion_armed=1

Any assistance would be much appreciated :smile:

1 Like

It looks like your parameters (ip, port, username and password) have not been set. Here are the step-by-step instructions for setup of the NON-local Foscam (meaning, you’ll need port forwarding or an otherwise publicly accessible camera to use it):

It looks like you aren’t putting in parameters after you’ve created the device type. I used the same code from imbrain, I have the Foscam 8910W, and I need to change one line to get the snapshot to work, because the Foscam model was different.

In the take method, I had to change.

httpGet(“http://${settings.ip}:${settings.port}/snapshot.cgi?user=${settings.username}&pwd=${settings.password}&resolution=32&rate=0”) {response ->
log.debug(“Image captured”)

But, I think he has a newer version of the device type and app up in that link imbrian had put up.


have you figured out local lan control?

@tslagle13 - kind of. I have a working local IP control that I’m using myself, but the polling for finding alarm state isn’t working. I may try and pick at it again as I find time. Wasn’t sure where the problem was, so was waiting for support from the ST side.

Ok so I got it to arm and it supposedly completes tasks like capture image and poll… but where does all that go? I dont see any activity in the ST app itself. I dont see the pics its taking.
I do have the motion alert and email set up in the Foscam settings. What am i missing?

Thanks Brian. Wouldn’t mind seeing the code maybe I can help.

@imbrian I’m working on something similar. I can “ping” devices using local lan control but am having trouble handling any responses (which, with the foscams would presumably include the pictures). When you trigger the alarm state do you get a response from the camera to verify? Can you share some of that code if you do?

@mattmartz - I’m able to issue commands from the hub to the camera. It doesn’t reply with anything useful in terms of alarm status - and even if it were, you’d still want to poll to ensure the alarm wasn’t activate by some third party means. Fortunately, there is an endpoint that provides that value: /get_params.cgi

Within that call, it’ll have a line that either reads var alarm_motion_armed=0 or var alarm_motion_armed=1 - by which, you can then set the device state. I have that working for the direct version of the controller: But I’m having issues parsing the reply on the local IP version. I’m working with @dlieberman to sort it out and will post what I have once I have something working.

@imbrian @dlieberman Sweet, keep me in the loop and let me know if there’s anything I can help with. I’ll keep poking around with it myself.


I am completely new to developer section of ST. FI8910W is the first thing I am trying to add to ST. I set up the device handler by copying pasting your code (@imbrian). I added a device and then set up the username, password, IP and port from the ST mobile app. I tried to run it and got this error:
8:59:33 PM: error org.apache.http.conn.ConnectTimeoutException: Connect to [/] failed: connect timed out
8:59:23 PM: debug*&motion_armed=1

I was able to log in to the camera via web w/o problems, so IP, port, username and password should be correct.
Any help would be appreciated!