Home Assistant installed in Feiniu, unplugged external networks, and still ran

When the smart devices at home dropped to forty-nine, my wife said something heartbreaking: "Turn on the light, swipe three apps, check the temperature, then swipe one. What kind of smart is that?" I've counted the devices once, and in the
There are three family matters, and the Mi Home App can't handle them anymore
First, the system crashes as soon as the conditions are nested. I want the entrance light to "automatically turn on after sunset, but if no one is home," you have to check if your phone is connected to home WiFi. This condition doesn't work when you tap the second layer of nesting in the Mi Home app. Its "simultaneous satisfaction" can't fit the combination of "after sunset" plus "any phone online." Second, the historical curve cannot be traced. The Bluetooth thermo-hygrometer in the living room only had real-time readings and a coarse, unreadable weekly report. I wanted to confirm whether the living room temperature dropped to 16 degrees in the early morning over the past week to decide whether to set the radiator's timer, but after a long time, I couldn't find the original data.
The third thing is the most infuriating. My sister was away on a business trip for about half a year, and the Graffiti Solution waterer on the balcony was managed for me. Since then, I've had both Mi Home and Tuya apps on my phone, switching between them every day. When the humidifier needs to be refilled, Mi Jia only pushes it to the Mi Home app and its own home. I want to push it to my wife's phone lock screen, but it can't do it.
All three points point to the same answer: the family needs its own brain, combining forty-nine devices into one, and I'll write the logic myself. The perfect spot for this brain is the Feiniu NAS in the corner, which is running 24×/7 in the corner—it's already spinning, just adding a container.
Loading into Feiniu: One container with four parameters
The official Home Assistant image on Docker Hub is called homeassistant/home-assistant. It can be installed in Feiniu's App Center or Docker graphical interface. What is the relationship between the image and the container? I mentioned this before when writing about Docker basics, so I won't repeat it here. Just remember four parameters
| What parameters should be | filled in? Why | |
|---|---|---|
| Network mode | host (shared network with NAS) | HA relies on mDNS broadcast to find LAN devices. The broadcast from the bridge network cannot be sent out, and after installation, no device can be found |
| Privileged mode enabled | is officially recommended. To enable Bluetooth or Zigbee receivers for direct connection, if you don't need it for now, keep | |
| port | 8123 | .After installing the browser, type the IP of 8123 and http://NAS it's installed in the background |
| directory | /config maps out | and reinstalls the configuration to disk; the container deletes and reinstalls the configuration, but it remains |
After opening the container, wait two minutes. Enter 8123 in your browser, and the wizard will go through: Name your family, create an account, and fill in your location—don't skip this step. The later "Sunset Light On" lets you calculate the time the sun sets in your home. The whole trip takes five minutes, faster than when I tried to pretend to be Jellyfin. If you want to systematically learn Docker, you can < a href="https://www.shunot.com/en/nas/971.html"> that introduction from hardware selection to application deployment. Here, it's just one of the containers.
Bringing Mijia in: the official team is stepping in, no need to capture tokens anymore
Previously, connecting Mi Home devices to Home Assistant was a dirty job: you had to use third-party integration, log in to your Xiaomi account to grab tokens, and tokens would expire, and once they expired, the devices would turn gray together. In February 2025, Xiaomi officially released an open-source integration, called Xiaomi Home on GitHub, and that page was completely overturned.
Operation path: Set → device and service → integration in the lower left corner of the 8123 backend. Search for Xiaomi Home, the Xiaomi account login page will pop up, then scan the QR code in the Mi Home app on your phone to authorize, and the device list will swipe in from a full page. My forty-nine units were delivered at once, even with Chinese names like "living room light" and "entryway light" as they were, no need to reconfigure them. One thing to note: this official integration updates are quite frequent. After major version upgrades, the physical IDs of certain devices may change, and the entity names referenced in automation will become invalid. Just go to its configuration page, click "Update Device List," and check the automation again. Don't rush to suspect your device is broken.
There is a technical boundary to keep in mind: WiFi devices that support LAN control (such as lights and sockets), while HA communicates directly to devices within the LAN; Bluetooth sub-devices (thermo-hygrometer, the batch hanging under the speaker Pro gateway) still go through the gateway, go to the cloud, and loop back. This dividing line determines who survives and who is paralyzed in offline testing.
Xiao Ai speakers, don't retire. It continues to serve as a voice entry and Bluetooth gateway, the Mi Home app continues as a remote control, and HA is an extra brain, not a replacement—each of the three systems does its own thing, and none of them delays the other.
Three automated systems are running, first looking at the logic, then the network disconnection
HA's automation editor is three-stage: triggers, conditions, actions. "And" and "Or" are nested randomly. The rule I've been stuck by Mijia for two years finishes in ten minutes: the trigger should be set to sunset (calculated by local astronomical algorithms, no need to check online), the condition is "any phone connected to home WiFi," and the action is to turn on the front door light. On evenings when no one was home, the lamp was quietly left dark.
Second, all lights automatically turn off at 23:30 at night, triggering the time, saving you worry. The third is a backup for the humidifier: turn on the power outlet when the living room humidity drops below 40%, and send a notification to my phone's lock screen—the notification still goes Last time, I gave the NAS a warning Bark channel. This is a curl story, and anyone in the family can pick up a phone for free and send it to me.
Sanjo ran for a week, and the sunset route was the most satisfying: the sun's setting point changed daily, so the lights shifted accordingly, so I didn't have to manually change the schedule every month like I did at Mi's place.
External network testing, and three accounts from the NAS side
On Saturday morning, I spent half an hour pulling out the fiber cable from the optical modem, specifically checking the quality of these three automatic wires. The conclusion is divided into two levels, so I'll honestly jot it down:
| Still alive | and struggling |
|---|---|
| sunset, the lights turned on promptly at 19:04 (calculated locally by astronomical algorithm). | TheBluetooth thermo-hygrometer reading froze at the moment the wire was unplugged, and the humidity backup used old numbers |
| At 23:30, the whole house turned off the lights (local time, lights ran through the local | network). People are outside remotely checking the status at home, spinning |
| phone turns the lights on and off inside (LAN direct WiFi devices). | Xiao Ai voices and replies "Network service not reached"— same as |
This result is consistent with the logic from the robot vacuum disconnected from the network: logic is local, execution is on the local network, and any loop on the cloud stops. The vacuum cleaner's map has a local chip, so it disconnects from the network and scans; HA's sun angle is calculated by itself, so the light is turned on—it's the same thing.
There are still three matters to settle on the NAS side. Memory: HA steady-state uses over 400MB, plus Jellyfin and qBittorrent. My 8GB Feiniu is solid, but for a 4G memory machine, you need to consider it first. Electricity costs are the most worry-free: NAS is always on 24×7, a year's electricity bill has already been calculated. HA relies on memory, not electricity, so the marginal cost is about zero.
The writing plate is the most sinister stroke. HA has a component called recorder, which records every state change of each entity into an SQLite database by default—forty-nine devices. High-frequency entities like signal strength and battery percentage can write the database to dozens of MB overnight. On the third day after installation, I used the old method of
Who should avoid messing around: Take it personally
| For your situation | ,suggest: |
|---|---|
| if you have fewer than twenty devices, just use the Mijia | and Mijia apps—that's enough. Don't mess |
| There are many cross-brand devices, or you need historical curves and free push | to HA—they handle all of this |
| NAS only has 4GB of RAM | , so consider it first. The combined memory capacity of the container will be overwhelming |
| The whole family relies on voice command, Xiao | Ai keeps it as the entry point, and HA only cares about the underlying logic |
If you really want to install, follow this order: first confirm NAS memory and Docker environment, set up a container and select the network as the host, enter 8123 to complete the wizard, then scan the code to connect to Mijia, use the first automated test trigger with time (the simplest and least likely to lie), run smoothly before playing Sunset and Nested Conditions. For recorder drive issues, I recommend fixing them on the day you build the PC, rather than waiting until the hard drive is constantly disturbed to remember—there's an extra resident container on your NAS, and every drive must be worthy of it.
