Skip to content

casimec/open-home-automation

 
 

Repository files navigation

Open Home Automation with Home-Assistant

Home-Assitant

Home Assistant is a home automation platform running on Python 3. The goal of Home Assistant is to be able to track and control all devices at home and offer a platform for automating control [Home-Assistant].

Home-Assitant

MQTT

MQTT is a machine-to-machine (M2M)/"Internet of Things" connectivity protocol. It was designed as an extremely lightweight publish/subscribe messaging transport. It is useful for connections with remote locations where a small code footprint is required and/or network bandwidth is at a premium [mqtt.org].

Configuration

To integrate MQTT into Home Assistant, a MQTT broker is mandatory. More information can be found at the MQTT component's page.

configuration.yaml :

mqtt:
  broker: 127.0.0.1
  port: 1883
  client_id: '[Redacted]'
  username: '[Redacted]'
  password: '[Redacted]'

Examples

Lights, sensors, switches and more can be built on top of MQTT. This section contains a few examples based on MQTT and on a NodeMCU board (ESP8266).

Title / link Description
Light A simple example to control a led
Light A simple example to control a led and its brightness
Light A simple example to control a RGB led
Switch A simple example to control a switch
Sensor A simple example to measure the temperature and the humidity (DHT22 sensor)
Sensor A simple example to measure the brightness (photocell)
Binary Sensor A simple example to detect motions (PIR motion sensor)

An advanced example, using WiFiManager, mDNS and OTA, is available here.

If you like the content of this repo, please add a star! Thank you!

About

Open Home Automation with Home-Assistant and MQTT

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Other 100.0%