How SmartThings Saved My Stuff and My Dog

Figment saying Hi!

Figment saying Hi!

I’ve had a SmartThings home automation system for about a year now. I liked the idea of being able to control my house from my phone, but I loved the idea of my house reacting to us and letting us know proactively about what’s going on. My then fiancée (now wife) and I bought smart outlets, door sensors, motion sensors, moisture detectors, smoke alarms, and even a siren. It was great knowing who was at the house, whether or not the garage door had been left open, to be greeted by lights that turned on when you arrived home at night, and to be able to turn those lights off by remote when you remembered you had left them on after you had already laid down in the bed.

SmartThings made my life easier. A few weeks ago, SmartThings went beyond being helpful into being a necessity to protect my home and loved ones.

I was at lunch with a coworker when I received an alert on my phone that my back door was open. It was the middle of the day, so the only “person” home was my dog, Figment. I immediately called my wife to see if she had gone home early that day. She was still at work. I quickly used the SmartThings app to turn on the siren in the house and my wife called the police. The police arrived quickly and let us know through our neighbors that everything was OK in the house.

I arrived home shortly after to see what damage had been done. Thanks to the alert we received, it was minimal. It appears that the burglar had just made it to the bedroom (where Figment was put up in her kennel!) when the siren went off and they fled. He was able to grab a single jewelry box (with just a few pieces) and a wallet that was grabbed on the way out the door.

Yes, we lost some things. But without our SmartThings system, who know what might have happened? The perpetrator could have hurt our helpless Figment. They could have taken Figment! We could have lost all of our valuable possessions. I shudder to think what could have happened.

I know this sounds like an advertisement for SmartThings, and in a way it is. I’m a true believer in this company. If not before, I definitely am now.

Asynchronous WCF Calls – Always Check Your State

After beating my head against the wall for a few days, I feel like I should share my experience with the world. Maybe you won’t have the headache I’ve had.

I have a WCF service reference. I wanted to make a call asynchronously, wcfClient.ProcessTransaction(arguments, null) /* no call back method */ . The synchronous call worked just fine, but the asynchronous call failed silently. After much wailing and gnashing of teeth, I discovered that the channel state on the wcfClient never made it past Opening. The solution was just to manually call wcfClient.Open()  before making the asynchronous call.

Hopefully this will help someone avoid my three day headache.

Smoothie Lessons: Episode 4

Ran into the same problem as before tonight, but with some careful coaxing, I was able to get the smoothie to turn out beautifully. I really should be more careful with the ice and frozen fruits, though.

Ingredients

  • 1 cup non-fat Greek yogurt
  • ½ cup skim milk
  • 1 small orange
  • 1 cup frozen pineapple chunks
  • 4 strawberries
  • 3 table spoons of Splenda

Steps

  • Add yogurt.
  • Peel orange.
  • Add orange.
  • Add frozen pineapple chunks*.
  • Add ice*.
  • Blend*.
  • Add strawberries.
  • Add milk.
  • Add Splenda.
  • Blend until desired texture.

We will call this one: Strawberry Fields Forever.

 

* Please note that just like last time, I allowed the blender to get jammed by adding too many frozen things at once. Original order is maintained here for accuracy, but please be careful.

Smoothie Lessons: Episode 3

Thank goodness my wife was around tonight. I was convinced I destroyed my blender. Luckily, she showed me I was only panicking and the blender was fine. I did learn a valuable lesson though: Don’t allow your frozen fruit to wedge underneath the blender blades before turning it on.

But with disaster averted, a brilliant new recipe was born!

Ingredients

  • 1 cup non-fat vanilla yogurt
  • a “little” skim milk
  • 1 serving vanilla protein powder
  • 12 frozen peach slices
  • 2 strawberries
  • 6 ice cubes

Steps

  • Add yogurt.
  • Add peaches*.
  • Add strawberries.
  • Add protein powder.
  • Add ice.
  • Add milk.
  • Blend until desired texture.

We will call this one: Doin’ Peachy.

The Wife’s Smoothie

The wife also made a smoothie tonight, which turned out great. No disasters for her, though.

Ingredients

  • 1 cup non-fat vanilla yogurt
  • 4 strawberries
  • 4 blueberries
  • 4 raspberries
  • 4 icecubes

Steps

  • Add yogurt.
  • Add strawberries.
  • Add raspberries.
  • Add blueberries.
  • Add ice.
  • Blend until desired texture.

We will call this one: Fantastic Four Berry Blast.

 

* Please note that I added peaches right after the yogurt. These frozen slices jammed the blades, which caused the whole fiasco. Be very careful when making this. I maintained order just for accuracy’s sake, but it would probably be a good idea to adjust the order or solidness of the frozen peaches.

Smoothie Lessons: Episode 2

Tried something new tonight. It was pretty good so I’ll share my recipe/steps.

Ingredients

  • 1 can of sliced pineapple
  • 2  apple slices
  • 2 straberries
  • ice

Steps

  • Pour can of pineapple slices into blender.
  • Liquify pineapple slices.
  • Strain some of the pineapple froth and discard.
  • Add half ice.
  • Add apples.
  • Add strawberries.
  • Blend till smooth.
  • Add remaining ice.
  • Blend until desired texture.

Let’s call this one: Pineapple Strawberry Blast.

Smoothie Lessons: Episode 1

I’ve recently started making smoothies. As I’m want to do, I bought a blender with pretty good reviews and jumped headlong into the process figuring I would wing it. So after a few smoothies, I’ve learned a few lessons the hard way. I imagine I’ll be learning more lessons the hard way, but at least I can document them here. This way maybe I won’t make the same mistakes twice. And maybe you won’t either. I have color coded the advice for your convenience.

  • If you need ice and you do not have a functioning ice maker, do not put water in a plastic bag and put it in a shelf in your freezer where the bag will deform and wedge itself into cracks making it impossible get out without a hammer.
  • Watermelon + Grapes tastes like cucumbers.
  • The line between not enough honey and too much honey is very, very thin.
  • Fruit containers get very sticky.
  • Do not attempt to freeze a smoothie for the next day; drink it immediately.
  • Milk is pretty good in smoothies. Use it.

Trying to install NVidia Drivers to Linux Mint

I was recently trying to install the lastest NVidia video drivers to a laptop running Linux Mint. The process was quite painful, as the NVidia installer require absolute and exclusive access to X. All information I could find came from posts dated at least from 2012, and most of them from 2009/2010. Most of these posts involved modifying the boot records to start to the console rather than the login client. Many suggested the CTRL + 1 shortcut to open a terminal. I really didn’t want to modify my boot records. The terminal command wouldn’t work either, as there was still another terminal running X.

If you find another program wanting exclusive access to X like the NVidia graphics installer, remember sudo telinit 1 can be your friend.

Of course this is all moot anyway because the NVidia installer destroyed my X configuration so that the machine could no longer boot into X. I decided to just reinstall Windows 7 in the end.

Fund-raising in the Street is Dangerous

I don’t know if this is particularly popular elsewhere, but here in the Louisville area it seems to be very popular to fund-raise in the street. A group trying to support some cause will wear reflective vests and solicit donations from drivers waiting on red lights. I have nothing against charity, but this is incredibly dangerous. I’ve finally had enough of it after a potentially dangerous situation I encountered today. Luckily nothing happened, but it serves as a perfect example of what could happen if someone had gone just a little faster or a little farther.

I contacted all of my local representatives today, starting with my metro council member. If you live in the Louisville area and want find your own representatives, Louisville actually has some great tools for doing just that. Just put in your address and it will return tons of great information.

I’m going to include the message that I sent today that goes into a little more detail as to my reasoning why street fund-raising is dangerous, as well as a video that shows what happened today and illustrates, with little imagination, what could happen should fund-raisers be sharing the road with two-ton vehicles.


 

It is quite popular in this area for fund-raising efforts to be conducted at intersections around the city. Participants wear bright clothes and put cones along the lines of the lanes and walk car to car soliciting donations from drivers waiting at red lights.

While I support local fund-raising efforts, I find this practice to be highly dangerous and irresponsible. Not only are the participants risking their own lives by placing themselves in traffic’s way, but they are providing a distraction to drivers, as well as endangering the conscious of any driver unlucky enough to be unable to avoid them.

Today I was driving at the intersection of 264 Watterson Expressway and Brownsborro Rd in Louisville where fund raising activities were taking place. I encountered a driver exiting the expressway at high speeds as I was passing the off-ramp. Fortunately I was able to slow down and only had to make minor adjustments to avoid a collision. However, it is easy to imagine a scenario in which I would be forced into another lane quickly or forced into another lane or the median by an impact.

I keep a dashcam mounted in my car and I was able to record the incident for your review. Due to the wide angle of the lens of the camera, the red Jeep appears farther away that it was in reality. Even so, it is clear to see the dangers posed at these intersections, especially to bystanders that purposely place themselves in harm’s way.

You can review the video here on Google Drive: https://drive.google.com/file/d/0B7-exy2-V2-yeUFoTnRYcEYzMGM/edit?usp=sharing

I hope you give careful consideration to my concerns. I strongly feel that these activities shouldn’t be permitted on Louisville’s streets. If these fund-raising efforts continue at our intersections, it is only a matter of time until tragedy strikes.

Presentation: LINQ Basics

While I would not consider myself an expert on Microsoft’s LINQ technology, I would definitely consider myself an enthusiast. Others might call me a LINQ evangelist. Either way, I think LINQ is really cool.

The reason that computers exist is to process data. And rarely does anyone need to work with a data set with only one data point. In fact, the second thing every budding computer scientist and programmer learns (after “Hello world.”) is how to run a loop. Processing multiple pieces of similar data and doing work or creating new collections of data is something we all do. Entire languages have been written to handle this processing model, namely SQL.

Microsoft has done us a big favor in giving us LINQ, which is a query language subset integrated into the C# language. I recently gave a presentation at work on LINQ and its uses. I’m posting both the slides from the presentation, as well as a Visual Studio solution file containing code examples displaying some of the concepts covered in the slides.

Links

Maybe you will find some use for this information.

Season 2 of Derek Coming Soon!

If you haven’t already, be sure to check out Season 1 of Derek on Netflix. This show, staring Ricky Gervais is possibly the most moving portrayal of human interaction I have ever seen. I’m stoked that this Netflix Original got picked up for a second season, which will be available on May 30th. It doesn’t have as much glitz and intrigue as a show like House of Cards (which I also recommend), it definitely has enough heart to compete.

Make sure you watch season 1 so you’re ready on the 30th. But make sure you have a box of tissues ready. They pack a lot of emotion into 7 episodes.