Technical Playground

New Dropcam

Background

We’ve fiddled on and off with some IP cameras over the years with varying levels of luck. The previous attempt was using a bunch of Foscam Pan & Tilt cameras. Viewing, pan/tilt, etc worked well but controlling them remotely left a lot to be desired. This was mainly due to not spending enough time with ZoneMinder to make it work properly. Regardless, I wanted to try something else.

Enter the Dropcam

My wife recently saw a post of someone catching a burglar via a motion detecting camera and it opened this realm of discussion again. We did a little research and it looked to be a Dropcam, so we decided to try one. Ordered on a Sunday, shipped on Monday, got it Wednesday, finally had time to set it up on a Friday.

The setup was about as simple as it could be:

  • Open the box
  • Plug the Dropcam into your computer using the provided USB<–>micro-USB cable
  • Run the setup program
  • Create a new Dropcam account
  • Tell the camera which WiFi network to join and provide a password
  • Unplug the camera from your computer and place it where you want it
  • Wait for it to connect and view your camera

The web-based viewer didn’t work for me in Safari because I don’t have the Flash plugin installed. Using Chrome worked without a hitch and allowed me to view the camera, any clips, and modify my alerting / motion detection settings. I walked in front of the camera and got an e-mail alert within about 20-30 seconds with a link to the video in question. The quality was acceptable to pretty good depending on the lighting and definitely met my requirements.

Next up comes the iPhone app. Downloaded from the AppStore, logged in, and our camera appeared. Live camera views worked perfectly and had about a 7-10 second delay. Portrait / Landscape view works as expected. I then left my phone in the office and walked in front of the camera again, then returned to the office to check for a push notification on the phone. Nothing. I realized I had the app open already so no push, but the event was available. Closed the app completely, tried again, and within 20 seconds we had our push notification.

Motion Detection

One of the features I’ve been worried about is the motion detection algorithm. Our previous attempts have resulted in too many alerts / recordings to validate what actually happened. These were often due to a cat running by, and sometimes even minor changes in lighting as the day went on. Using something like ZoneMinder, we had hundreds or even thousands of short clips to try to decipher. No such problem (at least not yet) using the Dropcam. My wife and I could walk through and the detection picks up everytime in daylight, and most of the time using the night vision mode. When a cat runs through, the algorithm seems to ignore the small level of change. We’ve yet to try it with the dogs but it could be 50/50 depending on the amount of movement. Overall, I’m pleased with this part of the setup.

Other Features

The Dropcam appears to include a two week trial of the DVR service. If there’s anything about the service I’m a little iffy on, it’s the whole cloud-based nature of the product. I’m typically not a fan of something that relies entirely on a cloud configuration to run, especially not something like camera data. That said, there are distinct advantages to the cloud component (automatic recordings, auto storage management, easy access from anywhere) so I’m trying to give it a fair shot. So far I like the feature set and things work as expected (though I would like to delete some clips from the app.) It does use a bit more bandwidth than I’d like, but that’s more an issue with my slowish upload speeds rather than the Dropcam itself.

The sound / microphone leave a little to be desired but this isn’t a huge issue for me. We were able to get the audio working properly from a phone to the speaker on the camera, but not vice-versa. I’m not sure if there’s a setting for this yet (Audio is enabled) but it should work fine for our purposes (perhaps confusing the cats / etc.)

Another feature I’m interested in is the scheduling component. I haven’t had time yet to configure and test this but I could see wanting to disable both the camera and the alerts at certain times of day. Another very interesting feature is disabling the camera based on the location of our phones (ie, don’t record or alert when I’m home.)

Conclusion

Pros

  • Incredibly easy setup (15 min, including creating an account)
  • App / Website work as expected and provide a pretty good UI
  • DVR service works as advertised
  • Scheduling options appear well thought out
  • Quality is acceptable to good depending on lighting

Cons

  • Price is a little higher than I’d initially like ($150) though this is likely me being a bit cheap. Mixed with the DVR charge, this could get expensive depending on the number of cameras.
  • No method to tweak sensitivity (again though, this is a double-edged sword.)
  • No option for local storage
  • No API / Webhook interface (I’d love to have the camera do a bit more than email / push notify me depending on its use. This could also ease the need for local storage options if an auto-download was available.)

Overall, I’m pretty happy with the Dropcam and am impressed with the package as a whole. My cons list is mostly a nit-pick and I would definitely recommend this solution for any non-techie over a DIY setup. Time will tell whether we buy more of these but I could see a couple more arriving soon.

Simple Bluetooth LE USB Keyboard

Background

I’ve been interested in Bluetooth LE ever since going to WWDC 2012 during the CoreBluetooth sessions. An easy, wireless, no-MFI (Made For i) device interface to do pretty much whatever you wanted. Unfortunately, like a lot of my ideas, my time to work on it languished more than I’d care to admit. Recently, I came across a different problem – interfacing with embedded computers without requiring a separate keyboard and mouse. The idea hit to try using a a BLE device with a USB interface to emulate a keyboard and control it via my iPhone.

Initial Experiments

For simplicity’s sake, I started with an Arduino Leonardo and one of Red Bear Lab’s BLE shields. This shield uses one of the Nordic NRF8001 chips. I was able to get the BLE test applications working properly but this did nothing for any kind of keyboard setup. I found a webinar and some details on how to modify the shield code and interface more directly with the Leonardo. The nRF8001 is a SPI-ish device and setup is controlled by whatever Arduino library (or other microcontroller) you prefer. I experimented with this a bit further but never got everything working the way I wanted.

I moved on to a different shield, one of Dr. Michael Kroll’s BLE-Shield 1.0 devices. These use the BlueGiga BLE-112a devices (which are in turn TI CC2540 based) and are pretty flexible. The board is a little expensive (~$60 USD), but it tends to be way more accessible for certain things. Given that this board is setup as a BLE interface to the UART on the Leonardo, this makes my basic testing very easy. I found one of Dr. Kroll’s examples showing any data received on the BLE side printed to a serial output on the Arduino side. For my purposes, I modified this to use Keyboard.write() instead:

void setup()
{
  // Set the data rate for the Software Serial port
  Keyboard.begin();
  Serial1.begin(19200);
}

void loop()
{
  if (Serial1.available()) {
    Keyboard.write(Serial1.read());
  }
}

I uploaded the code and connected the Leonardo / Shield combo to a Raspberry Pi I had available. Using the included BLE-Shield iPhone app, I was able to type characters on my phone and have them appear on the RaspPi’s screen. Now this code works, but doesn’t properly handle control characters nor can it handle more than about 12-15 characters at once. I’m working on the code for a UART based protocol that properly handles receiving data, typing it on the remote device, etc.

Excited by the options, I debated building a simple board containing a BLE chip and an ATMEGA32u4 (the same one used in the Leonardo.) While I’m still working on this for practical purposes, right now I’d point to 3 other projects that have appeared in the past week:

  • Babuino – This is an interesting implementation, offering a simple stick device, or a breakout style board. You also have the option of traditional Bluetooth (easy for Android or desktop devices) as well as BLE (iPhone / iPad / newer Macs, etc)
  • BLEDuino – This is almost exactly what I envisioned designing with a very open firmware.
  • BLE-Duino – An integrated version of Dr Kroll’s BLE-Shield with an ATMEGA32u4. This is built with the typical Arduino shield format allowing interfacing to pretty much any Arduino shield. This is still in early design, but bears mentioning here.

All of these devices are capable of what I’m describing here and could very easily implement any firmware or apps written to support it. I’ll have more details soon on making these devices usable in this fashion.