Getting the Most out of my Amazon Echo: Smart Lights

Smart lighting technologies – like the Lutron Caseta – make it easy to use Alexa for smart home functionality.

Over the last 3 months, I’ve received four new Amazon Alexa devices – one Echo Dot (from re:Invent) 1 and an Echo, a Dot, and a Tap from Amazon and Hackster for my winning entry in their API contest. That, plus the Echo I already owned, my wife’s fire tablet, my two Amazon Fire TVs, and my custom Mystic Mirror give me a total of 9 Alexa-enable devices in my home!!!

Three of my Amazon Alexa devices courtesy of Hackster and Amazon (with some of my favorite books)

With all those devices, it was natural for me to accelerate my adoption of the Alexa in the house, with a focus on smart lights.

I spent a few weeks researching options. In short: there are a lot of products out there. I knew that I wanted to control 3 “bays” of lights:

  1. Family room recessed lights (6) – BR40
  2. Kitchen recessed lights (4) – BR40
  3. Outside porch/front door lights (2) – standard A19

Given the number of lights, I felt that the most cost-effective solution was to go with smart switches. [Note: the added benefit of smart switches was that I wanted to control the lights by voice and wall switch, which a smart bulb would not let me do].

From there, I narrowed my choices to Z-wave switches (partnered with a Samsung SmartHub or Wink) or Lutron Caseta system. I liked the flexibility of Wink or SmartHub (it can support multiple technologies), but I ultimately went with the Caseta. I read multiple reviews about how great the Caseta system worked… and with a smart home skeptic in the house, I wanted to make sure that I implemented something that would be responsive and easy to use.

The Lutron Caseta dimmer (controlling the kitchen lights and the pico dimmer (for two-way control of the family room lights)

I’ve only had the system in two days, but so far, I’m beyond elated about my choice. Other systems might be slightly less expensive…. but this just WORKS. Plus, there are some added benefits:

  • I’ve added dimming functionality (which is a big deal at 2AM in the morning).
  • I’ve scheduled my porch lights to turn on at sunset and off at 11pm – so, even less work for me there.
  • I’m starting to win my wife over (in regards to using voice commands to control our home).

Getting the Most out of my Amazon Echo: Using TuneIn Radio

Telling Alexa to “Play The Big DM on TuneIn” has been the highlight of my Alexa experience to date

before1Before I talk about technology, a quick segue: I grew up in the age of radio and cassettes. The hiss of a cassette tape is a callback to simpler times – when most albums were constricted as complete pieces (and not as a string of singles); when the order of an album was important (no easy skipping)… when building a mixtape was more art than science.

I feel the same way about radio. There’s nothing like the excitement of not knowing what great song is coming next, or the magic of slowing flowing from one song to another. Before there was music video1, there was radio – where I discovered Incognito, and Angela Bofill, and Teena Marie…. Continue reading “Getting the Most out of my Amazon Echo: Using TuneIn Radio”

Getting the Most out of my Amazon Echo: The Roadmap

I’ve got an awesome smart device in the Amazon Echo. Now I need to use it.

Me with my Amazon Echo (and trophy from Hackster)
Me with my Amazon Echo (and trophy from Hackster)

Two weeks ago, I received an Amazon Echo as part of the prize for Hackster’s Internet of Voice challenge (2nd Place1). I checked the mail every day for its arrival, thinking of all the cool things I could and would do with it.

Fast forward to today, and I’m using the Echo daily… but not at its full potential. I use it for timers, connecting my phone via Bluetooth to play music, and to play Jeopardy. That’s not a diss: with four kids, timers are a necessity. Plus, I love Jeopardy. Still, with a device this powerful, I could be doing more. So, I’m putting together a plan to better use the device as a smart home assistant. Here, at a high level, is my roadmap. Continue reading “Getting the Most out of my Amazon Echo: The Roadmap”

Using Amazon Machine Learning to Predict the Best Time of Day for Exercise – Pt 3: Automating the Model with Alexa

Integration with Alexa allows a user to obtain a workout recommendation (and create a machine learning model) all by voice command.

002[su_note note_color=”#d3d3d3″]Note: This is the third post about using Amazon Machine Learning to predict workout intensity. Check out Part 1 (Overview) and Part 2 (Building the Machine Learning Model) for background. A working model is available via web and Alexa. Code can be found/downloaded from my Hackster site.[/su_note]

After I was able to build a working model, I needed to come up a way to automate the model. I originally planned to allow access through my website, but decided to use Alexa in addition to the website link.

Note: The process of creating an Alexa skill isn’t too complicated (if you have experience building lambda functions). That being said, I suggest you start by building a sample skill – such as the Fact Skill example. Also, be sure to read and follow the certification requirements.

Alexa, AWS, and the exposed Fitbit APIs provided a mechanism to build a model and return results for a specific user – all initiated by voice.

Step 1 – Linking the user’s Fitbit account to the skill

A user has to link his/her Fitbit account to the skill before s/he can (a) build a specific machine learning model based on their history and (b) get a workout recommendation. Step 1 covers the logic for this functionality.

Click image to enlarge

Slide7

Continue reading “Using Amazon Machine Learning to Predict the Best Time of Day for Exercise – Pt 3: Automating the Model with Alexa”

Using Amazon Machine Learning to Predict the Best Time of Day for Exercise – Pt 2: The Learning Model

Amazon Machine Learning, leveraging activity data from a your Fitbit, can be used to predict workout intensity.

MachineLearning_VideoThumbnail[1][su_note note_color=”#d3d3d3″]Note: This is the second post about using Amazon Machine Learning to predict workout intensity. Check out Part 1 (Overview) for background. A third post will cover the Lambda and Alexa code used to automate the model. A working model is available via web and Alexa. Code can be found/downloaded from my Hackster site.[/su_note]

When creating my prediction model, I first had to define workout effectiveness. Was it measured by the total number of minutes that I worked out, or my average heart rate? Should I consider my peak heart rate, or number of calories burned.

After doing some research, I decided that workout intensity would be best captured my the number of “active minutes” for each workout. From the Fitbit website:

All Fitbit trackers calculate active minutes using metabolic equivalents (METs). METs help measure the energy expenditure of various activities. Because they do so in a comparable way among persons of different weights, METs are widely used as indicators for exercise intensity. For example, a MET of 1 indicates a body at rest. Fitbit trackers estimate your MET value in any given minute by calculating the intensity of your activity.

From there, I needed to determine what inputs impacted workout intensity. After more reading, I landed on the following as inputs to a successful workout.

  • Sleep (or lack of sleep)
  • Previous Day’s activities
  • Time of Day
  • Stress
  • Food Intake60700774[1]

My Fitbit tracks sleep and the amount of total activity of a given day (measured with the count of total active calories burned in a day). I can also get the start time of each workout and the resultant active minutes in that workout.

Stress, being subjective, is harder to measure. I originally used the number of meetings in my outlook calendar to determine my level of stress, but found that metric to be inaccurate (at least, without additional research/tuning).

Continue reading “Using Amazon Machine Learning to Predict the Best Time of Day for Exercise – Pt 2: The Learning Model”