So, part 1 of ESP8266 and MicroPython was pretty lame, right? Instead of getting information out of Home Assistant we are going a step forward and create our own sensor which is sending details about its state to a Home Assistant instance.Read on →
This week’s blog post could only be possibly described by exactly one hashtag:
Keep reading to see what #Amazing things we have in store for you this week 😄! And make sure you read all the way to the end, because I left a present down there for those committed few among you :)
Paulus (@balloob) is on vacation in Europe this week, so you will all have to deal with me, Robbie (@robbiet480) for this release blog post. Don’t worry, Paulus will be back to tearing apart your pull requests in no time 😈.
For my next trick, let’s hand out some…
I felt that I had to 1-up Paulus (@balloob) somehow with his 500,000 pageviews stat he shared in the 0.26 blog post, so I pushed myself and our development community as a whole super hard the last two weeks to put a lot of love into Home Assistant to bring you not just one, but six #Amazing stats for this release. As of 0.27, we have now surpassed the following milestones:
Now that we have that great news out of the way, onto this week’s release which is going to keep the #Amazing gravy train rolling right along and get to the stuff you all really are here for.
While this release is #Amazing, we had to break a few eggs (now you understand the title reference!) to make a beautiful omelette (using home automation obviously) so some platforms and components have needed to introduce breaking changes. Please make sure to read the Breaking Changes section below.
Thanks to @mgbowen we now have the functionality previously provided by @blocke’s ha-local-echo built right into Home Assistant! This means that for those of you with devices that either lack or have a subpar integration with Home Assistant (looking at you Amazon Echo) you can now have a better experience by having your Home Assistant pretend to be a Hue Bridge. Personally, I have used @auchter’s Haaska previously but found that it was slow to respond and sometimes failed entirely. With the new
emulated_hue component, you can have local control of entities through Amazon Echo.
We have some excellent upgrades to the notification system coming to you in 0.27, courtesy of me, @robbiet480.
This release adds support for HTML5 push notifications on Chrome/Firefox/Opera on both desktop and Android devices. This means that you can send a notification to your phone even when your Home Assistant is not open in your mobile browser. When using Chrome you can even include 2 action buttons so that you can control your Home Assistant from your phone’s lock screen, allowing you to do things like sound alarms or unlock your front door, all without leaving the notification. Thanks again to me (@robbiet480) and Paulus (@balloob) for all the hard work on this!
Using the new notify
group platform allows you to cut down a lot of duplicate automation logic by combining multiple notification platforms and
targets into a single notify service. Check out the docs for more info.
For platforms that support it, starting with the new HTML5 platform, any
targets that are available will be exposed as individual services, so no more having to remember which
targets to use. Please note that the existing services also still exist so you can keep using
target if you wish.
Ever restarted Home Assistant to test a configuration change just to find out there is a validation error? Well, not anymore! @kellerza has added a command line script that will validate your configuration as if you started Home Assistant.
$ hass --script check_config
This release includes a big push on making sure all platforms contain proper configuration validation. This should help in getting your configuration right. Thanks to @fabaff, @pavoni, @pvizeli, @nkgilley for all the hard work on this, you all rock!
Due to our wild growth we ended up with a few components that had a lot of overlapping functionality. @turbokongen took on the hard job on merging them. Thermostat and HVAC platforms are now combined under the new Climate component. Rollershutter and Garage Door platforms are now combined under the new Cover component. You can easily upgrade by just swapping out the name. For example replace
climate. The old components have been deprecated and will be removed in the near future.
Along with the new
climate component, @Teagan42 and I (@robbiet480) decided we needed something simpler to just control a fan. Currently it has support for controlling Insteon fans. MQTT support will appear in 0.28.0. I tried to get it implemented before 0.27.0 but spent too long writing this blog post 😢.
sensor.forecastio_temperature. Previously they were like
sensor.weather_temperature. Apologies for this change, but we needed to make Forecast.io more generic now that we have many weather platforms.
type:is no longer required for monitored variables.
hvaccomponents has been deprecated. Please migrate to the new
climatecomponent. (just change the component name, the configurations are compatible)
garage_doorcomponents have also been deprecated. Please migrate to the new
covercomponent. (just change the component name, the configurations are compatible)
Thanks all for sticking with me to the end. I’ll be taking over a lot of Paulus’s (@balloob) work while he is gone, but as I said, don’t worry because he’ll be back well before 0.28.0 comes out. Hopefully you didn’t find this jovial blog post too jarring from our standard style, I just wrote a lot of this at 2am after being awake for almost 20 hours, so I’m a little loopy hahaha 😴.
Also, thanks as always to our developer contributors, documentation contributors, but most of all our users! This would’ve just been a script that Paulus (@balloob) used to control his lights at home if we didn’t have your enthusiasm.
Feel free to let me know what you thought of this blog post and release on Gitter or my Twitter, or even the Home Assistant Twitter. Did I mention we have a brand new Facebook page that you should absolutely Like? There’s a convenient Facebook Like and Twitter follow button right on the sidebar.
I almost forgot about your 🎁 for reading all the way to here: a 🍪! Hope you enjoy it in good health 😄.
Talk to you soon on Gitter and in your pull request comments!
(p.s. To those of you that scrolled directly to the bottom to get your present, just know that you didn’t earn it like the others did. 😄)
Thanks to Anton Kireyeu we are able to present another awesome Jupyter notebook. I guess that you all know the graph which Github is using to visualize your commits per day over a time-line. It’s a so-called heatmap. If there are more commits, it’s getting hotter. The latest notebook is capable to do the same thing for your devices. To be more precise, for the hours your devices are home.
I have been working on a new subsystem to complement Home Assistant’s Automation and Scripting components.
AppDaemon is a python daemon that consumes events from Home Assistant and feeds them to snippets of python code called “Apps”. An App is a Python class that is instantiated possibly multiple times from
AppDaemon and registers callbacks for various system events. It is also able to inspect and set state and call services. The API provides a rich environment suited to home automation tasks that can also leverage all the power of Python.
It’s time for 0.26 and it’s again full of new features and fixes. First I want to highlight that we are now having 500 000 monthly pageviews on the website. A big milestone for us! It’s been an amazing journey. Big thanks to the Home Assistant community for being such a delightful bunch.
This release includes code contributed by 31 different people. The biggest change in this release is a new unit system. Instead of picking Celsius or Fahrenheit you’ll have to pick imperial or metric now. This influences the units for your temperature, distance, and weight. This will simplify any platform or component that needs to know this information. Big thanks to @Teagan42 for her hard work on this!
# Configuration.yaml example homeassistant: # 'metric' for the metric system, 'imperial' for the imperial system unit_system: metric
TL; DR: Don’t hack the framework, separate responsibilities, ship less, use service workers, use (future) web standards.
This year at Google I/O I saw Monica from the Polymer team talk about web components and performance. In her talk she mentions a mantra that they use in the Polymer team to make things fast: Do less and be lazy.
Do less and be lazy. It sounds so obvious and it took a while before it started to dawn on me. I think most of the code I write is pretty fast, but I don’t often stop to take a harder look at how and when it runs in practice. When do we need the result, can it be postponed?
And thus started my journey to take a critical look at how the Home Assistant app was working and how to make things faster. Below is the list of the different things that I did to make it fast.
I hope this list can be useful to other people, as a guide for optimizing their own apps or for avoiding pitfalls when building a new one.
The first thing to do is to measure. The Home Assistant front end is a mobile web app, so we shouldn’t measure this on a machine with 8 cores and gigabytes of ram but instead measure on devices you expect a mobile web app to run: phones. Below are two timelines recorded with Home Assistant 0.18.2 (pre-optimizations) and Google Chrome 53. On my Mac the app starts in 1400 miliseconds and on my Nexus 5x in ~6500 miliseconds (~4.5 times slower!).
Although the app takes 6500 milliseconds to load on my phone, it would perform well afterwards. Still, that initial load is unacceptable. You expect to open an app on your phone and be able to use it, quickly. After I applied all the changes described below, I managed to reduce startup time to 900 miliseconds (-35%) on my Mac and 2400 miliseconds (-63%) on my Nexus 5x. Check out the demo here.
Read on →
This is a guest post by Home Assistant user and contributor Nolan Gilley.
Today I’ll show you how I used Home Assistant, a NodeMCU (ESP8266), and a couple of accelerometers to automate our laundry room. This is a rewrite of an old post where I did the same thing using a Moteino & Raspberry Pi. This version only requires a NodeMCU.
We have an older washer and dryer which doesn’t have any form of notification when cycles complete. Home Assistant was the obvious solution, I just needed to create sensors for the washer and dryer. I tried using sound sensors but found them unreliable. I ended up using an accelerometer attached to the back of each appliance. I also added magnetic reed switches on the doors of the washer and dryer to detect whether they’re open or closed. I connected the accelerometers and reed switches to an NodeMCU which will relay the data to my MQTT broker.
Block diagram of schematicRead on →
When Home Assistant started the focus has always been on making a great developer experience. Allowing anyone to add support for their favorite devices to Home Assistant easily. This focus has been a great success since we now have 339 components and platforms!
Starting with this release, we are extending our extensability to the frontend. Starting this release, any component can add it’s own page to the frontend. Examples of this today are the map, logbook and history. We are looking forward to all the crazy panels you’ll come up with!
We have also seen an exciting trend of people starting to visualize their Internet of Things data using Jupyter Notebooks, which are a great way to create and share documents that contain code, visualizations, and explanatory text. In case you missed it, the blog post by @kireyeu shows an advanced usecase while our Notebooks in the Home Assistant Notebooks repository cover the basics.
This release also includes a bunch of new integrations, among others three new media player platforms. This means that today Home Assistant can talk to 26 different media players!
The brand-new iFrame panel component allows you to add other websites as pages in the Home Assistant frontend. They will show up in the sidebar and can be used the same way as you open the frontend in your browser but all within one view.
locationextension for Telegram and photo bug fixed (@keatontaylor and @pvizeli)
The first release of Micropython for ESP8266 was delivered a couple of weeks ago. The documentation covers a lot of ground. This post is providing only a little summary which should get you started.
Until a couple of weeks ago, the pre-built MicroPython binary for the ESP8266 was only available to backers of the Kickstarter campaign. This has changed now and it is available to the public for download.Read on →
This is the first blog post by Anton Kireyeu. A new contributor to Home Assistant who will focus on exploring and visualizing Home Assistant data.
As we learned in the recent blog post by Fabian, all operational data of your Home Assistant application is stored locally and is available for exploration. Our first steps were querying data with the DB Browser for SQLite, exporting the data extract as a CSV file and graphing in LibreOffice. But what else can be done with this data and what tools are there available?
This post will help you get set up using a few popular data scientist tools to allow you to locally process your data:
One of the graphs created with this tutorial.
TL; DR: Use this Jupyter Notebook to visualize of your dataRead on →