Home Assistant – integrating RESTful switches

I have started integrating my IoT-devices and services with the Home Assistant platform. See my previous post for details on getting started with Home Assistant and subscribing to MQTT messages:

Home Assistant – getting started and using MQTT sensors

My next attempt is to configure RESTful switches in HA for interacting with an existing web service that I use for controlling 433 MHz outlets. I will also add automation rules for the switches and test the voice command in Home Assistant.

Continue reading →

Advertisements

Home Assistant – getting started and using MQTT sensors

I’ve been searching for an easy-to-get-started home automation platform that can be extended and customized as my needs grow. After struggling with OpenHAB, Domoticz and Freedomotic, I’ve found Home Assistant to be a much better fit for me. My main requirements are that the system should be open-source, have good tutorials & documentation, work well on a Raspberry Pi and be extensible for my likely future needs. I will spend this and a few upcoming posts with my Home Assistant experiments.

Continue reading →

The MicroPython Lego Bot

In the quest for getting my kids interested in coding, I’ve decided to make them a message controlled bot car with Lego bricks and an ESP8266 board. The idea is to have an environment where we can jointly program a sequence of actions that can be sent via WiFi to the bot for execution. With this setup we can make challenges like creating the optimal sequence for navigating through a maze or simply try out crazy movements & mayhem just for the fun of it. Hopefully, having an assignment were you need to connect an abstraction like a sequence of symbols with a physical object will ignite a spark of interest for electronics and the basics of programming.

This post describes the first part of this project. I will use Lego bricks and some servos to build a car bot and mount an ESP8266 board loaded with MicroPython. To begin with, the bot will be controlled via WiFi through MicroPython’s WebREPL.

Continue reading →

A sensor monitor with OLED in MicroPython

I have different sensor nodes at home that publish measurements at regular intervals to a Raspberry Pi. The data is stored on the RPi and in a cloud service and can be viewed with various applications. As my most common use case is to view the latest value of a particular sensor, I would like to have a mounted low-powered display in the kitchen to show the latest values from my sensors.

In this post I will show how I have used an Adafruit Feather Huzzah and a FeatherWing OLED that monitors the latest messages from my sensors. To get out of my normal comfort zone (Arduino IDE with C/C++), I will use MicroPython for the implementation.

Continue reading →

Radio chirp data incorporated in an MQTT environment

Internet-of-things does not require that every device has to be directly connected to the Internet. The complexity and possible security issues with every sensor having its own IP address would in fact be overwhelming. A better approach would be to use more light-weight protocols for the sensor and actuator data and locally aggregate and filter these data at common points before making them available on the Internet. In this post I will describe a theory and implementation of transmitting small radio chirp messages from an Arduino Pro mini and then receive these data on a Raspberry Pi for transformation to MQTT messages for the Internet.

Continue reading →

MicroPython and ESP8266

During the past 6 months  I have grown into a big fan of the Python programming language. I have also found a new passion in tinkering with the versatile and inexpensive ESP8266 microcontroller boards. For the embedded programming I usually stick with Arduino IDE and C/C++, but as there now is a Python implementation for ESP8266 available, I have to try it out and see if I can combine my two latest passions. In this post I will describe my first experiments with MicroPython on an ESP8266 board (an Adafruit Feather Huzzah).

Continue reading →

Basic authentication with Python Flask

For a simple web application in a home automation scenario, basic authentication can be a sufficient solution. Setting up a REST API and a web app with Flask is very easy, and adding basic authentication requires just a few more steps that can be reused between different applications. Continue reading →