Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
SamZorSec committed Mar 6, 2018
1 parent 39f2f6a commit ed25b97
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 36 deletions.
60 changes: 47 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,57 @@
# Open Home Automation with Home Assistant
## Home Assistant
> 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](https://github.com/home-assistant/home-assistant)].
# Open Home Automation

## Introduction
Nowadays everything becomes connected to the Internet and gives us a glimpse of many new possibilities. Home automation is part of it and offers many advantages for their users.
This repository is dedicated to [Home Assistant](https://home-assistant.io), an open source project with an amazing community, ESP8266 and ESP32 modules, the MQTT protocol and much more [...].

![Home-Assistant](https://github.com/home-assistant/home-assistant/blob/dev/docs/screenshots.png)
### Home Assistant
> 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](https://github.com/home-assistant/home-assistant)].
## MQTT
### 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](http://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](https://home-assistant.io/components/mqtt/).
![Home-Assistant](openhome/images/features.png)

## Content
### Requirements
Most of the examples below are using the MQTT protocol and so require to integrate MQTT into Home Assistant by defining a MQTT broker. More information can be found at the [MQTT component's page](https://home-assistant.io/components/mqtt/).

#### Stock Home Assistant
configuration.yaml :

```yaml
mqtt:
broker: 127.0.0.1
port: 1883
client_id: '[Redacted]'
port: 1883
username: '[Redacted]'
password: '[Redacted]'
discovery: true # optional
discovery_prefix: homeassistant # optional
```
#### Hass.io
configuration.yaml :
```yaml
mqtt:
broker: core-mosquitto
username: '[Redacted]'
password: '[Redacted]'
discovery: true # optional
discovery_prefix: homeassistant # optional
```
## 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).
More options to connect the broker are available and described [here](https://home-assistant.io/docs/mqtt/broker/#embedded-broker).
### Sketches for ESP8266/ESP32 modules
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/ESP32).
| Title / link | Description |
|-----------------------------------------------|-----------------------------------------------------------------------|
| [Light](/ha_mqtt_light) | A simple example to control a **led** |
| [Light](/ha_mqtt_light_with_brightness) | A simple example to control a **led** and its brightness |
| [Light](/ha_mqtt_rgb_light) | A simple example to control a **RGB led** |
| [Light](/ha_mqtt_light_with_WiFiManager_mDNS_and_OTA) | A simple example to control a **RGB led** (with **OTA** and **mDNS**)|
| [Light](https://github.com/mertenats/Arilux_AL-LC03)| An alternative firmware for the **Arilux AL-LC0X LED controller** |
| [Light](/ha_mqtt_rgbw_ligh_with_discovery) | A simple example to control a **RGBW led**, based on the **MQTT JSON Light** component (brightness, rgb, white, color temperature and effects) and including the **MQTT Discovery** |
| [Light](https://github.com/mertenats/AI-Thinker_RGBW_Bulb) | An alternative firmware for **AI-Thinker RGBW bulbs**, based on the **MQTT JSON Light** component and including the **MQTT Discovery** functionality |
Expand All @@ -39,10 +63,20 @@ Lights, sensors, switches and more can be built on top of MQTT. This section con
| [Binary Sensor](/ha_mqtt_binary_sensor_pir) | A simple example to detect **motions** (PIR motion sensor)|
| [Binary Sensor](/ha_mqtt_binary_sensor_door) | A simple example to monitor the **state** of a **window/door** |
| [Binary Sensor](/ha_mqtt_multisensor) | A full example describing how to monitor your **environment**|
| [Binary Sensor](/ha_mqtt_binary_sensor_ble_scanner)| An example describing how to trigger an action when a specific **BLE device** is detected (ESP32)|
| [Binary Sensor](/ha_mqtt_binary_sensor_nfc_scanner)| An example describing how to trigger an action when a specific **NFC tag** is detected|
### Configuration examples for Home Assistant
This section contains a few configuration examples dedicated to Home Assistant.
| Title / link | Description |
|-----------------------------------------------|-----------------------------------------------------------------------|
| [Alarm Clock](/ha_config_alarm_clock) | An example describing how to create an **alarm clock** with the components provided by HA |
| [openhome](/openhome) | A school project based on Home Assistant and using only **open source** HW and SW |
An advanced example, using WiFiManager, mDNS and OTA, is available [here](/ha_mqtt_light_with_WiFiManager_mDNS_and_OTA).
[![OpenHome with Home Assistant and MQTT](openhome/images/Youtube.png)](https://www.youtube.com/watch?v=Vh-vzFPCF2U "OpenHome with Home Assistant and MQTT")
A school project based on Home Assistant, MQTT and NodeMCU modules is available [here](openhome) and the demo, [here](https://www.youtube.com/watch?v=Vh-vzFPCF2U).
## Miscelleneous
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
Expand Down
51 changes: 28 additions & 23 deletions openhome/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Hardware:
- 1 Signal amplifier (HX711)
- 1 Photo-resistor
- 1 iBeacon
- 1 iOS device
- 1 iOS device

Software:

Expand Down Expand Up @@ -330,9 +330,12 @@ config.json:
{
"platform": "HomeAssistant",
"name": "HomeAssistant",
"host": "https://[Redacted]",
"password": "[Redacted]",
"supported_types": ["fan", "garage_door", "input_boolean", "light", "lock", "media_player", "rollershutter", "scene", "switch"]
"host": "http://127.0.0.1:8123",
"password": "yourapipassword",
"supported_types": ["automation", "binary_sensor", "climate", "cover", "device_tracker", "fan", "group", "input_boolean", "light", "lock", "media_player", "remote", "scene", "script", "sensor", "switch", "vacuum"],
"default_visibility": "hidden",
"logging": true,
"verify_ssl": true
}
]
}
Expand Down Expand Up @@ -372,25 +375,27 @@ notify:
api_key: [Redacted]
chat_id: [Redacted]
```
### Forcast.io
To use the data from Forecast.io a [account](http://forecast.io) is necessary to retrieve a `api_key`.
### ~~Forcast.io~~ Dark Sky
To use the data from ~~Forecast.io~~ darksky.net a [account](https://darksky.net/dev/register) is necessary to retrieve a `api_key`.

Configuration for Home Assistant:

```yaml
sensor:
platform: forecast
api_key: [Redacted]
monitored_conditions:
- precip_probability
- temperature
- wind_speed
- cloud_cover
- humidity
- pressure
- temperature_max
- precip_intensity_max
- platform: darksky
api_key: [Redacted]
monitored_conditions:
- precip_probability
- temperature
- wind_speed
- cloud_cover
- humidity
- pressure
- temperature_max
- precip_intensity_max
```

### Owntracks
Configuration for Home Assistant:

Expand Down Expand Up @@ -438,7 +443,7 @@ LED on the left:

- Shortest leg to GND
- Longest leg to D1, with a 220 Ohms resistor

LED on the right:

- Shortest leg to GND
Expand All @@ -449,7 +454,7 @@ PIR sensor:
- Red cable to VIN
- Yellow cable to D3
- Black cable to GND

![Schematic of the entrance module](sketches/Entrance/Schematic.png)
#### Configuration for Home Assistant

Expand Down Expand Up @@ -536,10 +541,10 @@ LED on the right:

Load cell to HX711:

- Red cable to E+
- Black cable to E-
- White cable to A-
- Green cable to A+
- Red cable to E+
- Black cable to E-
- White cable to A-
- Green cable to A+

HX711:

Expand Down

0 comments on commit ed25b97

Please sign in to comment.