Skip to main content

So you want to create a Smart Home? Are you unsure what to do and what to get?  Join us on this series when we tackle a new home and evolve it into an automated home.  This episode we are installing and setting up Home Assistant on the Raspberry Pi 4, getting everything ready to install our light switches and automations.

Parts List
Raspberry Pi 4 https://amzn.to/2sNZjCg
Power Supply - https://amzn.to/2TO4Ofn
64gb Micro SD Card - https://amzn.to/2Rh4aFF
Fliirc Case - https://amzn.to/2QuUDKR
APC Battery Backup - https://amzn.to/2utcY21

Others
Martin Jerry Dimmer - https://amzn.to/2Thgun0
Martin Jerry Switch - https://amzn.to/2qowzv3
Lohas 4 pack - https://amzn.to/2Z4qiWd

Hassio Install Guide - https://www.home-assistant.io/hassio/installation/

MQTT Addon Sample Config (Post 105.x)

logins:
- username: diymqtt
password: mqttdiy
anonymous: false
customize:
active: false
folder: mosquitto
certfile: fullchain.pem
keyfile: privkey.pem
require_certificate: false

Products We Use/Recommend
Amazon US - https://amzn.to/2YZNDeO
Amazon UK - https://amzn.to/2TnG2R4
Amazon CA - https://amzn.to/2HchPZe

Come chat with us!
Discord - https://discord.gg/bNtTF2v
Patreon - https://www.patreon.com/digiblurDIY

Links to products provided through the Amazon Affiliate program.

Amcrest AD110 Doorbell integration with Blue Iris and Home Assistant.  I enjoyed this camera and bought myself a 2nd one due to the local control and integration features.  You can also utilize Micro SD card storage as well as Cloud Storage.

Amcrest AD110 Video Doorbell - https://amzn.to/2usgiKT
Doorbell Transformer (only if needed) - https://amzn.to/2seBWSg
Coupon Code - DIGIBLUR

Amcrest Installation Video - https://youtu.be/RWxDH6Ap4FQ

Update#2: New Pull Request on HomeAssistant to add the correct motion sensor for the PIR! Hope to see it merged soon!  https://github.com/home-assistant/home-assistant/pull/30932

UPDATE: It's been found by myself and other users after the video launch that the HA Motion Detection binary is from the video itself and is very sensitive.  In my initial testing it was fine during the day while making the video.  If you find yours too sensitive I'd use a NVR based binary sensor such as Blue Iris to trigger it in the meantime until they expose the PIR and Button push.

-=-=-=- Sample Home Assistant -=-=-=- stream:
amcrest:
- host: 192.168.1.50
name: Doorbell Camera
username: admin
password: yourDEVICEpassword
stream_source: rtsp
binary_sensors:
- motion_detected
- online

Sample Lovelace HomeAssistant Card
aspect_ratio: 50%
camera_view: live
entity: camera.amcrestdoor
name: AmcrestDoorBell
type: picture-entity

Products We Use/Recommend
Amazon US - https://amzn.to/2YZNDeO
Amazon UK - https://amzn.to/2TnG2R4
Amazon CA - https://amzn.to/2HchPZe

Come chat with us!
Discord - https://discord.gg/bNtTF2v
Patreon - https://www.patreon.com/digiblurDIY

Links to products provided through the Amazon Affiliate program.

So you want to create a Smart Home? Are you unsure what to do and what to get?  Join us on this series when we tackle a new home and evolve it into an automated home.  

 -=-=-Parts List-=-=-

Raspberry Pi 4 https://amzn.to/2sNZjCg

Power Supply - https://amzn.to/2TO4Ofn

64gb Micro SD Card - https://amzn.to/2Rh4aFF

Fliirc Case - https://amzn.to/2QuUDKR 

APC Battery Backup - https://amzn.to/2utcY21

Others--

Martin Jerry Dimmer - https://amzn.to/2Thgun0

Martin Jerry Switch - https://amzn.to/2qowzv3

Lohas 4 pack - https://amzn.to/2Z4qiWd

Hassio Install Guide - https://www.home-assistant.io/hassio/installation/

Products We Use/Recommend

Amazon US - https://amzn.to/2YZNDeO
Amazon UK - https://amzn.to/2TnG2R4
Amazon CA - https://amzn.to/2HchPZe

Come chat with us!
Discord - https://discord.gg/bNtTF2v
Patreon - https://www.patreon.com/digiblurDIY

Links to products provided through the Amazon Affiliate program.

Skip to the nonsense and just buy the thing here on Amazon: https://amzn.to/2S9MFpX

In my weirdo tech geek cruising of FCC certifications I stumbled upon an interesting 8 button scene controller by TopGreener.  It fits in a standard decora face plate, flexible to fit in whatever gang size box you choose with standard face plates. The ESP8266 based Tuya module in the internal pictures caught my attention.  I searched the stores for it but alas it wasn't for sell yet. Then the Jedi mind wipe of the holiday season happened, fast forward to January and a viewer, Buckyfan reminded me about this switch and had one in hand!  I found the switch on Amazon and ordered mine immediately.  

So what is this thing and what can I do with it?  It is designed to replace an existing light switch in your home and then add 7 other buttons with single and double tap actions.  Of course following our motto of "Get your shhhzzz... out of the cloud!" we flashed ours with Tasmota using Tuya-Convert.  It doesn't require any special template or anything, simply choose the TuyaMCU module in the Configure Module section and its practically done.  You don't even need to follow my TuyaMCU setup video as the relay/button for the standard light switch is ready to roll.

But what about the other 7 buttons?  Well first that's up to you to come up with 14 actions that you can remember what they all do.  As someone suggested in the live stream showing this switch, it would be mind boggling to put 4 of these side by side.  Just make sure you leave a book for the other household members!  The technical side of things is pretty easy.  There are two methods we will use to tackle this switch/scene controller; Tasmota Rules and NodeRed.

To do all the processing of the buttons with NodeRed, apply this rule in the Tasmota console:

Rule1 on TuyaReceived#Data do publish Scene1/data %value% endon

Then apply the following command to turn the rule on:

Rule1 1

This will make all of the serial messages from the TuyaMCU that interacts with the button presses to be sent to a custom MQTT topic of Scene1/data , you can change this topic in the rule if you want something different.

Then utilize a flow such as the following:

In the Switch Node I have 7 of the 14 buttons as logic branches to call various functions in Home Assistant or whatever you choose to do.  You could also do the same thing inside of Home Assistant automations if you are more comfortable with those.

Serial Message to Button Translations
#1 55AA00070005650400010075   Double Tap - 55AA000700056C040001007C
#2 55AA00070005660400010076   Double Tap - 55AA000700056D040001007D
#3 55AA00070005670400010077   Double Tap - 55AA000700056E040001007E
#4 55AA00070005680400010078   Double Tap - 55AA000700056F040001007F
#5 55AA00070005690400010079   Double Tap - 55AA00070005700400010080
#6 55AA000700056A040001007A  Double Tap - 55AA00070005710400010081
#7 55AA000700056B040001007B  Double Tap - 55AA00070005720400010082

An alternate look, you can move all the translations to Tasmota rules and have it push the various topics/payloads by using these rules.

rule1 on TuyaReceived#Data=55AA00070005650400010075 do publish scene/button1 toggle endon
on TuyaReceived#Data=55AA00070005660400010076 do publish scene/button2 toggle endon
on TuyaReceived#Data=55AA00070005670400010077 do publish scene/button3 toggle endon
on TuyaReceived#Data=55AA00070005680400010078 do publish scene/button4 toggle endon
on TuyaReceived#Data=55AA00070005690400010079 do publish scene/button5 toggle endon
on TuyaReceived#Data=55AA000700056A040001007A do publish scene/button6 toggle endon

rule2 on TuyaReceived#Data=55AA000700056B040001007B do publish scene/button7 toggle endon
on TuyaReceived#Data=55AA000700056C040001007C do publish scene/button1b toggle endon
on TuyaReceived#Data=55AA000700056D040001007D do publish scene/button2b toggle endon
on TuyaReceived#Data=55AA000700056E040001007E do publish scene/button3b toggle endon
on TuyaReceived#Data=55AA000700056F040001007F do publish scene/button4b toggle endon

rule3 on TuyaReceived#Data=55AA00070005700400010080 do publish scene/button5b toggle endon
on TuyaReceived#Data=55AA00070005710400010081 do publish scene/button6b toggle endon
on TuyaReceived#Data=55AA00070005720400010082 do publish scene/button7b toggle endon

Don't forget to turn on your rules with:
Rule1 1
Rule2 1
Rule3 1

Let us know what you plan to use this switch for in Discord and share
some ideas with us!

The 2.3 refresh of the Tuya Convert process with a few additional features such as the Tuya Donor, custom bin file menu, start with ESPHome, update Tasmota, etc.  Flash all your devices without any soldering or opening of devices!  This process allows you to flash your previously locked out devices that wouldn't flash before on the original version of Tuya Convert.  TC will convert both older and newer firmware devices automatically.  Use your Raspberry Pi, Linux PC, Proxmox, etc to unlock all the amazing features of open source firmware.  Protect your privacy and data and keep it in your home.

Parts List
Raspberry Pi 4 or Pi 3
32gb Micro SD Card
Fliirc Case (optional: great RPi heat sink case)
Wemos D1 Mini (optional)

Tuya based favorites
Aoycocr Plugs in Video
Martin Jerry Dimmer
Martin Jerry Switch
4 pack Smart Plugs
Aoycocr Switch 3 LED
Lohas Smart Light 4 pack
and many more

Zemismart downlights
Zemismart downlight (Amazon)

Links
Raspbian Buster Lite - https://downloads.raspberrypi.org/raspbian_lite/images/raspbian_lite-2019-09-30/2019-09-26-raspbian-buster-lite.zip
Etcher Link - https://www.balena.io/etcher/
Putty Link - https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
Tuya Donor Files - https://github.com/digiblur/Tuya-Convert-Donor

Set your WiFi Country Code!! https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md

Steps for SSH/Putty Terminal
sudo apt update
sudo apt install git
git clone https://github.com/ct-Open-Source/tuya-convert
cd tuya-convert
./install_prereq.sh
./start_flash.sh

NOTE: If you have an issue with a device not working and it is an ESP82xx based device, you can try the older 2.3 branch; delete your old tuya-convert folder, run the git command below then run install_prereq.sh again.

git clone https://github.com/digiblur/tuya-convert -b development

Others

Tasmota - https://github.com/arendst/Tasmota
EspHome - https://esphome.io/
Tasmota MQTT Configuration How-to - https://youtu.be/KOg5qwO3Rh4
ct-Tuya-Convert Github - https://github.com/ct-Open-Source/tuya-convert

Products We Use/Recommend

Amazon US - https://amzn.to/2YZNDeO
Amazon UK - https://amzn.to/2TnG2R4
Amazon CA - https://amzn.to/2HchPZe

Come chat with us!
Discord - https://discord.gg/bNtTF2v
Patreon - https://www.patreon.com/digiblurDIY

Links to products provided through the Amazon Affiliate program.

The Amcrest 1080P Pan Tilt Zoom Security Camera with 12x optical zoom. POE+, WiFi, and 4MP models available. The optical zoom and the ability to zoom into dark areas and see is pretty impressive. Utilizing the HomeAssistant streaming integration you can also control the camera via automations with all local control commands and RTSP & ONVIF. Models1080P POE+ IP2M-853EW
4MP POE+ IP4M-1053EW
1080P WiFi IP2M-858W
Home Assistant Integration - https://www.home-assistant.io/integrations/amcrest/Amcrest Firmware - https://amcrest.com/firmwaredownloads Products We Use/RecommendAmazon US - https://amzn.to/2YZNDeOAmazon UK - https://amzn.to/2TnG2R4Amazon CA - https://amzn.to/2HchPZe Come chat with us!Discord - https://discord.gg/bNtTF2vPatreon - https://www.patreon.com/digiblurDIY #Amcrest Camera Models IP2M-853EW IP2M-858W IP4M-1053EW Links to products provided through the Amazon Affiliate program.