As mentioned previously, my goal wasn’t to just create a home controller/dashboard but to also collect as much data as possible while doing so. So tonight, I started playing around with a few different visualizations of the data I’ve collected thus far. It took a few hours but I’m satisfied with the current state.
I’m doing simple dumps of the most recent music played by my Amazon Echo; most recent programming watched via DirecTv; visualizing the daily average, minimum, and maximum temperature and humidity levels in my apartment; visualizing by hour of day the average, min, and max temperature for the current month vs the previous month; breaking down the amount of time I spend at home by day of week (and telling on myself that I like to leave work early on Fridays :)); and visualizing my TV watching habits by hour of day and day of week.
I recorded a video of this all and also included the DirecTv control demo at the end.
NFC has proven to be a pretty useless technology for cell phones (unless you’re one of the people who use you Google Wallet/Apple Pay). Nevertheless, I decided to buy some tags and play with them because they’re so damn cheap (just over a dollar each, depending on the type).
One useful application of NFC tags is setting “scenes” using my existing home automation setup. By setting a tag where I usually place my phone at night, I can trigger several events all at once. When I play my phone on my nightstand, the following events are triggered:
If it’s a weekday, set my alarm for 7:00 AM.
If an alarm was set, the phone will adjust its volume and say “Alarm set to 7 AM”.
Using the same text to speech, the phone will say “Goodnight, Kevin.”
After pausing for a few seconds, it’ll POST to a simple script I wrote and turn all the lights in the apartment off before setting it’s volume to mute for the remainder of the night.
It’s a simple way of automating my night time routine and is likely the most practical use of NFC tags with home automation (and it’s not super practical, at that). If you want to recreate, here’s how I did it…
NFC Tag and App
I decided to go with the WhizTags brand because they boast more writeable space (888 bytes of writeable memory vs the standard 144 bytes). For reading and writing the tag, I went with the NFC Tools app. There’s no real reason for using this app – it just looked to be the most stable after a quick search.
Creating the Task
One of the benefits of the NFC Tools app is that you can export import json tasks. Here’s the json for the task I noted
The script used to turn the lights off is a modified version of this script, which I posted earlier. Instead of controlling a single device, I simply added in all the lights in my home and added in the POST var.