Typically, people who use either the OpenHAB or Home Assistant open source smart home platforms tend to run the software on their own computer or a low-cost Raspberry Pi. Can you actually run these on cloud platforms such as AWS, Google Cloud or Microsoft Azure?
That’s the question we received earlier this week from an IoT Podcast listener:
I am playing with home assistant and other automation systems and I do not want to buy multiple raspberry pi devices or host them on my laptop.
Is there an easy way to set up a site to site VPN to Azure or AWS and host my containers in the cloud. I could then host and compare easily until I get to a final solution to run locally.
This could also be a more perminent solution to automate homes for family members if their router supported the VPN connection.
The cloud is a magical thing. Somewhere in the world there are computers collecting the data that your house generates, testing them against your automation rules and sending commands back when needed. The cloud will receive updates and improve itself over time so it is able to serve you better. Until it’s not. There are many reasons why your home might lose its connection to the cloud. The internet can stop working, an update might have gone wrong or the servers running the cloud crash.
When this happens, your house should be able to keep functioning. The cloud should be treated as an extension to your smart home instead of running it. That way you’ll avoid awkward situations like when Amazon AWS was down and the Amazon Echo stopped working.
If running OpenHAB in the cloud still sounds appealing, even if it’s just for testing purposes, there are plenty of resources and tutorials available. Just keep in mind that for security purposes, you’ll likely want to use a VPS, or Virtual Private Server, which is a bit different than a standard cloud instance.
Note that the devil’s in the details for OpenHAB because it’s far easier to buy a $35 Raspberry Pi and set up either of these systems.
That Raspberry Pi may come in handy for other uses in the future and it’s a one-time sunk cost. With cloud platforms, you pay for compute, disk and network resources over time, which can quickly add up if you decide the cloud is your long-term solution. Depending on your project requirements, one month of cloud computing could actually be more than the cost of a Pi.
In this particular case, simply testing one or both of these open source platforms may be more cost efficient – particularly since all of the major cloud providers offer a free tier of service for a limited time – but this does come with more complexity and points of potential failure.
Here are three tutorials to get you started with OpenHAB in the cloud; note that I haven’t run through any of these myself as I have multiple Raspberry Pi devices, which would be my preferred approach:
- OpenHAB Cloud: This procedure is designed to with AWS but I suspect could easily be modified to work with Google Cloud Platform, Microsoft Azure or any other cloud provider that offers compute containers. Once you’ve run through the setup steps, you’ll have a secure web-frontend to access and manage your smart home and receive notifications on your mobile phone.
- Setup your own OpenHAB-Cloud: An alternative installation that’s worth visiting because people have shared their setup and use experiences, as well as solutions to some of the challenges. Note that in this thread, it’s mentioned that for native iOS notifications you need to be part of the Apple Developer Program which is a $99 annual cost. A free alternative is to configure your hub in the cloud to send SMS notifications.
- OpenHAB in a Docker container: The overview of these procedures specifically says they’re ideal to “easily test out different versions” of OpenHAB, so while some functionality may be limited or different based on the installed version, it should provide a good test environment to see if OpenHAB is right for you.
Again, for testing purposes, the cloud may be fine for open source smart home software. Long term, I’d say most, if not all, homeowners are better off with a simpler and less expensive over the long term approach of a Raspberry Pi.