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

Yes, that’s what I thought but the username/password combination is definitely correct, I’ve double checked. I’m wondering if it’s because the FI9901EP doesn’t use the same method for defining the motion detection area. In all my other Foscams, a grid is used. In this one, you draw 3 boxes on the screen (see screenshot)

. Never seen it before on Foscam, I’ll ask Foscam support.

I just updated to the latest firmware on the FI9900p camera to
system firmware: 1.11.1.11

and taking a picture no longer happens either by pressing the take or on motion detection. I am getting the push notification that motion was detected.

I can see in the logs that
cmd=snapPicture2 is being called

b

I have exactly the same issue, but disregarding the firmware of the camera.

The take image function both from the device and the smartapp, Trigger based Camera Pictures, knocks out the Hub. It says device is unavailable in the app, and meanwhile the Hub goes offline, as the LED on the front turns from green to blue.

This is from the log, when the hub hasn’t got the issue.

738a3f28-b03f-491c-af18-7c1ef789a3a2 12:25:48 AM: debug Checking motion alarm status
738a3f28-b03f-491c-af18-7c1ef789a3a2 12:25:44 AM: trace Resetting hubActionMode to local
738a3f28-b03f-491c-af18-7c1ef789a3a2 12:25:44 AM: trace Sending hubAction command -> http://192.168.8.192:88/cgi-bin/CGIProxy.fcgi?usr=XXXXXXX&pwd=XXXXXXX&cmd=snapPicture2
738a3f28-b03f-491c-af18-7c1ef789a3a2 12:25:44 AM: trace IPAddress 192.168.8.192 is a private IP Address
738a3f28-b03f-491c-af18-7c1ef789a3a2 12:25:44 AM: trace Allowance : 9, Last Check: Wed Apr 25 22:25:44 UTC 2018
738a3f28-b03f-491c-af18-7c1ef789a3a2 12:25:44 AM: trace Passed : 37.361 seconds
738a3f28-b03f-491c-af18-7c1ef789a3a2 12:25:44 AM: debug Taking Photo

The problem is intermittent, but mostly happening at almost every try. The pictures is not taken.

Any idea?

Thanks!

Gábor

Your hub appears to be crashing. Someone had a similar issue about a year ago (you can search the topic) and it turned out to be a defective hub or the hub needed to be hard reset

Two years, three phones and two Android tablets later and my video feeds are still green 80% of the time despite the fixes offered in this discussion.

Thanks for the answer. I’ve found the comments about a similar issue, but I think, that the issue maybe something else, as I have the same FI9900P model as the previous person.

It sometimes makes the picture, sometimes doesn’t at all. And sometimes it shows that the Hub goes offline. There is no sign of reboot, but some other log records.

I did a test by changing the command to snapPicture. It has recorded the picture making, but the picture is not showing up. Isn’t that only a decoding issue from the page, what is loaded by the camera? And causing an issue for the hub? I guess something goes wrong at that point where the hubAction is initiated.

I will contact Smartthings support to get an answer.

1 Like

Sounds good. Copy us on the mail to ST support so we can assist if required.

It sounds like the hub is crashing (going offline) when parsing the picture response from the Camera. It could be a bug in the recent hub firmware or something else with the board/hardware. (it’s working fine in our labs here) Either way ST can deep dive into it and figure out why the hub goes offline when trying to parse the response from the camera, especially if you can replicate it consistently. (Also check your ide logs for the hub events to see if it’s rebooting or just losing connectivity)

Also tagging @vlad, any pointer on who can help look into the hub logs to see why it’s is going offline.

It is definitely happening at the sendHubCommand part. The code is executed, but the response is not parsed, or the parser crashes, but there is no sign of it in the device logs, except the hub events, where disconnected/connected is visible. But nothing else.

I don’t know why it is happening, as the code runs when snapPicture used, but that is parsed straight to an image, but it is a html. The snapPicture2 response is maybe too much for some reason. It shouldn’t be more than 300 kByte. And shouldn’t make anything to fail. As the previous comment was about the same issue, and I see similar time to time. Maybe it is a firmware issue.

I forgot to mention, no sign of reboot, just disconnected/connected.

1 Like

@Paul_James could you have a look on your Hub’s events log, after you try to make a snapshot?

Do you see any disconnected/connected message there? Just to back up the idea of the firmware issue.

(I’ve even uninstalled the cameras and added them again today just to rule out that issue.)

Thanks!

Gábor

I have two Foscam cameras one c1 and one c2. I can add the c2 fine through the SmartApp, but every time I try to add the c1, the SmartApp exits without allowing me to save or continue or throwing any error. Full flow:

SmartApps > Foscam Camera and Motion Alarm Manager v03.00.05
Wait for detection > Next
Tap C1 to configure
Enter password, username, set model to “Other Foscam”
Press Save
SmartApp closes and dumps me back in the list to “Add a SmartApp”

Try doing a clean install of the SmartApp (helps after a hub firmware update). If it still doesn’t work, open IDE Live Logging, capture the logs from the SmartApp (filter by name on top) and eMail (copy/paste) the logs to our support desk.

Based on the information you have confirmed, I am unable to advise you further about how to to resolve the issue that you are having. The Camera you are using is not one that is officially compatible with the UK release of SmartThings and the DTH and App you are using to link it to ST is custom/unofficial, so I don’t have any resource that would enable me to advice you on the issue. I am sorry!

What I would suggest is that you go back to Rboy directly, using the SmartThings Community Page and seeing if he can suggest a way to resolve this, as he originally wrote the code. Hopefully he will be able to point you in the right direction.

I hope that is okay for you. If you have any other questions or queries about SmartThings, please get back in touch and if not, have a great weekend and we will speak to you soon.

This is insane. The answer above from SmartThings UK support. They even didn’t want to look at the logs, because it is an unofficial DHT. Has none of these people realized yet, that they would be out of business in a day, if the unofficial DHTs wouldn’t exist? I need to rephrase it, all of them who are sitting at the support desk would be unemployed really quickly, because nobody would use the system only for the 58 officially supported products.

So, I am tagging @vlad, and I hope, that he may can help with the issue. As far as I looked at it, it looks like that parser in SmartThings fails with the incoming message, but I haven’t got any logged error message, just the disconnected and active, and registered messages in the Hub’s events log. Nothing else. As the callback is never called from the sendHubCommand, I cannot investigate it deeper. The code passes and executes the sendHubCommand, as I tried to add a debug line after, but it do not does the callback, or any of the functions related to saving the image.

Thanks for all the help!

Gábor

Community update, Gabor’s disconnect is related to the recent firmware update (the hub is dropping the image and a bug is casing the disconnect), ST’s engineers are looking into it and will patch it up in the next update. Paul you could be facing the same issue. Thanks @posborne and @Bryce_Geiser

Hi Master.
I am new to this smartthing word but I have knowledge on coding etc.
I am interested on setting up few cost effective out door cams that works with smartthings and smart tiles and I saw you have lot of comments, experience on Foscam Cameras. Now with this thread almost 3 year old now, would it be possible that you can kindly provide short brief on the last supported Foscam model, firmware, configuration details and githux sources?

THanks a lot

Lewis

I uninstalled everything related to Foscam both from the app on the phone and from IDE. Reinstalled everything made sure I could still view video in the app and then tried to take a snapshot and no dice. I sent in logs of the smart app as well as the camera. I am using the FI9900p camera.

@Paul_James could you have a look on your Hub’s events log, after you try to make a snapshot?

Do you see any disconnected/connected message there? Just to back up the idea of the firmware issue.

(I’ve even uninstalled the cameras and added them again today just to rule out that issue.)

Thanks!

Gábor

I do not, I only see "Sending hubAction command ->…
and then the very next line is “Resetting hubActionMode to local” and nothing after that.

Paul

Paul see my post above:

RBoy,

Thanks for all the help. It has confirmed, that the issue wasn’t with the code of the DTH, and neither my assessment of the issue. I hope it will be fixed with the next firmware release for the Hub.

And your level of your support is outstanding!

Best Regards,

Gábor

1 Like

Ok, so I’ve now got access to the latest CGI manual and for the FI9901EP they’ve introduced a new method called GetMotionDetectConfig1 which defines a new way of working with the motion detection zones whereby each zone is laid out with an x/y for the top left corner of the zone and a width and height. This won’t work with the current version of the device handler.

The call works fine through the CGI as I’ve tested it quite a bit. Do you think you’ll be able to incorporate this into your device handler?

I have been using this device handler with success for some time now. However, I just got 2 new Foscam C1s and I’m running into some trouble with the Ip registering.

If I use my DNS address: #######.synology.me I get invalid IP errors, but the video feed works fine.

However, if I use my actual public IP all works fine. The problem is that I cannot get Functional Motion detection then.

If I go into the settings and change from my DNS address to my IP address no errors are thrown.

Here is some of what I see in the live log:
7e45cb0d-fce2-4f30-b255-f462c4a167ae 4:08:43 PM: trace Sending hubAction command -> http://null:14467/cgi-bin/CGIProxy.fcgi?usr=<REDACTED&pwd=&cmd=getDevState
7e45cb0d-fce2-4f30-b255-f462c4a167ae 4:08:43 PM: error Invalid IPAddress null
7e45cb0d-fce2-4f30-b255-f462c4a167ae 4:08:43 PM: error Invalid IP Address null, check your settings! Error: java.lang.NullPointerException: Cannot invoke method tokenize() on null object
7e45cb0d-fce2-4f30-b255-f462c4a167ae 4:08:43 PM: error Invalid IP Address null, check your settings!
7e45cb0d-fce2-4f30-b255-f462c4a167ae 4:08:43 PM: trace Using cached IPAddress=null
7e45cb0d-fce2-4f30-b255-f462c4a167ae 4:08:43 PM: debug Checking motion alarm status
7e45cb0d-fce2-4f30-b255-f462c4a167ae 4:08:37 PM: trace Sending hubAction command -> http://null:14467/cgi-bin/CGIProxy.fcgi?usr=&pwd=&cmd=getDevState
7e45cb0d-fce2-4f30-b255-f462c4a167ae 4:08:37 PM: error Invalid IPAddress null
7e45cb0d-fce2-4f30-b255-f462c4a167ae 4:08:37 PM: error Invalid IP Address null, check your settings! Error: java.lang.NullPointerException: Cannot invoke method tokenize() on null object
7e45cb0d-fce2-4f30-b255-f462c4a167ae 4:08:37 PM: error Invalid IP Address null, check your settings!
7e45cb0d-fce2-4f30-b255-f462c4a167ae 4:08:37 PM: trace Using cached IPAddress=null