[OBSOLETE] Foscam Camera Device Handler Universal DTH with Motion Detection - SD (FI89xx), HD Ambarella FI98xx, FI99xx, Cx, Gx, Rx, Ex, Zx, Fosbaby

Steps I used to enable Foscam with ActionDashboard thanks to @llcanada

  • Step 1. Open web browser and put this address in ->
    http://ipaddress:port/cgi-bin/CGIProxy.fcgi?usr=xxx&pwd=xxx&cmd=setSubStreamFormat&format=1
    this put the 9821 foscam streaming mode for mjpeg format=1 is for the
    MJpeg stream

  • Step 2. Put this address into the Action Dashboard -> http://ipaddress:port/cgi-bin/CGIStream.cgi?cmd=GetMJStream&usr=xxx&pwd=xxx
    and it now stream to the action dashboard. I have also restarted the
    computer and it has no problem streaming from the 9821 ver 2.1
    camera that I brought. You have to put in the address number 1 with
    the admin name and password into the web browser address bar. Mine
    work good and has a good picture.

For the benefit of others, the first step enable the camera streaming mode.

Second step you can enter the local IP address or external IP if you’re enabled port forwarding since the app just passes the EXACT URL to the ActiON dashboard in the browser as is. So if your browser cannot communicate with the IP address it won’t work with the dashboard.
Also make sure you use the same ip address/hostname and port in Steps 1 and 2 and change the xxx in usr and pwd to your username and password in the URL (to mention the obvious).

If you get a 404 check your URL (check your case, it matters and also the URL itself).

1 Like

Is this relation to the device type or action dashboard?

Is your ST hub on the same network as your camera? Sounds like your hub can’t reach your camera

Try rebooting your camera. Post your settings here also if you can

Does this look right to you?

Yes noticed the same thing too on my camera.

Digging deeper I found that the platform has changed how was processing some variables recently breaking the current code.
This will impact the HD cameras (the non HD will not show any issues).

I’m rewriting the code to adjust for the changes in the platform. It should be up shortly. Will post back once it’s complete.

Okay I just uploaded a new version of the app which has the following updates

  1. Fix for the app suddenly not working with Foscam HD camera, this is to address a change in the ST platform which broke the app
  2. Added support to get LED status (even in AUTO mode now!), simplified the user interface just one button for LED’s and it gets the status (on, off, auto on, auto off).

The next thing I’m working on to integrate the Motion Alarm with ST. Currently you can only turn on/off the motion sensor, but now I’ve found a way to get notified if the motion sensor alarm was set by by the camera.

Okay it’s finally there, as requested I’ve added support to use the Motion Alarm from the camera and do things in SmartThings.
You can use the Motion Sensor events raised by the camera to do a various things. Get the latest code from the server.

NOTE: YOU MUST USE THE Foscam Motion Alarm Monitor Smart App along with the latest Foscam Device Code for this to work. This is a limitation of the ST platform. The Motion Alarms will not be reported to the ST platform if this app isn’t running.
The smart app also provides the ability to turn on alarms, lights, send notifications etc. Alternatively you can just use the motion sensor notification to link it to your alarms/events.

Added support to Mirror and Flip the videos for HD Foscam camera’s

I just updated to your new app code. Overall functionality seems to be working again although I’ve noticed one issue:

For the HD cameras (I have 3 of them), when I click the “Take” button it turns blue and says “Taking” but no image ever loads. My one non-HD camera works fine taking a snapshot.

Any ideas?

Fixed an issue with the Foscam Device Type code which would stop updating for a while due to an ST platform issue, taking pictures and getting status is more reliable now.

@KakaduDreamer try the latest code

It would seem your latest code update was a step backwards, at least for me. I removed all cameras from ST, loaded your new code, and then added back in two of my four Foscam cameras, one SD and one HD. Neither one of them is working when I attempt to “take” a snapshot. I haven’t tested other functionality at this point.

What about other functionality like the LED’s and Alarm Monitoring? Are you able to toggle those?
Try hitting the refresh button also.

I have double-checked to make sure I’m using your latest code (the time stamp on your website says 6/21 @ 7:58PM). As of right now I’m just trying to get one camera working (my one non-HD camera).

I followed your instructions about using the IDE to add your ‘Foscam IP Camera’ code under My Device Types, then creating a new device under My Devices, followed by final configuration within the ST app (iOS) itself.

Although items are appearing in the event log when I use the camera within the app, whether taking a snapshot, toggling the LEDs or Alarm (activating motion detection), nothing happens. I have rebooted my ST hub, hit the refresh button for the camera without any changes. I have also verified my camera settings (IP address, port, username, password) - everything is correct.

Can you try with the HD camera.

Also do you see any blue info messages in the live logging? Ignore the grey trace messages. The blue messages indicate that the camera is responding to the hub. If there are no blue messages then there is communication issue between the hub and camera.

Also when you hit refresh there will be a black debug message printed in live logging with the word settings. Can you please copy paste that one line here.

I am not seeing any “blue” messages in the live logging for my Foscam cameras (SD or HD).

Here is the “black” debug message that displays when I hit refresh:

c21ec7dd-3e69-404b-b5c3-e38a3541ce05 9:53:37 AM: debug Refresh called. Settings -> [ip:gohome.manyjourneys.com, port:8181, username:(removed), password:(removed), hdcamera:false, mirror:false, flip:false, motionLevel:Medium, snapInterval:15s, motionRing:false, motionEMail:false, motionSnap:false, motionRecord:false, cruisename1:Horizontal, cruisename2:Vertical]

Here’s the live log when taking a photo:

c21ec7dd-3e69-404b-b5c3-e38a3541ce05 9:57:48 AM: trace http://66.215.123.129:8181/snapshot.cgi?user=(removed)&pwd=(removed)
c21ec7dd-3e69-404b-b5c3-e38a3541ce05 9:57:48 AM: trace Executing hubaction on 66.215.123.129:8181
c21ec7dd-3e69-404b-b5c3-e38a3541ce05 9:57:48 AM: trace Request was successful, data=[[[host:gohome.manyjourneys.com, class:IN, ttl:304, type:A, ip:66.215.123.129]], [], []], status=200
c21ec7dd-3e69-404b-b5c3-e38a3541ce05 9:57:48 AM: debug Taking Photo

Update: I got it working.

I changed my settings for the cameras from the public to internal IP address. My subdomain name “gohome.manyjourneys.com” resolves to 66.215.123.129 in the logging (which is correct) but for whatever reason it seems that a public/external IP address is causing problems (no blue message in the live log). Once I changed my camera settings in the app to their fixed internal IP addresses 192.168.0.XXX all the sudden everything started working - take photo, refresh, alarm on/off toggle…