<h1 id="home-automation-the-internet-of-things.">Home Automation, The
Internet of things.</h1>
<p>This is the first episode in a new series called
<a href="https://hackerpublicradio.org/series/0125.html">Home
Automation</a>. The series is open to anyone and I encourage everyone to
contribute.</p>
<p><a href="https://en.wikipedia.org/wiki/Home_automation"
class="uri">https://en.wikipedia.org/wiki/Home_automation</a> From
Wikipedia, the free encyclopedia</p>
<p>Home automation or domotics is building automation for a home. A home
automation system will monitor and/or control home attributes such as
lighting, climate, entertainment systems, and appliances. It may also
include home security such as access control and alarm systems.</p>
<p>The phrase smart home refers to home automation devices that have
internet access. Home automation, a broader category, includes any
device that can be monitored or controlled via wireless radio signals,
not just those having internet access. When connected with the Internet,
home sensors and activation devices are an important constituent of the
Internet of Things ("IoT").</p>
<p>A home automation system typically connects controlled devices to a
central smart home hub (sometimes called a "gateway"). The user
interface for control of the system uses either wall-mounted terminals,
tablet or desktop computers, a mobile phone application, or a Web
interface that may also be accessible off-site through the Internet.</p>
<h2 id="now-is-the-time">Now is the time</h2>
<p>I tried this out a few years ago, but after a lot of frustration with
configuration of esp32 arduinos, and raspberry pi's I left it be.
Recently inspired by colleagues in work, I decided to get back into it
and my initial tests show that the scene has much improved over the
years.</p>
<h3 id="youtube-playlist">Youtube Playlist</h3>
<ul>
<li><a href="https://www.youtube.com/channel/UC2gyzKcHbYfqoXA5xbyGXtQ">The
Hook Up</a>,
<a href="https://www.youtube.com/feeds/videos.xml?channel_id=UC2gyzKcHbYfqoXA5xbyGXtQ">RSS</a></li>
<li><a href="https://www.youtube.com/channel/UC67SMH0qLMJ4b4Guud0mKjw">Home
Automation Guy</a>,
<a href="https://www.youtube.com/feeds/videos.xml?channel_id=UC67SMH0qLMJ4b4Guud0mKjw">RSS</a></li>
<li><a href="https://www.youtube.com/channel/UCrVLgIniVg6jW38uVqDRIiQ">Everything
Smart Home</a>,
<a href="https://www.youtube.com/feeds/videos.xml?channel_id=UCrVLgIniVg6jW38uVqDRIiQ">RSS</a></li>
<li><a href="https://www.youtube.com/channel/UCtQpGuWY5sTUqrED4SgScVA">Smart
Solutions for Home</a>,
<a href="https://www.youtube.com/feeds/videos.xml?channel_id=UCtQpGuWY5sTUqrED4SgScVA">RSS</a></li>
<li><a href="https://www.youtube.com/channel/UCgWGycid4Pq0htjaHB1oc2g">Smart
Home Circle</a>,
<a href="https://www.youtube.com/feeds/videos.xml?channel_id=UCgWGycid4Pq0htjaHB1oc2g">RSS</a></li>
<li><a href="https://www.youtube.com/channel/UCVtQ4AOSmCFUuvixddYiSxw">Smart
Home Junkie</a>,
<a href="https://www.youtube.com/feeds/videos.xml?channel_id=UCVtQ4AOSmCFUuvixddYiSxw">RSS</a></li>
</ul>
<h1 id="home-assistant">Home Assistant</h1>
<p>The first thing we'll need is something to control it all. Something
will allow us to control our homes without requiring the cloud.</p>
<p><a href="https://en.wikipedia.org/wiki/Home_Assistant"
class="uri">https://en.wikipedia.org/wiki/Home_Assistant</a> From
Wikipedia, the free encyclopedia</p>
<p>Home Assistant is free and open-source software for home automation,
designed to be an Internet of things (IoT) ecosystem-independent
integration platform and central control system for smart home devices,
with a focus on local control and privacy. It can be accessed through a
web-based user interface, by using companion apps for Android and iOS,
or by voice commands via a supported virtual assistant, such as Google
Assistant or Amazon Alexa, and their own "Assist" (built-in local voice
assistant).</p>
<p>The Home Assistant software application is installed as a computer
appliance. After installation, it will act as a central control system
for home automation (commonly called a smart home hub), that has the
purpose of controlling IoT connectivity technology devices, software,
applications and services from third-parties via modular integration
components, including native integration components for common wireless
communication protocols such as Bluetooth, Thread, Zigbee, and Z-Wave
(used to create local personal area networks with small low-power
digital radios). Home Assistant as such supports controlling devices and
services connected via either open and proprietary ecosystems as long
they provide public access via some kind of Open API or MQTT for
third-party integrations over the local area network or the
Internet.</p>
<p>Information from all devices and their attributes (entities) that the
application sees can be used and controlled from within scripts trigger
automation using scheduling and "blueprint" subroutines, e.g. for
controlling lighting, climate, entertainment systems and home
appliances.</p>
<h2 id="summary">Summary</h2>
<ul>
<li>Original author(s): Paulus Schoutsen</li>
<li>Developer(s): Home Assistant Core Team and Community</li>
<li>Initial release: 17 September 2013</li>
<li>Repository:
<a href="https://github.com/home-assistant">https://github.com/home-assistant</a></li>
<li>Written in: Python (Python 3.11)</li>
<li>Operating system: Software appliance / Virtual appliance
(Linux)</li>
<li>Platform: ARM, ARM64, IA-32 (x86), and x64 (x86-64)</li>
<li>Type: Home automation, smart home technology, Internet of things,
task automator</li>
<li>License: Apache License (free and open-source)</li>
<li>Website:
<a href="https://www.home-assistant.io">https://www.home-assistant.io</a></li>
</ul>
<p>The following is taken from the
<a href="https://www.home-assistant.io/getting-started/concepts-terminology/">Concepts
and terminology</a> on the Home Assistant website. It is reproduced here
under the
<a href="https://github.com/home-assistant/home-assistant.io?tab=License-1-ov-file#readme">creative
commons Attribution-NonCommercial-ShareAlike 4.0 International
License</a></p>
<h2 id="integrations">Integrations</h2>
<p>Integrations are pieces of software that allow Home Assistant to
connect to other software and platforms. For example, a product by
Philips called Hue would use the Philips Hue term integration and allow
Home Assistant to talk to the hardware controller Hue Bridge. Any Home
Assistant compatible term devices connected to the Hue Bridge would
appear in Home Assistant as <a href="#devices">devices</a>.</p>
<p><a
href="https://hackerpublicradio.org/eps/hpr4099/hpr4099/integrations-new.png"><img
src="https://hackerpublicradio.org/eps/hpr4099/hpr4099/integrations-new_thumbnail.png"
title="Click on the thumbnail to see the full picture"
alt="Integrations" /></a></p>
<p>For a full list of compatible term integrations, refer to the <a
href="https://www.home-assistant.io/integrations">integrations</a>
documentation.</p>
<p>Once an term integration has been added, the hardware and/or data are
represented in Home Assistant as <a href="#devices">devices and
entities</a>.</p>
<h2 id="entities">Entities</h2>
<p>Entities are the basic building blocks to hold data in Home
Assistant. An term entity represents a term sensor, actor, or function
in Home Assistant. Entities are used to monitor physical properties or
to control other term entities. An term entity is usually part of a term
device or a term service. Entities have term states.</p>
<h2 id="devices">Devices</h2>
<p>Devices are a logical grouping for one or more term entities. A term
device may represent a physical term device, which can have one or more
sensors. The sensors appear as entities associated with the term device.
For example, a motion sensor is represented as a term device. It may
provide motion detection, temperature, and light levels as term
entities. Entities have states such as <em>detected</em> when motion is
detected and <em>clear</em> when there is no motion.</p>
<p><a
href="https://hackerpublicradio.org/eps/hpr4099/hpr4099/home-assistant-device_01.png"><img
src="https://hackerpublicradio.org/eps/hpr4099/hpr4099/home-assistant-device_01_thumbnail.png"
title="Click on the thumbnail to see the full picture"
alt="Home Assistant device" /></a></p>
<p>Devices and entities are used throughout Home Assistant. To name a
few examples:</p>
<ul>
<li><a
href="https://www.home-assistant.io/getting-started/onboarding_dashboard/">Dashboards</a>
can show a state of an term entity. For example, if a light is on or
off.</li>
<li>An <a href="#automations">automation</a> can be triggered from a
state change on an term entity. For example, a motion sensor entity
detects motion and triggers a light to turn on.</li>
<li>A predefined color and brightness setting for a light saved as a <a
href="#scenes">scene</a>.</li>
</ul>
<p><a
href="https://hackerpublicradio.org/eps/hpr4099/hpr4099/home-assistant-device_02.png"><img
src="https://hackerpublicradio.org/eps/hpr4099/hpr4099/home-assistant-device_02_thumbnail.png"
title="Click on the thumbnail to see the full picture"
alt="Home Assistant device" /></a></p>
<h2 id="areas">Areas</h2>
<p>An area in Home Assistant is a logical grouping of term devices and
term entities that are meant to match areas (or rooms) in the physical
world: your home. For example, the <code>living room</code> area groups
devices and entities in your living room. Areas allow you to target
service calls at an entire group of devices. For example, turning off
all the lights in the living room. Locations within your home such as
living room, dance floor, etc. Areas can be assigned to term floors.
Areas can also be used for automatically generated cards, such as the <a
href="https://www.home-assistant.io/dashboards/area/">Area card</a>.</p>
<h2 id="automations">Automations</h2>
<p>A set of repeatable term actions that can be set up to run
automatically. Automations are made of three key components:</p>
<ol type="1">
<li>Triggers - events that start an term automation. For example, when
the sun sets or a motion sensor is activated.</li>
<li>Conditions - optional tests that must be met before an term action
can be run. For example, if someone is home.</li>
<li>Actions - interact with term devices such as turn on a light.</li>
</ol>
<p>To learn the basics about term automations, refer to the <a
href="https://www.home-assistant.io/docs/automation/basics/">automation
basics</a> page or try <a
href="https://www.home-assistant.io/getting-started/automation">creating
an automation</a> yourself.</p>
<p><a
href="https://hackerpublicradio.org/eps/hpr4099/hpr4099/automation-editor.png"><img
src="https://hackerpublicradio.org/eps/hpr4099/hpr4099/automation-editor_thumbnail.png"
title="Click on the thumbnail to see the full picture"
alt="Automations" /></a></p>
<h2 id="scripts">Scripts</h2>
<p>Similar to term automations, scripts are repeatable term actions that
can be run. The difference between term scripts and term automations is
that term scripts do not have triggers. This means that term scripts
cannot automatically run unless they are used in an term automations.
Scripts are particularly useful if you perform the same term actions in
different term automations or trigger them from a dashboard. For
information on how to create term scripts, refer to the <a
href="https://www.home-assistant.io/integrations/script/">scripts</a>
documentation.</p>
<p><a
href="https://hackerpublicradio.org/eps/hpr4099/hpr4099/script_01.png"><img
src="https://hackerpublicradio.org/eps/hpr4099/hpr4099/script_01_thumbnail.png"
title="Click on the thumbnail to see the full picture"
alt="Scripts" /></a></p>
<h2 id="scenes">Scenes</h2>
<p>Scenes allow you to create predefined settings for your term devices.
Similar to a driving mode on phones, or driver profiles in cars, it can
change an environment to suit you. For example, your <em>watching
films</em> term scene may dim the lighting, switch on the TV and
increase its volume. This can be saved as a term scene and used without
having to set individual term devices every time.</p>
<p>To learn how to use term scenes, refer to the <a
href="https://www.home-assistant.io/integrations/scene/">scene</a>
documentation.</p>
<p><a
href="https://hackerpublicradio.org/eps/hpr4099/hpr4099/scene_02.png"><img
src="https://hackerpublicradio.org/eps/hpr4099/hpr4099/scene_02_thumbnail.png"
title="Click on the thumbnail to see the full picture"
alt="Scenes" /></a></p>
<h2 id="add-ons">Add-ons</h2>
<p>Depending on your <a
href="https://www.home-assistant.io/installation">installation type</a>,
you can install third party add-ons. Add-ons are usually apps that can
be run with Home Assistant but provide a quick and easy way to install,
configure, and run within Home Assistant. Add-ons provide additional
functionality whereas term integrations connect Home Assistant to other
apps.</p>
<p><a
href="https://hackerpublicradio.org/eps/hpr4099/hpr4099/add-ons.png"><img
src="https://hackerpublicradio.org/eps/hpr4099/hpr4099/add-ons_thumbnail.png"
title="Click on the thumbnail to see the full picture"
alt="Add-ons" /></a></p>
