Made a few additional tweaks to the SHM integration to improve processsing, see is this helps. The Mode change would require more work and testing and will look into it.
###Foscam Camera Universal Device Handler - version 3.2.4
- < no change >
###Foscam Motion Alarm Monitor SmartApp - version 2.6.4
- Tweaking integration with SHM to improve resonsiveness
The update seems to have worked well, I am now 2 for 2 on the cameras deactivating when they should since updating my app.
My Foscam C1 does not deliver a stream with the device handler.
I can take Snapshots but I do not get the video stream .
I tried it with the Port 88, Port 088 and I also changed port 88 in the camera settings to 888 and entered in the device handler 888. No video stream I can only take pictures.
I also added the RTSP Port
Always the same result “There was a problem retrieving the lifestream”
However the video stream works in the Foscam app and the surveillance app of my Qnap NAS
Any idea what I could do?
Which port are you using for the rtsp setting?
See the first post also, (assuming you’re configured it properly), video streaming is heavily dependent upon the phone you’re using (it’s capabilities) and also the connection quality. The ST video tile is very sensitive to errors and delays in the stream. Try rebooting your camera / router also.
Thanks, @RBoy! Once I got this working, it works really well and seamlessly. I have it working with multiple FI9821s and FI9805s. One hiccup in the initial setup did take me a while to figure out, though, and I wanted to provide some feedback here.
The features mentions the ability to use URL/hostnames for the camera instead of IP addresses. This only partially worked for me and was very confusing. I don’t expose my cameras publicly. But, on the local network, I have DNS setup so that fdcam.home will resolve to the front door camera’s IP address. When I use fdcam.home in the device handler setttings, it appears to work, but really doesn’t. I can stream video through the SmartThings app, but none of the commands work. I can’t reboot, pan the camera, or turn LED or motion on/off.
At first, I thought the device handler was just broken, but I eventually figured out I could look at the live logs while issuing commands in the app, and saw that it was trying to issue commands to http://null:80/.... After seeing that, I changed the settings to use the IP address, and all is well now.
I don’t know if this is a ST bug or a problem with the device handler. But I just wanted to throw this out there in case someone else has the same problem.
Hey thanks for that feedback, you’re right the name ONLY work for public DNS hostnames since it uses a public DNS to convert the hostname back to an IP address. For LAN connections please use only the IP Addresses.
I’ve clarified this in the settings description going forward.
@RBoy - would you be able to advise? Thanks.
I’m unable to live stream with Foscam IQ (C1). I can take snapshots, etc,. It works fine with Foscam App and I can access the public rtsp url with VLC player. Tried using the default “blank” rtsp port and custom rtsp port - both couldn’t work.
More info -
Foscam IQ - Chinese domestic version of C1.
UK SmartThings
Public hostname
This is from the IDE logs.
10:38:31 AM: trace Called getInHomeURL, returning rtsp://admin:password@public.hostname.com:203/videoMain
10:38:23 AM: trace Called getInHomeURL, returning rtsp://admin:password@public.hostname.com:203/videoMain
10:38:15 AM: trace Called getInHomeURL, returning rtsp://admin:password@public.hostname.com:203/videoMain
10:38:13 AM: trace Called getInHomeURL, returning rtsp://admin:password@public.hostname.com:203/videoMain
10:38:12 AM: trace Called getInHomeURL, returning rtsp://admin:password@public.hostname.com:203/videoMain
10:38:12 AM: trace Called getInHomeURL, returning rtsp://admin:password@public.hostname.com:203/videoMain
10:38:12 AM: trace Called getInHomeURL, returning rtsp://admin:password@public.hostname.com:203/videoMain
10:38:12 AM: trace Called getInHomeURL, returning rtsp://admin:password@public.hostname.com:203/videoMain
10:38:12 AM: trace Called getInHomeURL, returning rtsp://admin:password@public.hostname.com:203/videoMain
10:38:12 AM: trace Called getInHomeURL, returning rtsp://admin:password@public.hostname.com:203/videoMain
10:38:12 AM: trace Called getInHomeURL, returning rtsp://admin:password@public.hostname.com:203/videoMain
10:38:12 AM: trace Called getInHomeURL, returning rtsp://admin:password@public.hostname.com:203/videoMain
10:38:12 AM: trace Called getInHomeURL, returning rtsp://admin:password@public.hostname.com:203/videoMain
10:38:12 AM: trace Called getInHomeURL, returning rtsp://admin:password@public.hostname.com:203/videoMain
10:38:12 AM: trace Called getInHomeURL, returning rtsp://admin:password@public.hostname.com:203/videoMain
10:38:11 AM: debug streamHandler(stream: xxx), deviceId: xxx
10:38:11 AM: trace Video settings: [OutHomeURL:rtsp://admin:password@public.hostname.com:203/videoMain, InHomeURL:rtsp://admin:password@public.hostname.com:203/videoMain, ThumbnailURL:http://cdn.device-icons.smartthings.com/camera/dlink-hdpan@2x.png, cookie:[key:key, value:value]]
10:38:11 AM: trace Fetching video from: rtsp://admin:password@public.hostname.com:203/videoMain
10:38:11 AM: debug Starting video streaming with High profile stream
10:38:06 AM: trace Called getInHomeURL, returning rtsp://admin:password@public.hostname.com:203/videoMain
Double check check your settings and configuration of the router etc. if all that is fine then it’s your phone or network which is the issue. See the first and earlier post for details. Video tile depends upon the phones capabilities and is very sensitive to streaming errors and delays. Try rebooting your camera and router. Try accessing it via the LAN IP.
@Rboy does this device handler allow us to use the foscam as a motion sensor integrated with ST? So for example if I have SHM armed, and motion is detected, I get an intrusion alert?
Yes, you are right.
I use iPhone 6 and it was tied to a US ST hub which I had already removed, and hook up to a UK ST hub, which I guess the “old” data from US ST hub is still in iPhone - I have to delete the app to clear all data and download again. It doesn’t keep calling the “getInHomeURL”, but it still doesn’t work.
I tried on my Android phone, it is working fine. It’s a problem with my iPhone.
I have a problem with the Motion Alarm Monitor - if I set the “check interval” to less than 60 seconds, ST hub will offine and online non-stop after a few minutes. I’m using public IP. Is this a known issue?
Thanks for checking.
Yes. Please see the first post for details.
If your hub is going online / offline I would report it to ST support. Sounds like a firmware issue.
From the information that you’ve given me, and from having a look on your account, it would seem that the issues that you are experiencing with your UK Hub is due to the fact that the Foscam Motion Alarm Monitor isn’t officially supported in the UK.
Integrations that aren’t officially suported can cause issues such as this to occur unfortunately!
Because you’re setting the check interval to such a low timing, this may be overloading the UK Hub, so it’s unable to process the data and therefore reboots itself. The only was around this would be to increase the check interval to a higher time limit.
This is ST’s reply. I don’t recall I have this problem with US hub, I was able to do 5 seconds interval.
Now, I have to do 60 seconds interval with UK hub.
I just set one camera up with your device handler and its great! One question, if we have the smart app motion polling down to one second, would it take a toll on the system? Especially if I plan to use 10 - 15 cameras?
Edit: Also I noticed I can use the foscam as a siren in SHM, but I get no sound. Am I missing something?
NVM found the answer, it simply turns motion on and off.
Wow that’s a first, the apps and custom DH’s all run the cloud so really hub rebooting is pretty much a buggy firmware saying that if the hub communicates with the cloud too often it reboots. Anyways setting it to 1 second is not a good idea because the platform can’t handle that level of polling (ST should ideally but it doesn’t do well or may just kill your block your app) on a long term basis. If you do that likely ST will come back and tell you it’s a “bad” app 
Yeah I think that’s the one problem that I have with the whole “reactive” nature of this setup.
It’s obviously better if you do motion detection in the camera and send out the alert, so that you don’t have to poll every x seconds and possibly miss something. Or put a tax on the whole system.
Good to know, by default it was on 5 seconds. I am guessing that should be ok?