A little while ago I wrote a series of posts talking about how to send your SmartThings home automation data to Azure to capture and report on, using tools like Event Hub, Cosmos DB and Power BI. This solution works great, and I am still running this today, but there was one downside. To transfer the data we collected from Event Hub to Cosmos we were using Azure Stream Analytics. This process worked fine, but it was overkill for what we were doing.
So far we’ve sent our SmartThings data to event hub, collected this data using Stream Analytics and then stored it in Cosmos DB. In this part were finally going to use that data to create some reports in PowerBI that show SmartThings sensor data over time. We’re going to focus on the example I started with, showing temperature change over time. This will give you the information you need to go on and report on whatever data you want to.
Inpart one of this series, we looked at how we can collect data from SmartThings and send it over to an Azure Event hub. We’re now going to take the next step and work on storing that data so that we can use it in our reports and do historical analysis. For this, we are going to be making use of Azure Cosmos DB for storage, and Azure Stream Analytics to move the data.
I’ve recently added a whole load of home automation functionality using Samsung’s SmartThings platform. Part of this is a number of sensors to trigger automation based on motion, temperature, open/close etc. The SmarTthings platform is able to respond to events from these sensors to undertake tasks, and this works fine. What the platform doesn’t really do however is collect this data to give you historical information. For example, I wanted to collect temperature values from various sensors around the house over time to give me a sense of temperature fluctuations throughout the day and the effectiveness of my heating.