Blog
Home Assistant on a Pi Zero W in 30 minutes
This article is very outdated guide. If you follow it you will be installing a very outdated version of Hassbian, on a hardware platform only suitable for testing. We strongly recommend you do not follow this article.
Saw the announcement yesterday for HASSbian 1.21 and got super excited?
Today we’ll flash the latest HASSbian to a Raspberry Pi Zero W
What you’ll need:
- a Raspberry Pi Zero W (an amazing tiny computer with built-in wifi)
- a microSD card
- some source of USB power
- Wifi
- a desktop or laptop
Let’s get to it!
First, download the HASSbian 1.21 image from here
Unzip it.
Flash it to the microSD card. If you need a flash tool, try balenaEtcher
When the flashing finishes, remove it and plug it back in. You should see a drive called “boot”.
Right in there, not in any folders, create a file called wpa_supplicant.conf
.
The contents of the configuration file should be something like this:
(You may have to adjust for your configuration, hints here
network={
ssid="YOUR_WIFI_NETWORK_NAME_HERE"
psk="YOUR_WIFI_PASSWORD_HERE"
key_mgmt=WPA-PSK
}
Next stick your SD card into the Raspberry Pi Zero W, and plug it in.
After about a minute, use your SSH client to connect to HASSbian (or hassbian.local
from a Mac), with the username pi
. The default password is raspberry
.
It’s a good idea to change the password. To do so, use the passwd
command.
Next, type the following two commands into the SSH console:
sudo systemctl enable install_homeassistant.service
sudo systemctl start install_homeassistant.service
Wait about 15-20 minutes and voilà you have your Home Assistant on your Raspberry Pi Zero W in 30 minutes.
To try it out, go to http://hassbian:8123
or http://hassbian.local:8123
if you’re using Mac.
For further details about HASSbian, take a look at the documentation.
HASSbian 1.21 - It's about time isn't it
Hassbian 1.21 - It’s about time isn’t it
Since I, the developer of HASSbian, have been moving, started a new job and so on I’ve had few moments over for HASSbian development. The 1.2 release has been in pre-release for a few months now and just not communicated out that well. Hopefully this release changes that and I’ll do my best to release more often. There’s no simple way to update from 1.1 to 1.21 but 95% of the changes can be done by installing the hassbian-config
Hassbian 1.22 - Sins of last night
Development is sometimes fast and joyful but mistakes are made at times.
With the release of 1.21 a small problem with the OpenZWave build script wasn’t corrected even tough it was a known bug. Problem is simple as it’s only a problem with the symlink created for to the configuration folder for OpenZWave. This has been fixed and we bring some new things since they where ready anyway. The list below has been augmented with the updated information.
Hassbian-config
To allow you to customize your installation further, we have included a tool called hassbian-config
. This tool comes with a set of packages that can easily be installed for easier customization of your Home Assistant installation. This replaces the hassbian-scripts
functionality from 1.1.
- Install Hue. Configures the Python executable to allow usage of low numbered ports for use with Emulated Hue component that’s used with Amazon Echo, Google Home and Mycroft.ai.
- Install Mosquitto MQTT server. Installs the latest Mosquitto package and client tools from the Mosquitto projects official repository. Now includes websocket support.
- Install Libcec. Adds local HDMI-CEC support.
- Install Open Z-Wave-pip. Installs Python Open Z-Wave from a pip package. This is the quickest and recommended way of installing Z-Wave support but does not OZWCP pre-installed.
- Install Open Z-Wave. Installs Python Open Z-Wave and OZWCP from git.
- Install Samba. Allows anyone on your network to edit your configuration from any computer. This share is unsecured and its usage is not recommended if you share your network with others.
- Install Tellstick. Installs the Tellstick package for controlling and using a connected Tellstick.
- Install Tradfri. Installs dependencies for using IKEA Trådfri.
Spring cleaning
With this image there also quite a bit of cleaning of the base system and the script that generates our Raspberry Pi image.
- Replaced the
hassbian-scripts
folder withhassbian-config
. - Update
pi-gen
. Our build script has been upgraded to follow the Raspbian image closer once again. Now you could build this image with Docker if your so inclined. - Added libtool and autoconf package. Dependencies for some of the pip packages.
- Pi ZeroW should now work with the image.
To follow discussions about the development of the HASSbian image or to contribute join our Discord chat server
To get started with the new image, check out the installation instructions in the getting started section.
Setting up InfluxDB and Grafana using Docker
Home Assistant collects volumes of (time series) data that are well suited for some fancy graphs. Although the History component provides some nice plots, I am sure you have always wanted those fancy Grafana
Instead of running InfluxDB
- SSH into your NAS. You may have to run
sudo su
if you are getting permission errors. - Download the docker-statsd-influxdb-grafana
image using the command: docker pull samuelebistoletti/docker-statsd-influxdb-grafana
- To start the container for the first-time launch:
docker run -d \ --name docker-statsd-influxdb-grafana \ -p 3003:3003 \ -p 3004:8083 \ -p 8086:8086 \ -p 22022:22 \ -p 8125:8125/udp \ samuelebistoletti/docker-statsd-influxdb-grafana:latest
- The image should now be running and both InfluxBD and Grafana should be now up and running.
- You can access InfluxDB at http://NAS_IP_ADDRESS:3004/ and Grafana at http://NAS_IP_ADDRESS:3003/
- Navigate to http://NAS_IP_ADDRESS:3004/ and create the database
home_assistant
using the commandCREATE DATABASE home_assistant
. - Now, you need to configure Home Assistant to use InfluxDB. Since, we did not add any username/password to our database, we can simply add the following to our configuration.yaml (replace the IP address with that of the device running Docker) and restart Home Assistant to setup InfluxDB (you will have to fine tune it based on your preferences):
influxdb: host: 192.168.2.113
- Next, we need to configure Grafana to use InfluxDB. Navigate to http://NAS_IP_ADDRESS:3003/ to access Grafana (login with username and password
root
) and add your first data source. Here’s how you can configure Grafana to use InfluxDB database. Note that 192.168.2.113 is the IP address of my NAS. - You should see
Data source is working
if you have configured everything correctly. - With all that configured, you are now ready for the fun stuff. You can create as many dashboards as you want and then import the same in Home Assistant.
- To add the Grafana dashboard in HA, use the following config:
The URL can be obtained by clicking Share Dashboard link on your dashboard:
panel_iframe: router: title: "Temperature" url: "http://192.168.2.113:3003/dashboard/db/temperature?edit&tab=time%20range"
Hardware Contest 2017
We have four submissions for our Hardware Contest 2017.
- Part of IoT-course
- Automating a nursing home!
- Dedicated hardware for coding, testing, building, and contributing to Home Assistant
- HassIO - Home Assistant hub for dummies
The voting is now open. To keep things simple are we using the voting feature of the forum. Vote for your choices.
End of the voting period: April, 30 2017 - 23.59 UTC
Home Assistant 0.43: IKEA Trådfri, Spotify and our iOS app is live
Oooh yeah. It’s time for 0.43 and this is going to be a killer release. For the people that have been following on social media, you might have noticed that we got pretty excited about the new IKEA Trådfri line up. And so we are very happy to announce that thanks to the work by @ggravlingen
After automatic discovery, Home Assistant will ask the user to finish pairing with the gateway.
And in case you have missed the other big news: @robbiet480
A big shout out this release to @happyleavesaoc
The new Spotify integration is based on the new Spotify Connect Playback API. It supports playback, album art and switching which Spotify device you’re controlling.
Also note that you have till the end of the weekend to submit an application to our giveaway of low energy servers which we got when we won the Thomas Krenn award 2017. Go apply!
New Platforms
- MaryTTS platform (@johanpalmqvist
- #6988 ) (tts.marytts docs) (new-platform) - Telegram bot component (incl. webhook and polling platform) (@sander76
- #6913 ) (telegram_bot docs) (telegram_bot.polling docs) (telegram_bot.webhooks docs) (breaking change) (new-platform) - Support fo map data from Neato (@turbokongen
- #6939 ) (neato docs) (camera.neato docs) (sensor.neato docs) (new-platform) - Support for IKEA Trådfri (@ggravlingen
- #7074 ) (light.tradfri docs) (new-platform) - MQTT camera (@MrMep
- #7092 ) (camera.mqtt docs) (new-platform) - LIFX Cloud scene support (@amelchio
- #7124 ) (scene.lifx_cloud docs) (new-platform) - Spotify media player (@happyleavesaoc
- #6980 ) (media_player.spotify docs) (new-platform) - JSON MQTT Device tracker (@MrMep
- #7055 ) (new-platform) - Opensky sensor (@happyleavesaoc
- #7061 ) (sensor.opensky docs) (new-platform) - Ping binary sensor (@fabaff
- #7052 ) (binary_sensor.ping docs) (new-platform) - myStrom Wifi Bulbs (@fabaff
- #7161 ) (light.mystrom docs) (new-platform)
IKEA Trådfri: Internet of Things done right
Last month IKEA released a new home automation lineup called Trådfri
- Works out of the box. You can get started by just buying the already paired light and remote. You only need to buy the gateway if you want to set time-based rules for your lights or use your phone as a remote.
- Local only hub. No cloud that gathers data about how you live your life and it will keep working even if IKEA stops supporting it.
- Based on open standards. It uses Zigbee between devices and CoAP/dTLS to talk to the gateway. This means that you are not locked into a single vendor. You can pair it with Philips Hue bulbs and other compatible vendors.
- Affordable. Lights start at $12 standalone and $20 if bundled with a remote (USA prices).
- Useful design. The gateway has built-in space to hide excess cables and remotes come with magnetic holders for on the wall.
- Able to subscribe to changes (local push). Automations will be able to instantly respond to changes to device states by subscribing to the gateway for changes.
-
Full integration in Home Assistant 0.43 (scheduled for release April 22). Our community built a standalone library pytradfri
and we use it in Home Assistant. Home Assistant will automatically discover gateways on your network and guide the user to set them up. - Downside: no integration with other systems yet. There are rumors that Homekit support will land in October and I expect both Google Home and Amazon Echo to eventually add support. Use Home Assistant to connect them all in the meanwhile.
- Semi-downside: you can’t control your lights remotely. Because it’s local only, you won’t be able to control your lights remotely unless via a third-party integration.
Full breakdown available after clicking read more.
(Note: we are not affiliated with IKEA nor do we receive commission for sales. We are just big fans of their new line up!)
Read on →1 year and 22 days ago I had an idea...
1 year and 22 days ago, or 387 days ago, on March 25th, 2016, I started a project to bring Home Assistant to the iPhone.
I thought the existing notification and location solutions were lacking in one way or another and had wanted for years to have a project I could call my own which would allow me to learn iOS development. What better way then implementing an extremely complex application like Home Assistant?
I started with a lot of steam. I remember cranking out the initial work that night and showing Paulus who was astounded at how fast the UI was coming together.
Little would I know how many problems I would create and uncover throughout the process. Writing a mobile app for a project that moves as fast as Home Assistant is… tricky, to say the least. In the time since I started writing the app, Home Assistant had 90 releases. I started writing the day before 0.16 was released. Now we are at 0.42.3. Time flies…
I couldn’t have completed the app without help and input from the community. By the end I had 700 beta testers, of which about 500 were very active in testing the app.
I received emails and forum posts almost every day, even when the app would go without an update for weeks and sometimes months at a time as my life got busier and busier.
I wanted this app to be done 9 months ago, at least, but my drive to add more and more features killed that idea. This really taught me the value of the MVP over the kitchen sink.
It may not look the way that I wanted it to initially, with beautiful native UI components, but that’s okay. What I really cared about is there. The notification and location engines are some of the most customizable and powerful available in an iOS app if I do say so myself. I made them this way to keep with the spirit of infinite flexibility that is enshrined in Home Assistant.
Just because the app is released doesn’t mean we are at the end of the road. It’s only the beginning. There’s plenty of bugs to fix still, improvements to make, features to add. Beta testing will continue, and if anything, be expanded. I do want to have a native UI someday, but that’s pretty hard with how fast the project moves.
The biggest request I have is for more developers on the project. As many of you know, I have my hands in many different parts of Home Assistant, from governance and organization to managing the forums to writing this app, managing the Homebridge plugin and even sometimes writing code for the actual core codebase! I can’t do it all, and I’m still a new iOS developer who doesn’t know all the best practices.
The app is open source
1 year and 22 days ago, on March 25th, 2016 I began work on Home Assistant for iOS.
Today, April 16th, 2017, I am extremely excited to announce that Home Assistant for iOS has been approved by Apple and is now available to download for a monthly subscription starting at $9.99 free! (had to get a joke in here somewhere!) on the iOS App Store in every country.
Please note, you must have Home Assistant 0.42.4 or later installed for the app to function properly.
Thanks for everything so far, I’m looking forward to the road that lies ahead for Home Assistant on iOS!
Home Assistant 0.42: Eddystone Beacons, Lockitron locks and Total Connect alarm systems
It’s time for Home Assistant 0.42. This release has been focused on refining the system and fixing a lot of bugs. We have also upgraded to the latest version of our HTTP library which should give us a significant boost serving files and API.
On our social media front, we have crossed the 1000 likes on our Facebook page
Also want to take a moment to thank Austin Andrews aka Templarian
New integrations
- Lockitron locks (@aarya123
- #6805 ) - Met Office weather and sensor components (@jacobtomlinson
- #6742 ) - Total Connect alarm systems (@craigjmidwinter
- #6887 ) - Eddystone Beacon Temperature Sensor (@citruz
- #6789 ) - CrimeReports.com integration shows crimes around a location in the US (@happyleavesaoc
- #6966 ) - The Ring doorbell has been integrated further with the inclusion of binary sensors (@tchellomello
- #6520 )
Thomas Krenn award 2017
You may already know from our social media channels and the release blog post for 0.41: We are now an award-winning Open source project. The jury of the Thomas-Krenn-Award
I would like to thanks all contributors. Your endless effort made this possible.
The prize beside the very nice trophy contains hardware and we want to give that hardware partically away. We won four Low Energy Server v2 (LES)
As a raffle would be to easy, we make a contest out of it. This means that we are looking for your application. Of course, we would like to see those systems goes to active or future developers who can justify their need for one of the systems to run CI, UI tests, public accessible Home Assistant demo instances, etc. At the other hand we would like to keep it open, to see with what people are coming up. Please participate as well if you are planning to automate the public school of your kids with 1000 switches or light, need a server to run it, and want to provide regular feedback about the user experience.
Create an entry in our Forum. Be creative and use your imagination.
The details
- Jury: The Home Assistant community
- Dead line: April, 23 2017 - 23.59 UTC
- Voting period: April, 24th till April, 30 2017 - 23.59 UTC
The decision of the jury will be final. If there will be a dispute then the Top-5 committer of the Home Assistant organization on Github will decide. Also, we reserve us the right to ban applications if we suspect cheating or unfair methods. Updates will be available in the Forum and on Twitter
Keep in mind that you may have to pay the fee for customs handling and the import duty by yourself. The plan is to ship the hardware from Germany. If you are located in a country with import/export regulations, we may not be able to ship the hardware to you.
HTTP to MQTT bridge
The idea of creating HTTP to MQTT bridge
The HTTP to MQTT bridge should fill that gap. The idea is to receive messages using HTTP requests and transfer them to your MQTT broker, which can be contacted by Home Assistant. The HTTP to MQTT bridge is written using Node.js with Express