[RELEASE] [Universal] Foscam Camera Device Handler with Discovery, Live Video Streaming, Motion Sensor/Alarm Integration (SD/HD/Ambarella/R2)

dth_security
smartapp_security
dth_av
dth_cameras
dth_sensors

(www.rboyapps.com - Make your home your butler!) #892

Then you phone codecs aren't compatible with the camera.


#893

1st phone was a Samsung Galaxy Note 4. I just tried it on my apple 6S and it doesn't work on it either.

Both phones connect to and stream video via the foscam app. Wouldn't that imply that the phone codecs are compatible with both phones?

There has to be something screwy with the way I have the gateway and subnet set up.

subnet mask is 255.255.255.0
Gateway is 192.168.1.245
dns server is the same as gateway
secondary dns server is also the same.


#894

hum,

I deleted everything and started from scratch. Now in LAN or outside of LAN I can turn led on/off, turn off/on detect and take snapshots, could not do that before.

Still no streaming from either my Galaxy Note 4 or my iPhone 6S


#895

Same thing on my wife's Galaxy S4. Everything but streaming works.


#896

Device network ID keeps reverting to c0a80157:0058 after configuring settings in the ST app. It wont stay at 2000. is this supposed to happen?


(www.rboyapps.com - Make your home your butler!) #897

FOSCAM C1 VIDEO CONFIGURATION (and cameras using Onvif RTSP)

FAQ: Folks using the Foscam C1 camera need to do the following steps to enable video through the ST app:

  1. Login to the Foscam Web GUI
  2. Click on Network -> Onvif
  3. Enable Onvif and set the RTSP port to 554
  4. Open the ST Camera settings page and enter 554 under the RTSP port
  5. Click Done AND CLICK REFRESH (if you don’t click on Refresh the settings won’t take effect. Anytime you change the camera settings you need to click Refresh thereafter).
  6. If you’re using an external IP make sure you enable port forwarding to port 554 to the camera (avoid UPnP)

FOSCAM C2/R2/FI9900P VIDEO CONFIGURATION (and other SD/HD/Ambarella cameras)

FAQ: These cameras do NOT use Onvif and instead use the HTTP port:

  1. Open the ST Camera settings page and enter the HTTP port
  2. Leave the RTSP port blank/empty
  3. Click Done AND CLICK REFRESH (if you don’t click on Refresh the settings won’t take effect. Anytime you change the camera settings you need to click Refresh thereafter).
  4. If you’re using an external IP make sure you enable port forwarding to the HTTP port to the camera (avoid UPnP)

It can take multiple tries to get video streaming to work, this is due to the nature of the camera and ST video tile. It depends upon the quality of your connection from the phone to the camera (direct connection) and phone codecs.

It also helps if, the first time you’re connecting, you first login to the Camera Web GUI and have the video streaming page open while trying to connect to the camera video stream from the ST app.

Troubleshooting tips for video streaming and controls:

If it helps we’ve been playing with a variety if phones and connection types (from android tablets, phones, iPhones 4s to 6s), 3G, 4g LTE, wifi public wifi private, different cameras blink, foscam etc. we’ve realized a couple of things, basic checklist for getting video streaming to work:

  1. Please DO NOT change the Network Id. The initial value of 2000 is only to get the device handler installed (since ST requires some value). The device handler will set the appropriate Network Id. This field is used by ST to identify and communicate with the device, if you change this, ST has no idea how to communicate with the camera and all communication will stop. You should ONLY change settings available through the Device Preferences page on ST phone app after installation and not directly from the IDE.
  2. You should use the LAN IP of your camera first to test the basic camera controls from your ST app. Make sure your username (case sensitive), password (case sensitives) and ports (HTTP) match what’s configured on the camera. Also make sure that the camera username has admin rights on the camera otherwise it will not work. ST does NOT support HTTPS currently for LAN IP’s. Once the LAN IP is working, if you want to use a public IP address, then make sure you’re configured your router to forward the necessary ports to your camera and enter your router’s public IP address into the ST camera configuration.
  3. Make sure P2P is disabled on your camera as this can mess up the IP address and even video streaming.
  4. Make sure your hub can communicate with the camera, they need to be on the same IP subnet and no firewall/rules should block the communication between them. This is number one reason why controls don’t work. You can verify this by opening the IDE Live Logging and looking at the commands sent by the hub to the camera, if you don’t see a BLUE INFO response from the camera that indicates that the hub and camera are not on the same network (assuming the IP address and ports are incorrect). If the username or password are incorrect you’ll see a RED response from the camera indicating the same. No response from the camera (BLUE INFO messages) indicates a communication issue between the hub and camera network setup.
  5. The video streaming ability depends upon the phone capabilities. It needs to support the codec and stream type parameters. Just because the native foscam app works doens’t mean the ST app will work because they work differently.
  6. The ST video tile is very sensitive to errors in the stream. The slightest delay or dropped packets can cause streaming issues. It isn’t very hardy yet hopefully ST could do something about it in future. Eg one camera works and another one only gives audio because it further away and has a low signal. Similarly connection of the Internet quality plays a role. When we have strong stable fast connection it works great but when the connection quality deteriorates (on either end) we start seeing streaming connection issues or only audio or stuff like that. Again very sensitive to streaming errors and delays.
  7. Reboot hub + camera + wifi router, this helps a LOT in reducing delays and improves communications (it’s like windows, it should be rebooted every one in a while to keep it running smooth and fast)
  8. Make sure your phone can contact the camera directly (most common issue, i.e. needs a way to reach, check subnets, network configuration, wifi setup, if you’re using an external IP then port forwarding, firewall etc). If you’re using a LAN IP address in your ST device settings then you phone should be on the SAME LAN subnet as the camera for streaming to work. If you’re using a public IP address than you can access it from outside the LAN but make sure port forwarding is enabled on your router for the appropriate ports. Also see the point above about network latency for cellular networks. If you’re trying to access your public IP address from within your LAN make sure your router supports/enabled NAT loopback otherwise it won’t work
  9. Double check device handler settings
  10. For the 9821 V2 and most SD/HD cameras there is no need for RTSP, it should work fine using the standard port, you can try toggling the MJPEG option on/off to see best compatibility with your phone
  11. If your camera uses RTSP ports make sure you use the default port 554 as Foscam doesn’t like using other ports (and enable port forwarding on your router for the same if you’re using a public IP address in your ST settings)
  12. If you are seeing green video, this is an artifact of the ST Mobile app and phone codec combination (i.e. it’s phone dependent). Typical solutions to the problem are:
    • Reboot hub, camera and phone (all three)
    • Toggle IR Led On/Off
    • Vary light intensity (dark / light) around the camera

#898

I'm noticing HTTP ports being common across all different apps I've used with my Foscam R2, and now this one as well. Using HTTPS never allows me to use pan/tilt and I'm assuming this is one of the reasons why your apps use HTTP?

I know I'm not the only one around here that would prefer HTTPS. Can you comment on this?


(www.rboyapps.com - Make your home your butler!) #899

ST doesn't support HTTPs communication with local devices it's a request we've put in to ST for over a year now. Please feel free to email support requesting them to "allow HTTPS communication with HubAction" as a feature enhancement.

Here is the latest request to ST:


(Patrizio) #900

Thanks for the update!
It fixed the issue with the motion notification emails not being sent out. They now work properly.

Would it be possible to disable push notifications and only get text messages when motion is detected?
I'm trying to set the Foscam Motion Alarm Monitor SmartApp using a cell phone number and disabling the push notifications option, but I keep getting both text and push notifications.


(www.rboyapps.com - Make your home your butler!) #901

Configure the option as you want in the Foscam Motion Alarm Monitor SmartApp, you can pick any set/combination of options you like.


(Patrizio) #902

I tried but, when I add a cell phone number and disable the push notifications, I will still receive both.


#903

I have given up trying to get streaming to work but will continue to try it with other phones as available.

In the mean time I would still like to use this as a motion and video detection method.

Not very successful so far.

In live logging I see this line:

‎2‎:‎57‎:‎17‎ ‎PM: warn Current mode Home is not in the list of active monitoring modes [Away, Night], skipping checking for Monitor Alarms

What does this mean and how do I get home on the list of active monitoring modes?

Thanks in advance for any guidance.


(www.rboyapps.com - Make your home your butler!) #904

Means that you haven't select Home as the one of the modes in which it will monitor for motion detection monitoring. You've only selected Away and Night modes. Go back in the SmartApp and select Home or just remove the mode restriction.

Steaming takes tries. It works at times in a single go and others when the ST app or platform has issues it can take 4-5 tries.


(www.rboyapps.com - Make your home your butler!) #905

Just tested it's working fine here. Make you're on the latest versions of the app and DH. Maybe ST isn't saving your preferences.


#906

OK done and the message is no longer there. I still somehow cannot get anything to trigger.
Perhaps the below log can offer insight?

Here is the live log when I hit arm away, I have X'd out sensitive info:

c8c72212-cc62-435b-a8e9-566b662bdab5 ‎3‎:‎39‎:‎27‎ ‎PM: info Polled: Sound Motion Alarm On
c8c72212-cc62-435b-a8e9-566b662bdab5 ‎3‎:‎39‎:‎27‎ ‎PM: trace Received response from camera to httpGet, headers=text/plain, status=200
c8c72212-cc62-435b-a8e9-566b662bdab5 ‎3‎:‎39‎:‎26‎ ‎PM: trace Sending httpGet command -> http://XXX.XXX.XXX.XXX:88/cgi-bin/CGIProxy.fcgi?usr=XXXXXXXX&pwd=XXXXXXXXXX&cmd=getDevState
c8c72212-cc62-435b-a8e9-566b662bdab5 ‎3‎:‎39‎:‎26‎ ‎PM: trace IPAddress XXX.XXX.XXX.XXXis a public IP Address
c8c72212-cc62-435b-a8e9-566b662bdab5 ‎3‎:‎39‎:‎26‎ ‎PM: trace Using cached IPAddress=XXX.XXX.XXX.XXX
c8c72212-cc62-435b-a8e9-566b662bdab5 ‎3‎:‎39‎:‎26‎ ‎PM: debug Checking motion alarm status
ab283758-5e92-46f0-a13a-10ad6c0b673e ‎3‎:‎39‎:‎24‎ ‎PM: info SHM COMPLETED ARM/AWAY CHILDREN:1 ISA:ab283758-5e92-46f0-a13a-10ad6c0b673e, TIME:0.24
d8c72388-42d9-4286-993d-d787ce520fc8 ‎3‎:‎39‎:‎24‎ ‎PM: debug summaryData: [[icon:indicator-dot-green, iconColor:#79b821, value:Armed (Away)], [icon:indicator-dot-green, iconColor:#79b821, value:Everything OK]] - [[icon:indicator-dot-gray, value:Disarmed, iconColor:#878787], [icon:indicator-dot-green, value:Everything OK, iconColor:#79b821]]
d8c72388-42d9-4286-993d-d787ce520fc8 ‎3‎:‎39‎:‎24‎ ‎PM: trace onSecurityEnable(MODE_AWAY)
ab283758-5e92-46f0-a13a-10ad6c0b673e ‎3‎:‎39‎:‎24‎ ‎PM: trace 0
ab283758-5e92-46f0-a13a-10ad6c0b673e ‎3‎:‎39‎:‎24‎ ‎PM: trace adding subscriptions to Alert with Sirens
ab283758-5e92-46f0-a13a-10ad6c0b673e ‎3‎:‎39‎:‎24‎ ‎PM: trace subscribeChildApps()
ab283758-5e92-46f0-a13a-10ad6c0b673e ‎3‎:‎39‎:‎24‎ ‎PM: info SHM TRYING ARM/AWAY CHILDREN: 1 ISA: ab283758-5e92-46f0-a13a-10ad6c0b673e
ab283758-5e92-46f0-a13a-10ad6c0b673e ‎3‎:‎39‎:‎24‎ ‎PM: info SHM armDisarmCheck executing away
5b63bf6b-d9ae-4238-9d97-ebf0487358af ‎3‎:‎39‎:‎24‎ ‎PM: debug INITIALIZED, settings: [sirenDevices:[Aeon Siren], sirenDuration:2, triggerResetTime:1485111668045, contactSensors:[Deck Door, Garage Door], motionSensors:[cam1]]
5b63bf6b-d9ae-4238-9d97-ebf0487358af ‎3‎:‎39‎:‎24‎ ‎PM: debug Updated with settings: [sirenDevices:[Aeon Siren], sirenDuration:2, triggerResetTime:1485111668045, contactSensors:[Deck Door, Garage Door], motionSensors:[cam1]]
d8c72388-42d9-4286-993d-d787ce520fc8 ‎3‎:‎39‎:‎24‎ ‎PM: debug intrusionState()
c696bf94-cf65-43a3-9422-bf2a6d5c065b ‎3‎:‎39‎:‎22‎ ‎PM: debug Checking Camera cam1 for Active Motion Alarms
c8c72212-cc62-435b-a8e9-566b662bdab5 ‎3‎:‎39‎:‎22‎ ‎PM: info Polled: LED Off

After that It keeps looping through this:

‎3‎:‎48‎:‎02‎ ‎PM: info Polled: LED Off

c8c72212-cc62-435b-a8e9-566b662bdab5 ‎3‎:‎48‎:‎02‎ ‎PM: info Polled: Sound Motion Alarm On

c8c72212-cc62-435b-a8e9-566b662bdab5 ‎3‎:‎48‎:‎02‎ ‎PM: trace Received response from camera to httpGet, headers=text/plain, status=200

c8c72212-cc62-435b-a8e9-566b662bdab5 ‎3‎:‎48‎:‎02‎ ‎PM: trace Sending httpGet command -> http://104.186.150.32:88/cgi-bin/CGIProxy.fcgi?usr=XXXXXXXX&pwd=XXXXXXXX9&cmd=getDevState

c8c72212-cc62-435b-a8e9-566b662bdab5 ‎3‎:‎48‎:‎02‎ ‎PM: trace IPAddress XXXXXXXXX is a public IP Address

c8c72212-cc62-435b-a8e9-566b662bdab5 ‎3‎:‎48‎:‎02‎ ‎PM: trace Using cached IPAddress=XXXXXXXXXX

c8c72212-cc62-435b-a8e9-566b662bdab5 ‎3‎:‎48‎:‎02‎ ‎PM: debug Checking motion alarm status

c696bf94-cf65-43a3-9422-bf2a6d5c065b ‎3‎:‎48‎:‎00‎ ‎PM: trace Last motion detection check was done 3.337 seconds ago

c696bf94-cf65-43a3-9422-bf2a6d5c065b ‎3‎:‎48‎:‎00‎ ‎PM: trace Heartbeat monitor called

c696bf94-cf65-43a3-9422-bf2a6d5c065b ‎3‎:‎47‎:‎57‎ ‎PM: debug Checking Camera cam1 for Active Motion Alarms

c8c72212-cc62-435b-a8e9-566b662bdab5 ‎3‎:‎47‎:‎57‎ ‎PM: info Polled: LED Off

c8c72212-cc62-435b-a8e9-566b662bdab5 ‎3‎:‎47‎:‎57‎ ‎PM: info Polled: Sound Motion Alarm On


#907

Update.

I finally have everything but streaming working. Tried the above post regarding C2 cameras to leave the RTSP port blank, still no streaming even after repeated tries.

I have tried streaming on:

Samsung Galaxy Note 4 running Android 6.0.1
Apple 6S running iOS version 10.2 (14C92)
Samsung Galaxy S4 running Android 5.0.1

Question, which motion detection area parameters take precedence, the ones on the Foscam web interface where you click and define a rectangle or the ones on the ST app?

2nd question in the ST app setting what does 1023 mean in the setting "area 1 = 1023"?


#908

More questions. I installed an ST motion sensor on the front porch. I want it to beep the siren on the Foscam C2 in my living room whenever someone approaches the door.
On the smart home monitor dashboard I created a custom rule called front door for motion as follows:
device: motion sensor
select: front door
once per day: off
once within this number of min: .10
Only when mode is: away, home,night
alert with sirens: Cam 1 selected
alert duration: 1min

I hit done after every entry but still don't get any siren on the cam when motion is detected. Am I going about this the right way?


(www.rboyapps.com - Make your home your butler!) #909

You can't trigger the alarm on the camera externally, in the next release we will disable the "alarm" capability as it's causing some confusion for users. The alarm capability is actually used to turn on the monitoring and take a snapshot. It's not really an alarm. Instead you should use the "switch" to turn on the motion monitoring. The sound alarm on the camera is triggered when there is motion (sound or motion or human as configured on the camera), make sure you've enable the option for the sound alarm in the ST device settings.


#910

Thank you for the reply.


#911

Does anyone know the answer to this?