ANAVI Thermometer

An ESP8266-powered, open source, Wi-Fi dev board with temperature and humidity sensors

Jul 15, 2019

Project update 17 of 28

[VIDEO] ANAVI Thermometer and Home Assistant Discovery

Home Assistant is a popular free and open source home automation software. It is written in Python, supports thousands of devices and runs perfectly on Raspberry Pi. Home Assistant can discover and automatically configure certain devices. Thanks to the hard work and enormous contributions Per Cederqvist, the default firmware of ANAVI Thermometer supports the discover feature of Home Assistant over the machine-to machine protocol MQTT.

By the way, inspired by the feedback from Mark Kociscin, the recent commits in the GitHub repository enable another new features in ANAVI Thermometer: setting the temperature scale to Celsius or Fahrenheit. Update your firmware to the latest version and stay tuned for details in the next article.

Let me show you how the Home Assistant discovery feature works with ANAVI Thermometer. Short video with step by step instructions is available at my YouTube channel. There are several ways to install Home Assistant. the most popular are Hassbian, a GNU/Linux distribution based on Raspbian or HassOS based on Hass.io docker container. For this demonstration I’ve installed Hass.io on Raspberry Pi Zero W, although for optimal performance as of the moment it is highly recommended to use Raspberry Pi 3 B/B+.

Prerequisites

The whole process took me less than 10 minutes. There are 3 mandatory prerequisites:

If you are using the latest Hass.io, like me in the video, the setup of MQTT broker isn’t straight-forward. Actually, this is the hardest part because after that ANAVI Thermometer works out of the box.

So, if you are using Hass.io, you should install and start the add-on for Mosquitto broker. The current latest version of the add-on is 5 and since version 4.1 it has become mandatory to set MQTT users and an explicit active control list (ACL) definition. I’ve added MQTT user ha with password ha.

To define ACL I had to install the SSH add-on. After that I logged in remotely to the Raspberry Pi and create the following two files:

acl_file /share/mosquitto/accesscontrollist
user ha
topic readwrite #

After that I had to restart the Mosquitto broker add-on from the web interface of Hass.io. These files grant read and write privileges to user ha. In other words this MQTT user can send and receive any MQTT messages.

Configure MQTT Integration

Open Home Assistant in your web browser. Go to Configuration. Select Integrations and click the button for adding a new integration. Select MQTT. Enter the IP (or URL) of the MQTT broker, set the port (by default 1883), the user and the password.

It is very important to click Enable discovery. Have a look at the video for more details.

Discover ANAVI Thermometer

As soon as you have successfully connected ANAVI Thermometer and Home Assistant with enabled discovery to the MQTT broker, you will be notified that a new device has been found. Just click Finish and ANAVI Thermometer will appear on the overview page of Home Assistant.

Home Assistant discover feature makes the task for adding new devices super simple. Have a look again at the demonstration in the video. Once the MQTT broker was up and running, ANAVI Thermometer was automatically discovered in a second.

Thank you very much for supporting ANAVI Thermometer! As an entirely open source project it is flexible and can be connected to various platforms. Today we covered Home Assistant and Hass.io. In the previous video I’ve showed you how to integrate it in OpenHab 2. I have published in GitHub an Arduino sketch for integration with ThinkSpeak. Karl Schuh is using ANAVI Thermometer over MQTT with SmarthomeNG and he was kind enough to tell me the exact steps which I plan to cover in another video.

It is great to have such a vibrant community around this project that combines open source hardware with free and open source software. Thanks again and stay tuned for more videos and articles!

Thanks,
Leon


Sign up to receive future updates for ANAVI Thermometer.

Subscribe to the Crowd Supply newsletter, highlighting the latest creators and projects