Nizzies Home Automation Efforts: Difference between revisions

From NURDspace
No edit summary
No edit summary
 
(37 intermediate revisions by the same user not shown)
Line 5: Line 5:
|Niche=Electronics
|Niche=Electronics
|Purpose=Fun
|Purpose=Fun
|Picture=Home-assistant.png
|Tool=No
|Tool=No
|Location=Niz
|Location=Niz
}}
}}
= The brain: Raspberry Pi with Home Assistant =
= The brain: Banana Pi M1 with Home Assistant =
My Pi 2's micro sd card broke very quickly, so I'm working on a more stable replacement.
I am using a [http://www.banana-pi.org/m1.html Banana Pi M1] 1GB with [https://www.armbian.com/ Armbian]. It needs an SD card to boot, but after that everything runs from a connected 2'5" SATA disk. It sometimes has some issues with resetting SATA link. I suspect it has something to do with power, since it seemed worse with another 5V adapter. Still not ideal. I might at some point replace the disk with an SSD.
== Home Assistant ==
== Home Assistant ==
[https://home-assistant.io/getting-started/installation-raspberry-pi-all-in-one/ Home Assistant installation] did not work because some script assumes that the user is pi, and mine isn't. Also it seems that python 2.7 is used here, where as in [https://home-assistant.io/getting-started/installation-raspberry-pi/ Installation instructions] python 3 is needed. This last link worked better, but I needed to install some dependencies by hand first.
Running Home Assistant Supervised, using [https://github.com/home-assistant/supervised-installer this installer]. This way I can update through the webGUI and install add-ons etc.
=== Useful commands for my own reference ===
<pre>sudo journalctl -f -u home-assistant@homeassistant</pre>
<pre>sudo service home-assistant@homeassistant restart</pre>


= Sensors =
= Sensors =
== NRF nodes ==
== MySensors ==
Most probably I will use the hardware designed by [[User:Zarya]] as mentioned in [[NrfSensorNode]]. They will run the library from https://www.mysensors.org/.
Home Assistant has excellent support for [https://www.mysensors.org MySensors sensors].
 
=== Gateway ===
==== Hardware ====
This is a [https://frightanic.com/iot/comparison-of-esp8266-nodemcu-development-boards/#v3 Lolin Nodemcu board].
==== Gateway function ====
The gateway communicates with the nodes using a NRF24L01+ radio and runs the [https://www.mysensors.org/build/esp8266_gateway MySensors ESP8266 Gateway code]. It communicates with Home Assistant over wifi.
==== Gateway sensors ====
The gateway also acts as a platform for sensors on it's own.
===== DHT11 =====
Humidity and temperature.
===== Pulse counter =====
Counts pulses coming from LED on my energy meter. This way I can calculate current power draw in the entire house.
=== Nodes ===
I am using the hardware designed by [[User:Zarya]] as mentioned in [[NrfSensorNode]]. They run arduino sketches using the library from https://www.mysensors.org/.
==== Sensors ====
===== DHT11 =====
Humidity and temperature sensor. I only use humidity since the DS18B20 is more accurate for temperatures.
===== Dallas temperature =====
Dallas DS18B20 temperature sensor.
===== PIR =====
Simple [https://nl.aliexpress.com/item/32952818294.html PIR sensors for detection of movement].
== ESPHome ==
Makes use of ESP8266 or ESP32 based boards. See [https://esphome.io/ ESPHome].
=== PIR ===
Simple [https://nl.aliexpress.com/item/32952818294.html PIR sensors for detection of movement].
=== Temperature/barometric pressure ===
This uses the [https://esphome.io/components/sensor/bmp085.html BMP085 component]. If I'm not mistaken I've got the BMP180.
== Zigbee ==
=== Doorbell button ===
Not in use yet. It's a [https://www.zigbee2mqtt.io/devices/HG06668.html Silvercrest HG06668] bought at [https://www.lidl-shop.nl/p/silvercrest-draadloze-deurbel-zigbee-smart-home/p100315344 LIDL shop]
= Lights =
= Lights =
== Philips Hue ==
== Philips Hue ==
Got some Philips Hue stuff for cheap. It's the Hue Bridge v1, and 3 LED lights that work just fine, although 2 of them are missing the glass bit. They do whites and colors \o/.
I got rid of the Bridge V1 I was using and started usingZigbee2MQTT in the form of a [https://github.com/zigbee2mqtt/hassio-zigbee2mqtt Hass.io addon].
They are supposed to integrate with Home Assistant very easily: https://home-assistant.io/components/light.hue/
=== Hue color lamps ===
3 LED lights that work just fine, although 2 of them are missing the glass bit. They do whites and colors \o/.
=== LivingColors Aura ===
Does colors and whites.
=== Hue white ===
White light only, but are still dimmable. Got 2 of them.
=== LivingWhites ===
Also dimmable white light. Got 2.
<gallery>
<gallery>
Image:Hue.jpg
Image:Hue.jpg
</gallery?
</gallery>
== Sonoff Basic ==
Sonoff basic running [https://esphome.io/ ESPHome] that toggles two lights at the same time. Connects with Home Assistant through the [https://esphome.io/components/api.html Native API].
 
== SK6812 LED string ==
These are 50 addressable SK6812 LEDs. They need a 5V power source and are connected to a NodeMCU DevKit board running ESPHome with the [https://esphome.io/components/light/neopixelbus.html Neopixelbus component], since it was glitchy with the [https://esphome.io/components/light/fastled.html FastLED component].
Connection with Home Assistant through the [https://esphome.io/components/api.html Native API].
= Automations =
== Lights on on movement ==
In several rooms I use PIR sensors to trigger lights to turn on (when sun is down).
For the bedroom PIR I use a condition: if my phone is charging (this typically means I'm asleep or trying to) the automation doesn't fire.
== Powerdown ==
When I go to sleep, I charge my phone. This triggers:
- Lights off
- Kodi devices shutdown
- Thermostat to 17.5 °C
 
= Opentherm gateway =
I have the same gateway as [[OpenTherm Gateway|we have in the space]]. It is working with the new [https://www.home-assistant.io/components/opentherm_gw/ opentherm_gw component in hass]. I was experiencing similar issues as in [https://github.com/home-assistant/home-assistant/issues/17263 this] with Home Assistant  0.81.0.dev0, but since HASS 0.82.1 and since I updated the Espeasy on the nodemcu to mega-20181124 it works \o/.

Latest revision as of 18:28, 29 March 2021

Nizzies Home Automation Efforts
Home-assistant.png
Participants Dennis
Skills 1337 Skillz
Status Active
Niche Electronics
Purpose Fun
Tool No
Location Niz
Cost
Tool category

Nizzies Home Automation Efforts

Home-assistant.png {{#if:No | [[Tool Owner::{{{ProjectParticipants}}} | }} {{#if:No | [[Tool Cost::{{{Cost}}} | }}

The brain: Banana Pi M1 with Home Assistant

I am using a Banana Pi M1 1GB with Armbian. It needs an SD card to boot, but after that everything runs from a connected 2'5" SATA disk. It sometimes has some issues with resetting SATA link. I suspect it has something to do with power, since it seemed worse with another 5V adapter. Still not ideal. I might at some point replace the disk with an SSD.

Home Assistant

Running Home Assistant Supervised, using this installer. This way I can update through the webGUI and install add-ons etc.

Sensors

MySensors

Home Assistant has excellent support for MySensors sensors.

Gateway

Hardware

This is a Lolin Nodemcu board.

Gateway function

The gateway communicates with the nodes using a NRF24L01+ radio and runs the MySensors ESP8266 Gateway code. It communicates with Home Assistant over wifi.

Gateway sensors

The gateway also acts as a platform for sensors on it's own.

DHT11

Humidity and temperature.

Pulse counter

Counts pulses coming from LED on my energy meter. This way I can calculate current power draw in the entire house.

Nodes

I am using the hardware designed by User:Zarya as mentioned in NrfSensorNode. They run arduino sketches using the library from https://www.mysensors.org/.

Sensors

DHT11

Humidity and temperature sensor. I only use humidity since the DS18B20 is more accurate for temperatures.

Dallas temperature

Dallas DS18B20 temperature sensor.

PIR

Simple PIR sensors for detection of movement.

ESPHome

Makes use of ESP8266 or ESP32 based boards. See ESPHome.

PIR

Simple PIR sensors for detection of movement.

Temperature/barometric pressure

This uses the BMP085 component. If I'm not mistaken I've got the BMP180.

Zigbee

Doorbell button

Not in use yet. It's a Silvercrest HG06668 bought at LIDL shop

Lights

Philips Hue

I got rid of the Bridge V1 I was using and started usingZigbee2MQTT in the form of a Hass.io addon.

Hue color lamps

3 LED lights that work just fine, although 2 of them are missing the glass bit. They do whites and colors \o/.

LivingColors Aura

Does colors and whites.

Hue white

White light only, but are still dimmable. Got 2 of them.

LivingWhites

Also dimmable white light. Got 2.

Sonoff Basic

Sonoff basic running ESPHome that toggles two lights at the same time. Connects with Home Assistant through the Native API.

SK6812 LED string

These are 50 addressable SK6812 LEDs. They need a 5V power source and are connected to a NodeMCU DevKit board running ESPHome with the Neopixelbus component, since it was glitchy with the FastLED component. Connection with Home Assistant through the Native API.

Automations

Lights on on movement

In several rooms I use PIR sensors to trigger lights to turn on (when sun is down). For the bedroom PIR I use a condition: if my phone is charging (this typically means I'm asleep or trying to) the automation doesn't fire.

Powerdown

When I go to sleep, I charge my phone. This triggers: - Lights off - Kodi devices shutdown - Thermostat to 17.5 °C

Opentherm gateway

I have the same gateway as we have in the space. It is working with the new opentherm_gw component in hass. I was experiencing similar issues as in this with Home Assistant 0.81.0.dev0, but since HASS 0.82.1 and since I updated the Espeasy on the nodemcu to mega-20181124 it works \o/.