From Stock OS to Industrial Network Bridge
The foundation of this project is a clean installation of Raspberry Pi OS (Bookworm). Starting from the original stock image, I implemented several low-level modifications to transform the Pi into a reliable network appliance.
Because the ENC28J60 does not have a factory-burned MAC address, it often causes "IP jumping" in DHCP logs. I developed a systemd service that runs before the network stack. This service reads the Pi CPU's unique serial number and generates a corresponding static MAC address, ensuring each system has a unique, permanent identity.
To prevent SD card corruption—a common issue with original OS installations during power loss—this system has been converted to a Read-Only (RO) file system. Maintenance can be performed by using the rw (read-write) and ro (read-only) terminal commands.
To ensure 24/7 availability, a Hardware Watchdog service is active. It will automatically force a reboot if:
Configured for DHCP using hostapd and dnsmasq to bridge traffic to the WiFi. Time synchronization is handled by the ntpd service. Update your WiFi credentials (/etc/hostapd/hostapd.conf) immediately after setup.
Equipped with a 1 GB swap partition to provide extra stability for the Zero 2 W.
Active ssh service with remote root access enabled and default password is Dooshei4. Change this password at the first occasion.
For application development and scripting, Python is fully installed and pre-configured on the system.
This ecosystem utilizes different Raspberry Pi hardware classes depending on the workload. Edge nodes use the ultra-low-profile Raspberry Pi Zero 2 W, while the central intelligence runs on the high-performance Raspberry Pi 5.
Custom SensorNode Python package, designed as a highly optimized, lightweight daemon service managed by systemd.
Open /root/SensorNode/config.json and customize the settings:
# --- MQTT --- broker_host = "192.168.1.100" # IP of your central RPi 5 username = MQTT username password = MQTT password # --- Device --- name = Friendly name of the device # --- Broadlink --- host = "192.168.1.101" # IP of Broadlink Controller covers = List of devices controlled by Broadlink
To control external appliances (like smart covers) via BroadLink, run the learning script to scan and capture RF/IR remote signals. Follow the interactive CLI prompts to save the codes:
python3 /root/SensorNode/sensor_array.py --learn-covers and follow the provided steps.
The central node serves as the primary intelligence hub of the smart residence, running high-performance services to coordinate and store data from all edge nodes.
The Central Node is permanently connected to the local network and runs on a static IP allocation (default: 192.168.1.100). It acts as the gateway for external cloud integrations (such as Google Smart Home and Weather Forecast APIs) while maintaining autonomous offline control for safety-critical heating routines.
rw command to unlock and make permanent configuration changes.Referenced components used in this manufacturing process.
| ID | Item | Description/Source |
|---|---|---|
| [1] | Raspberry Pi Zero 2 W | Available on Emag. |
| [2] | Memory Card | Available on Temu. |
| [3] | Raspberry Pi Imager | Available on Raspberry Pi Website. |
| [4] | SensorNode OS Image | Download Image. |