Nizzies Home Automation Efforts: Difference between revisions

From NURDspace
No edit summary
No edit summary
 
(19 intermediate revisions by the same user not shown)
Line 10: Line 10:
}}
}}
= The brain: Banana Pi M1 with Home Assistant =
= The brain: Banana Pi M1 with Home Assistant =
My Pi 2's micro sd card broke very quickly, so I've been working on a more stable replacement in the form of a [http://www.lemaker.org/product-bananapro-specification.html Banana Pro board]. I installed Bananian on the sd card and then moved the installation to a real hard disk (yay spindles o/) connected to the SATA port. This board died on me a couple of weeks later, so I ordered a [http://www.banana-pi.org/m1.html Banana Pi M1] 1GB and inserted the microSD card into the standard SD slot using a convertor, so we're up and running again.  
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 ==
Running in docker for easier switching of versions. See [https://hub.docker.com/r/homeassistant/armhf-homeassistant/tags/ here].
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.


= Sensors =
= Sensors =
Line 21: Line 21:
This is a [https://frightanic.com/iot/comparison-of-esp8266-nodemcu-development-boards/#v3 Lolin Nodemcu board].
This is a [https://frightanic.com/iot/comparison-of-esp8266-nodemcu-development-boards/#v3 Lolin Nodemcu board].
==== Gateway function ====
==== Gateway function ====
The gateway will communicate with the nodes using a NRF24L01+ radio and runs the [https://www.mysensors.org/build/esp8266_gateway MySensors ESP8266 Gateway code].
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 ====
==== Gateway sensors ====
The gateway also acts as a platform for sensors on it's own.
The gateway also acts as a platform for sensors on it's own.
Line 29: Line 29:
Counts pulses coming from LED on my energy meter. This way I can calculate current power draw in the entire house.
Counts pulses coming from LED on my energy meter. This way I can calculate current power draw in the entire house.
=== Nodes ===
=== Nodes ===
I will use the hardware designed by [[User:Zarya]] as mentioned in [[NrfSensorNode]]. They will run the library from https://www.mysensors.org/.
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 ====
==== Sensors ====
===== DHT11 =====
Humidity and temperature sensor. I only use humidity since the DS18B20 is more accurate for temperatures.
===== Dallas temperature =====
===== Dallas temperature =====
== USB webcam ==
Dallas DS18B20 temperature sensor.
Followed https://home-assistant.io/blog/2016/06/23/usb-webcams-and-home-assistant/ to have Home Assistant look at lastsnap.jpg, a symlink generated by motion which points to the latest image taken. Not particularly useful yet, because of the bad image quality, but maybe I can use it for things like more advanced presence detection in the future. To be continued...
===== 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. Hue integrates with Home Assistant very easily: https://home-assistant.io/components/light.hue/. Lights are automatically found once you give HA access to the bridge (push button on bridge when HA ask for it).
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].
=== Hue Bridge v1 ===
Talks to the lights over Zigbee Light Link and connects to the network over UTP
=== Hue color lamps ===
=== 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/.
3 LED lights that work just fine, although 2 of them are missing the glass bit. They do whites and colors \o/.
Line 51: Line 60:
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 =  
= Automations =  
== Lights on when I get home ==
== Lights on on movement ==
I wanted to see things then I get home in the dark, so I pointed one of the hue lights outward such that it illuminated my garden and did some automation.
In several rooms I use PIR sensors to trigger lights to turn on (when sun is down).
Certain lights, including the one pointing outwards go on when my mobile phone connects to my wifi network and the following conditions are met:
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.
* It's after sunset
== Powerdown ==
* All hue lights are off (which is in itself another check that I was previously away)
When I go to sleep, I charge my phone. This triggers:
In order to have better wifi coverage I extended my wifi network using OpenWRT and this guide: [https://wiki.openwrt.org/doc/recipes/atheroswds]. This works pretty well. The system also sends me an email whenever the automation is triggered, so I'm reminded the lights are turned on.
- Lights off
- Kodi devices shutdown
- Thermostat to 17.5 °C


= Opentherm gateway =
= Opentherm gateway =
I have the same gateway as [[OpenTherm Gateway|we have in the space]]. It is not working yet with the new [https://www.home-assistant.io/components/opentherm_gw/ opentherm_gw component in hass]. I'm experiencing similar issues as in [https://github.com/home-assistant/home-assistant/issues/17263 this issue] with Home Assistant  0.81.0.dev0. The gateway and esp8266 with Easpeasy seem to work correctly. I can see data with otmonitor, or by telnetting to the esp8266,
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/.
 
= Links I might need later on =
* [http://forum.lemaker.org/forum.php?mod=viewthread&tid=10852&fromuid=1602 Banana Pro Pinout]

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/.