This article comes from the Breadboard Community DIY Contest. If you have DIY works, feel free to share your electronic designs and win a DJI Drone!
1 Overview
Typically, the concept of a smart home includes Xiaomi voice assistants, Baidu speakers, smart doorbells, remote-controlled wireless LED lights, wireless switches, and smart locks. More broadly, there are the pioneers of smart homes like Amazon Echo, Echo Dot, Apple Home Assistant, and various independent systems, such as the less mainstream QP Alarm Clock, etc. The creation of this system, from the design and connection of terminal devices, is a large system engineering project. Is it possible to fit all of this into one APP application? Is it possible? Or is it possible to create an independent smart home system by oneself? Experts may find it trivial, but what about lazy people?
Actually, it is entirely possible as long as you master the Home Assistant system (Installation – Home Assistant), low-code can solve it all.
2 Required Hardware
2.1 Raspberry Pi 4B. If you don’t want to spend money, the Raspberry Pi collecting dust at home is the first choice. Here, we use one Raspberry Pi 4B. Actually, a desktop or Android device can also work, but starting with a Raspberry Pi is the most cost-effective, full-featured, and low-priced option.2.2 Raspberry Pi Pico W, ESP modules, etc., can be chosen freely. 2.3 Select controlled LEDs, Grove Sensors. 2.4 Commercial QP Alarm Clocks, Xiaomi TVs, etc. 2.5 Raspberry Pi power supply, SD card larger than 32G, Wi-Fi router, and other wireless networking systems.
3 Let’s Get Started
3.1 Install the Home Assistant system on Raspberry Pi 4B.
First, download the Raspberry Pi Pi Imager
After installation, start the Pi Imager, select the latest Home Assistant operating system from the options
Then insert the SD card into the card reader, select to start writing. This process involves downloading the image file while writing, fully self-service, and the speed is quite good.
Once successful, you can report your success, and the first step is complete.
3.2 Start Home Assistant and Initialize.
Insert the SD card into the Raspberry Pi 4B, connect it directly to the router’s output port with an Ethernet cable, and power it on. Wait, wait, and wait, then enter this address in any browser on the same network segment as the Raspberry Pi
HomeAssistant:8123, and you should see this display,
Although the red text here is in English and hard to understand, developers know that this cannot be continued. There must be an error. However, even if this error occurs, there is another port HomeAssistant:4357 for monitoring the backend, which is usually normal.
Congratulations, lazy people can still continue.
If you keep getting error messages, try power cycling… If you keep getting error messages, try power cycling… If you keep getting error messages, try power cycling, eventually, you will see it. The red error messages are gone; you don’t need to learn English, just avoid being colorblind. If you find the text too much, minimize the prompts below.
Although it says to wait 20 minutes, it usually takes 2 hours or more if luck is not on your side. Eventually, you will enter the next step.
This may require a bit of luck, mainly due to access and download from GitHub, which has rate limits; you can only connect after pinging several times. Additionally, you can cache the last data, so trying multiple times will eventually complete the system installation.
Using HDMI to connect to a display in the background, you can see the successfully booted page.
The corresponding front-end page read from the browser’s port 8123 is
After installation is complete, you can enter the process of creating a new user and setting a password.
3.3 Create User and Settings Choose a username and enter a password, then proceed to timezone selection Region selection Once everything is complete, set some privacy and data transmission options. After completion, you can enter the standard login page Directly enter the Home Assistant console
Usually, Home Assistant will first search for smart home devices in the local area network and prompt them, as shown below, where Xiaomi TVs have been detected. There is also a QP Alarm Clock that only connects via Bluetooth 4.2.
3.4 Add Custom Plugins
In addition to the customized system, the best part is the optional plugins, select add-on
Currently, there is nothing
Look further down, ESPhome is what we are looking for this time
After clicking, wait a moment, and the installation in the background will be successful Click to configure You can add nodes, which is the entry point for developing with Raspberry Pi Pico W or ESP32 devices. 3.5 Add Nodes
First, enter the prompt page, explaining this process and method Here, the options available are all compatible with the ESPhome plugin, then select ESP32C3, Display the Wi-Fi parameters needed to add the current node Click to confirm, and the node is successfully added. The added node is now displayed under the ESPhome panel. 4 Summary
The previous process was smooth and simple, extremely suitable for brainless beginners.
This system can directly connect to nearly ten thousand brands of smart home devices and can also be customized and expanded. It is an essential item for home travel. If it is already commercialized smart home products, click to add, follow the prompts and you can configure it to the starting panel, displaying the collected sensor data directly on the display page, and there are control buttons to achieve control.
As mentioned above, the QP Alarm Clock (which has smart temperature and humidity collection functions) was added to the control front panel to display temperature and humidity in real-time. This is not the end; this plugin includes a Text-to-speech feature that can read text aloud under certain conditions, enabling voice interaction, controlling speakers, and reading microphone data, which has intelligent control conditions. However, this TTS is provided by Google; those who understand will understand, we can just take a look. However, there are also intelligent plugins provided by Baidu, hoping for similar services that Baidu can achieve as well.
This post describes the process of building a core Raspberry Pi router server without code. This process is still relatively complex, with extremely rich features, but starting with simplification, following this guide, you can later add your own smart home system.
Specifically, regarding the development of custom devices, it can be foreseen that it will be equally simple, indeed achieving unique low-code development. However, the development process is not that easy; understanding is required before development. After a small trial, it is found that this may be a trend in future project development, which is text-based development. In other words, using text to describe functions, the backend automatically completes parameter configuration, code generation, compilation, linking, and full automation development, so that beginners can safely remain beginners, and the results seem to be similar to those of experts. Therefore, this development process is still worth learning and looking forward to.
END
Electronic Engineer DIY Creative Design Contest
Event Time: 2023.11.1-2023.12.31
Award Setup: First Prize (1): Uni-T UTD1025CL Handheld Digital Storage Oscilloscope / DJI Osmo Action 4 Gimbal Camera / DJI Mini 2 SE Drone (choose one)
Second Prize (2): Xiaomi Redmi Pad SE Tablet; Third Prize (3): Pro’sKit SS-936H Temperature-Controlled Soldering Station Set; Participation Prize (10): 100 Yuan JD Card (based on the participation works and difficulty).
Click to read the original text, participate in the event!
Leave a Comment
Your email address will not be published. Required fields are marked *