Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Building Smart Home Automation Solutions with Home Assistant

You're reading from   Building Smart Home Automation Solutions with Home Assistant Configure, integrate, and manage hardware and software systems to automate your home

Arrow left icon
Product type Paperback
Published in Sep 2023
Publisher Packt
ISBN-13 9781801815291
Length 356 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Marco Antonio Santuci Carvalho Marco Antonio Santuci Carvalho
Author Profile Icon Marco Antonio Santuci Carvalho
Marco Antonio Santuci Carvalho
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Preface 1. Part 1: Introduction to Home Assistant – Installation and Configuration
2. Chapter 1: Understanding Home Automation Systems FREE CHAPTER 3. Chapter 2: Getting Started with Home Assistant 4. Part 2: Install, Create, and Hack Sensors and Actuators
5. Chapter 3: Hands-On Project 1 – Creating Your Own Sensor 6. Chapter 4: Hacking a Commercial Actuator to Work with Home Assistant 7. Part 3: Automations, Customizations, and Integrations Using Home Assistant
8. Chapter 5: Creating Automations Using Home Assistant 9. Chapter 6: Doing More Using Integrations and Customizations 10. Part 4: Expanding Home Assistant’s Capabilities
11. Chapter 7: Extending Home Automation Capabilities Using Add-ons 12. Chapter 8: Installing and Setting Up Home Assistant Container 13. Part 5: Learn by Doing and Future Trends
14. Chapter 9: Hands-On Project 2 – Creating an LED Strip Controller and Adding It to Home Assistant 15. Chapter 10: Hands-On Project 3 – Creating a Five-Zone Temperature Logger for Your Home 16. Chapter 11: The Road Ahead in Home Automation Technologies 17. Index 18. Other Books You May Enjoy

Understanding hacking a sensor or actuator

As mentioned previously, the hacking operation is accomplished by replacing the original device firmware with other firmware that has some integration with Home Assistant. You might have the following motivations to hack the firmware of a sensor or actuator:

  • Integration is not yet available in Home Assistant
  • To achieve better control or management than the original device manufacturer’s integration
  • To change or add features to an integration by changing the sensor or actuator firmware

The main motivation when I started to hack the sensors and actuators for my home was because initial Wi-Fi actuator plugs I purchased some years ago don’t have integration to work with Home Assistant. Nowadays, you probably would not need to hack the firmware of your device since most new devices have integration available to work with Home Assistant.

You might opt to hack a sensor or actuator so that it can be managed using Tasmota or ESPHome integration. This will give a lot of flexibility when you need to update the firmware, if required, or when you want to implement advanced automation using Node-RED, for example. Also, using a firmware that's source code is known to you, will allow you to get a better control and understanding of how the data from your home will be shared. There are applications provided by device manufacturers that can store data from your home in the cloud or on their servers, but you do not have control over how this data will be used.

Another advantage of hacking the firmware of your device is that you can write your own code and deploy it or you can change the source code for Tasmota, adding features you want.

In the next subsection, you will learn how to choose and convert the device to be hacked to install Tasmota.

How to choose a commercial sensor or actuator to be used with Tasmota

First, we must mention that as we will hack the system with Tasmota firmware, the device must be compatible with the ESP8266 and ESP32 platforms. The issue is that I cannot find a way to discover whether a device is based on these platforms without opening it. So, instead of purchasing these devices and later discovering they are not compatible with Tasmota, this website provides a very complete list of different devices compatible with Tasmota: https://templates.blakadder.com. The website lists devices pre-flashed with Tasmota from the manufacturer and devices by type. It also lists devices that are not compatible with Tasmota.

If you purchased a sensor and it has no integration with Home Assistant, look on the web page mentioned to see whether there is compatibility with Tasmota. If it is compatible, follow the instructions for each device to flash and configure Tasmota to it.

Note

Tasmota can also handle a different chipset, called Tuya. This is composed of a microcontroller and a Wi-Fi module. It is possible to flash the firmware to the microcontroller and configure the Wi-Fi module via a serial port. This configuration in Tasmota is called TuyaMCU.

In the next section, we will go over the basic tools for hacking a device and proceed with the conversion of its firmware in detailed steps.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime