[RELEASE] Samsung SmartCam Motion Detection Switch

Samsung SmartCam Motion Detection Switch Device Handler

:wave: I’m pleased to announce my very first public SmartThings Device Type, built for the Samsung SmartCam series of IP cameras.

I picked up a SmartCam on Prime Day and was mostly pleased with the ST integration, but I didn’t understand why I couldn’t toggle the camera’s motion sensor setting (to enable and disable local recording based on motion detected by the camera itself). Based on work by @greko6, @justin007, @XFighter, and others (see original thread) I was able to build a device handler to interface with the camera and control the motion detection switch.

Features:

  • View and modify SmartCam’s motion detection on/off setting
  • DTH handles all Digest Authentication automatically - just enter camera IP and password and it’s ready to go
  • Supports newest SmartCam firmware (that I know about, anyways)
  • Supports SmartThings’ “Device Health” capability (Health Check)

Note: This Device Handler is only for toggling the on-camera motion detection setting. Viewing a live stream of the camera in SmartThings can be done with the built-in SmartCam integration, and the SmartCam+ mobile app can be used to toggle video recording to phone or SD, review previously recorded video, communicate via 2-way audio, etc.

Requirements:

  • SmartCam set up on your local network
  • Static IP assigned to the camera

Known Compatibility:

  • SNH-P6410BN (Firmware 1.08_160629)
  • SNH-V6414BN (Firmware 1.13_170214)

I’ve only been able to test this on my SmartCam HD Pro. Please let me know if it works for you on another device/firmware version combination.

Please let me know if you have any issues using this, or if you have any requests for additional (complementary) functionality, by posting in this thread.

Installation:
Instructions can be found in the README document in the repo. For Github integration, use the following:

  • Owner: airdrummingfool
  • Name: SmartThings-SmartCam
  • Branch: airdrummingfool

Possible Enhancements:

  • Support for toggling audio detection (definitely possible)
  • Support for dynamic IP addresses (requires SmartApp for device management, but possible)
  • Support for camera acting as SmartThings motion sensor (not sure if this is possible)

If you find this useful, please let me know! I enjoy knowing that my code has benefitted someone.

9 Likes

Works like a charm! So simple, yet so powerful… Thank You! Thank You! Thank You!!!

You’ve completed what countless Samsung/TechWin programmers could not!

Thanks,
Justin

1 Like

awesome just bought one of these the other day and have been baffled how this wasnt included.

Your Device Handler also works with my SNH-V6414BN (Firmware 1.13_170214) cameras

Thanks! :slight_smile:
Justin

1 Like

H, new to all this. how do I get this integrated. it states that I should look at the readme but where do I find the readme

Thanks for the heads up! I’ve added that to the compatibility list.

You can read the README by visiting the Github repository page (GitHub - airdrummingfool/SmartThings-SmartCam: SmartThings DTH for toggling the motion sensor setting on SmartCams.).

Perfect, thanks for the response. Will give this a go and post back results

These cameras all use XMPP to send notifications (via the server xmpp.samsungsmartcam.com) and I suspect they use RSTP over XMPP to stream video.
This explains why it is so difficult to integrate with SmartThings.

Here is an idea for integrating motion notifications:

  1. Install a local ehlo server (see https://github.com/ehlo-io/ehlo )
  2. Redirect all smtp settings of the camera to the local ehlo server.
  3. Confiigure the ehlo server to redirect all email to an SmartThings APP rest API entry.
  4. In the SmartAPP use the data in the json send by the camera via the ehlo server to fire “a motion” event.

I am going to play with this next weekend, to see if this is doable.

@airdrummingfool and @XFighter

Is it possible to control the status LED in a similar method to this?

This is fantastic! Exactly what I’ve been wishing Samsung would do natively!

This works for my indoor smartcam SNH-P6410BN, but unfortunately it does not for my outdoor SNH-E6440BN. Any chance you can update it to work for that? I’m sick of false motion detection notifications every time we come and go from our house.

Let me know if I can help with any logs etc.

I’m certainly willing to try, though it will be difficult since I don’t have access to one to develop against. The first step would be to see what the logs are reporting. Feel free to post them here or open an issue on the Github repository (that may be a more appropriate place). Please look through the logs before you share them and make sure there is no sensitive information included (I don’t think there is), and if you don’t want to post them publicly you can send them to me in a private message.

Thanks Tommy, will do on the github.

Here’s how to turn the status LED off and on (using httpie):

http --auth-type digest --auth admin:[pass] PUT [camera ip]/stw-cgi-rest/io/otheroutputs "StatusLED.State"="Off"
http --auth-type digest --auth admin:[pass] PUT [camera ip]/stw-cgi-rest/io/otheroutputs "StatusLED.State"="On"

Is this functionality worth its own Device Handler? I don’t think it would be very useful built into the existing motion detection switch handler, because you wouldn’t be able to easily automate the status LED (since turning the motion detection switch on and off would still just enable/disable motion detection, not the LED).

1 Like

Thank you for this, loving the motion sensor control. The status LED resets after every reboot which is super annoying if you want it off. I’ll look into httpie, but I don’t have a server at all my smart things locations.

After I got everything installed can i set this up with Smart Home Monitor or Notify me? I keep trying different things and can’t get it do do anything

@them2012dm This is only a motion detection setting switch - it is used to turn motion detection on the camera on and off. It does not alert or change state when motion is detected by the camera (though ideally it would have this feature one day).

Thank you for getting back to me! Hopefully soon. That would be a great feature

Through the Google account alert integration in the smartcam app, you can use IFTTT to change a virtual switch u made in Smartthings to set off alarm etc.

Matt just to make sure I understand correctly. Your saying go into the smartcam app sign into the google account setup. From there go to the IFTTT.