Foscam Universal Internal Device Type (HD\Non-HD with Alarm\LED\PTZ Control)

Thank you it works… OOPS… DUH

OK so I seem to have a similar problem as many other here are experiencing. Press the Take button places changes the icon to “Taking” where it remains and no picture is ever taken/displayed. The thing is that when I created the device(s) for the first time this AM they worked completely. Here is the flow of my activities from the start:

  • Create a non-HD camera device. Taking picture worked like a charm
  • Modified this same device by changing the IP and enabling the HD option - Taking picture worked like a charm
  • Set this device back to it original non-HD camera. Still all worked fine.
  • Created 2 additional non-HD devices - Taking picture worked like a charm
  • Created 1 HD device and taking a picture APPEARED not to be working. It actually did work but did not display within the Taking picture area for this device within the iPad app. Much to my surprise the picture actually appeared with the very first device I created. This first device however still did function properly when I pressed “Take” and the incorrectly placed (HD) picture was overwritten by the correct one for this device.
    I decided to recreate the HD device but now ithe “Taking” picture appeared to hang and no picture was displayed anywhere. Foolishly I decided to starts from scratch by recreating each device for all my cameras. Result: None of the cameras display any pictures.
  • All other functions (i.e. Alarm) work properly for each of the devices/cameras.
  • I rebooted cameras, hub, router, uninstalled app and re-installed. Nothing.
  • I have tried using another (fresh) iPad and still no luck.

Totally at wits end. Am I to assume this feature is broke and fixing it is out of our hands?

I’m still trying to get the hang of custom devices as well. I’ve got the device type added in My Device Types, and it’s published. To actually make the specific device available in the Smart Things app on my phone, do I need to manually configure the device in the My Devices section of the dev portal?

So if I am adding it in the camera using the “+ New Device” in the My Devices section of the dev portal, is Device Network ID the IP address? And I’m not getting where you’d configure other cam parameters. The only other thing I’ve done this for, the app created and configured the custom devices when I added the custom app, so there’s some stuff I’m not clear on the mechanisms yet. :smile:

So this is analogous to a device being a class definition and adding the device is instancing the object?

Thank you!

Yup… create the new device/camera then go to your mobile app. In time (seconds) you will see that a new device is added to “Things”. The icon looks like a camera… Click the gear and in the new window scroll down to preferences. Under preferences you add the ip, port, username. etc. When you have completed that you can go back to the dev portal and look at your newly created device. The IP you entered earlier has now been converted to a hex number. (you may need to refresh this page to see the change).

Well today is another day and much to my surprise all the problems of yesterday have gone :slight_smile: Considering I made no changes at my end, I have to assume the “problems” were cloud related.

Got everything to work but photo burst mode. When the Foscam is open on the app and the z-wave sensor is tripped I can see the pictures propagate as they are taken. I can also manually take a photo using the take button. The problem is when my app is closed and I get a notification that the z-wave sensor was tripped I can only assume that the photos are being taken but when I open the app and look for the photos nothing is present. I’m assuming that they do not get saved to the device since if I manually take a photo or see them propagating and then close and open the app they are no longer there. So my question is are they stored somewhere by default or have they been wiped from memory making this feature pretty useless unless I happen to have the app open and am looking at that particular camera. With photo burst mode using my DropCam on another Hub (vacation home) the last set of photos that are taken are saved in the app. Is this a known issue and can the pictures be sent to me via email or text if they can not be stored until I open the app?

What mobile device are you using? From your description it seems Android, because the IOS app does this, but the Android one doesn’t. I experience the same as you do. I assume the photos can be doing two things. It could be just hitting the camera’s flash memory, and then it gets erased. The other is that the photos are hitting ST cloud, and being stored in there. I say the latter, because it is how they are going to do their Premium subscription service for live video DVR, on the hub v2.

I would love to hear if anyone else has some idea about this.

I use both Android and iPad. Taking 1 photo works fine on the iPad but not on the android. Well… actually it does but its doesnt show up on the android app. If I use the android to take one picture however that image will be displayed within my iPad app. Magic :+))

As for photo bursts, I assume you mean the alarm is enabled and motion is detected. To get/see the images from this event you must configure your camera setting. In my case I had to specify the mail settings within each camera. From that point on, when I used the smartapp to turn on the alarm and motion is detected, the burst of photos taken are sent to the email address specified within the camera settings.

I have a similar configuration and set up as you.

I also have an Android and iPad, but use my Android primary to manage my ST.

The unfortunate thing is that we are dependent on the Foscam motion alarm to email us pics, and not the one of my motion sensors connected to ST. The Fabrio or ST Motion Sensor does trigger a notification, and SMS, but no pic attached. The motion sensor does show the picture on the app, but as mentioned, I can’t do anything with the photo.

It would be ideal if the motion sensors could trigger the emailing of the photos, and not be dependent on the camera’s motion alarm.

What I noticed with my non HD cameras is when you first “arm” them they send an email with 5 photos. You could take the “arm” app and add a motion sensor subscription that will arm and disarm when motion starts/stops.

Hello. I just purchased a Foscam FI9821W V2. Trying to get this loaded into Smarthings…

1)I added the device in the IDE & it is showing up on my Smarthings app
2) I went into my device type & added this github:

But I can’t see to get this thing to connect…I don’t know what my Device Network ID…any idea how I can find this?
I tried converting my IP address of the camera to hex but with no luck.

When I try & take a pic I get this in my log:
637dcf54-44e7-4798-a0dd-16f9b2bc3fb7 5:03:44 PM CST: error java.net.UnknownHostException: null: Name or service not known @ line 388
637dcf54-44e7-4798-a0dd-16f9b2bc3fb7 5:03:44 PM CST: debug http://null:null/cgi-bin/CGIProxy.fcgi?usr=null&pwd=null&cmd=snapPicture2
637dcf54-44e7-4798-a0dd-16f9b2bc3fb7 5:03:44 PM CST: debug Take a photo

I think it is due to me maybe not having the right Device Network ID?

Any help? I’m stumped.

I am not familiar with the ARM app. Can you please elaborate on the process/steps to set this up?

Network device ID = the IP of your camera. Within thew IDE, If you enter 192.168.1.222 (or what ever, doesnt matter at this point), save it then from within your mobile app update the preferences (including the correct IP and port for the camera), save it and return to the IDE you will notice that the number you previously entered has been replaced with the hex form of the IP address you entered in the preference of the mobile app.

Oneplus one. The issue seems to be that the photos are not being stored to allow for later viewing if you are out of the app. Unfortunately, I have not been able to find any documentation of where the photos are kept so I assume they are only stored in temp memory which is wiped every time you leave the app. This does not happen with the Dropcam photoburst as they seem to be kept in a location that allows for later viewing. I know the photos are being taken because I can see them propagate in real time when I am in the app. Hopefully someone will be able to sort this out as this is the final piece of my security puzzle.

This is the app I am using. I did not author it, @imbrian did.

@eparkerjr I add the code to my device and could not connect to a FI9826P. Does/Should the code work with that Foscam model?

At this point, I think that Smartthings/Samsung needs to step up and either sell a competent, reasonably priced camera through their store (Samsung makes a number of them) or announce Foscam integration. I know that they have been teasing us with Foscam integration but lack of video integration for this long a period of time is disappointing. If they wait much longer Google will outpace them with the Revolv acquisition. I don’t want to have to switch to another hub and happen to like this community. Please give us the last piece of the home automation puzzle and integrate easy video monitoring.

1 Like

You might want to edit the username and passwords out of the http requests :slight_smile:

@acastal I unfortunately am getting the following error when I load the code into IDE.

groovy.lang.MissingMethodException: No signature of method: script1421310321504119335948.section() is applicable for argument types: (java.lang.String, script1421310321504119335948$_run_closure1_closure2) values: [Change to this mode to…, script1421310321504119335948$_run_closure1_closure2@46d18765]
Possible solutions: getLog(), setLog(java.lang.Object) @ line 23

Be sure to enable the “HD Foscam Camera (9xxx Series)” to on. Other than that it is pretty much out of your hands.

I can not however tell what code you are using. The part that you show is not the same as mine. The Device Code I used I found by clicking the link in the 1st post of this thread and starts with:

/*

  • Foscam Universal Device
  • Copyright 2014 skp19

*/
metadata {
definition (name: “Foscam Universal Device”, namespace: “skp19”, author: “skp19”) {
capability “Polling”
capability “Image Capture”

    attribute "alarmStatus", "string"
    attribute "ledStatus",   "string"
    attribute "hubactionMode", "string"*

Then the Device preferences for this device (appears you have the identical camera) are:

Preferences (edit)
Camera IP Address: 192.xxx.xxx.xxx
Camera Port: 80
Camera Username: myloginname
Camera Password: mypwd
HD Foscam Camera? (9xxx Series): true
Mirror? (Not required for HD cameras): false
Flip? (Not required for HD cameras): false
Preset 1 (For HD cameras only):
Preset 2 (For HD cameras only):
Preset 3 (For HD cameras only):
Cruise Map 1 (For HD cameras only. Non-HD cameras will default to Horizontal.): Horizontal
Cruise Map 2 (For HD cameras only. Non-HD cameras will default to Vertical.): Vertical