Installing SCADA-EDGE new WEBSCADA
CybroTech controllers - Intalling webscada in your RaspberryPI or OrangePI or Ubuntu Server
If you use industrial controllers CybroTech or Cybro2/3 controllers info how to install WEBSCADA on your RaspberryPI or OrangePI or best option VirtualBox (Windows&Macintosh) Ubuntu Server (VPS) home use
All softwares you need can be downloaded from my home PC Portorose (https://perc.ddns.net/ddl/) or direct from cybrotech.com site https://cybrotech.com/software/
INSTALLING SCADAEDGE FOR CYBRO2/3 CONTROLLER
Original documentation from doc folder Ubuntu Server and my version down for Debian Server minimal install version - change username in your user and for MariaDB directives for database are simpler not as this original document that describe SQL8 install not MariaDB 10 install original document is wrong for SQL database install and make user, but MariaDB will accept SQL8 directives too:
=====================================================================
CybroWebScada (c) 2010-2024 Cybrotech
=====================================================================
Installation procedure for web scada on Ubuntu 24.04 LTS
Install Ubuntu server 24.04 LTS
- Profile setup
user: solar
pass: <pass>
- SSH Setup
- Install optional Open SSH server
- Optional settings
$ sudo apt purge unattended-upgrades
$ sudo systemctl disable cloud-init
- Everything else as default or as desired
Install CybroEdgeToolkit
- Login as: solar
- Password: <pass>
- Update:
$ sudo apt update
$ sudo apt upgrade
- Install packages required by Toolkit
$ sudo apt install python3-dev python3-venv python3-pip pkg-config build-essential
- Install MariaDb database
$ sudo apt install mariadb-server
$ sudo mysql_secure_installation
- Set sql-mode
$ sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf
- Add below line at the end of the section [mysqld]:
sql_mode = 'ONLY_FULL_GROUP_BY,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'
- Make Toolkit home directory and copy Toolkit files
$ sudo mkdir /usr/local/bin/cybrotech
$ sudo chown solar:solar /usr/local/bin/cybrotech
- copy Toolkit files to server into /usr/local/bin/cybrotech/ folder (by WinSCP or psftp or whatever I use WEBMin BEST APP FOR FULL SERVER CONTROL OR MULTIPLE SERVERS CONTROL)
- Install Django
$ python3 -m venv /usr/local/bin/cybrotech
$ source /usr/local/bin/cybrotech/bin/activate
$ pip install -U -r /usr/local/bin/cybrotech/app/requirements.txt
$ cd /usr/local/bin/cybrotech/app/web_scada && python manage.py collectstatic
- Install Apache and acl
$ sudo apt install apache2 libapache2-mod-wsgi-py3 acl
- Install phpmyadmin (optional)
$ sudo apt install phpmyadmin libapache2-mod-php
- Apache set up
- Set virtual host:
$ sudo nano /etc/apache2/sites-enabled/000-default.conf
- copy below text instead of 1st virtual host:
<VirtualHost *:80>
#ServerName solarserver:80
# solar cybro web application static files directory
Alias /static/ /usr/local/bin/cybrotech/app/web_scada/staticroot/
<directory "/usr/local/bin/cybrotech/app/web_scada/staticroot/">
Order deny,allow
Require all granted
</directory>
# solar cybro web application data directory
Alias /data/ /usr/local/bin/cybrotech/app/web_scada/data/
<directory "/usr/local/bin/cybrotech/app/web_scada/data/">
Order deny,allow
Require all granted
</directory>
WSGIDaemonProcess solar python-home=/usr/local/bin/cybrotech/ python-path=/opt/solar/app/solar_cybro/
WSGIProcessGroup solar
# location of solar cybro wsgi startup file
WSGIScriptAlias / /usr/local/bin/cybrotech/app/web_scada/wsgi.py
<directory "/usr/local/bin/cybrotech/app/web_scada/">
Order deny,allow
Require all granted
</directory>
</VirtualHost>
- Restart Apache
$ sudo systemctl restart apache2
- Web scada database setup
$ sudo mysql -p
- Create database by running the following SQL commands:
CREATE DATABASE `solar` DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
CREATE USER 'solar'@'localhost' IDENTIFIED WITH mysql_native_password AS PASSWORD("solar");
GRANT ALL PRIVILEGES ON *.* TO 'solar'@'localhost' IDENTIFIED BY 'solar' WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0;
GRANT ALL PRIVILEGES ON `solar`.* TO 'solar'@'localhost';
- Granting Apache access to data directory
$ export SCADAHOME=/usr/local/bin/cybrotech/app
$ sudo setfacl -m u:www-data:--x $SCADAHOME
$ sudo setfacl -R -m u:www-data:--- $SCADAHOME
$ sudo setfacl -R -m u:www-data:rwx $SCADAHOME
$ sudo setfacl -R -m d:u:www-data:rwx $SCADAHOME
$ sudo chmod g+s $SCADAHOME
$ sudo setfacl -R -m d:u:solar:rwx $SCADAHOME
export SCADAHOME=/usr/local/bin/cybrotech/app &&
sudo setfacl -m u:www-data:--x $SCADAHOME &&
sudo setfacl -R -m u:www-data:--- $SCADAHOME &&
sudo setfacl -R -m u:www-data:rwx $SCADAHOME &&
sudo setfacl -R -m d:u:www-data:rwx $SCADAHOME &&
sudo chmod g+s $SCADAHOME &&
sudo setfacl -R -m d:u:solar:rwx $SCADAHOME
- Edit crontab
$ crontab -e
- Add following lines to automatically start reporting engine:
0 * * * * /usr/local/bin/cybrotech/bin/python /usr/local/bin/cybrotech/app/web_scada/manage.py create_reports &>/dev/null
0 * * * * /usr/local/bin/cybrotech/bin/python /usr/local/bin/cybrotech/app/web_scada/manage.py send_reports &>/dev/null
- Edit <pass> in configuration files:
- Edit /usr/local/bin/cybrotech/app/web_scada/settings/settings_local.py
$ sudo nano /usr/local/bin/cybrotech/app/web_scada/settings/settings_local.py
- change DATABASE_PASSWORD = 'solar' with <pass>
- Configure django and database
$ /usr/local/bin/cybrotech/bin/python /usr/local/bin/cybrotech/app/web_scada/manage.py migrate
$ /usr/local/bin/cybrotech/bin/python /usr/local/bin/cybrotech/app/web_scada/manage.py collectstatic
$ mysql -p < /usr/local/bin/cybrotech/app/web_scada/doc/db_initial_data.sql
- Restart Apache
$ sudo systemctl restart apache2
- Web scada setup
- Browse to http://ip_adress to start web scada
- Log in: u:admin / p:admin
- Change admin password to <pass>
admin and pass is admin first time install, than you change all in your data, PS this new ScadaEDGE is not good as older one that work perfect (Our debugget one), this new one will have some errors ? and if you have multiple controllers with password you will need a little bit of work to debute software, is not written good. If you use old one Python2 WEBScada dont change it unti they dont debug own software. Old SCADA for RaspberryPI YOU CAN DOWNLOAD IMAGE FOR RASPBERRYPI4 FROM MY HOME PC OR MY GOOGLE DRIVE ALL WORKS AS IT SOULD, OR YOU CAN ISNTALL IT ON RASPBIAN LINUX 11 OR DEBIAN 11 THIS VERSION OLD ONE SOFTWARE IS ALL DEBUGED AND WORKS FINE: https://pcsnet.freeddns.org/ddl/#search=app
For new SCADA-EDGE when we figure it out how to rebuild all software Cybrotech we will post new debugged software that work for controllers with password! DEBUGGED SOFTWARE WILL BE ABLE TO DOWNLOAD On my home pc or github Piramide Studio account or my personal one BorisPerc
Here's the complete, optimized installation guide for CybroWebScada on Debian 12 (Raspberry Pi Debian12 Minimal) or (OrangePI Debian12 Minimal), with all dependencies and RPi-specific fixes:
CybroWebScada Installation for Debian 12 (RPi Minimal)
0. Prerequisites
bash
# Update system
sudo apt update && sudo apt upgrade -y
# Install minimal dependencies
sudo apt install -y sudo curl wget git
1. System Setup
bash
# Create user (if not exists)
sudo adduser solar
sudo usermod -aG sudo solar
# Disable unnecessary services
sudo systemctl disable --now unattended-upgrades cloud-init
2. Install Core Dependencies
bash
# Python + Build tools
sudo apt install -y \
python3-dev python3-venv python3-pip \
pkg-config build-essential
# Database
sudo apt install -y mariadb-server
# Image/SCADA dependencies (CRITICAL FOR RPi!)
sudo apt install -y \
libopenjp2-7 libjpeg62-turbo-dev libtiff-dev \
libwebp-dev libatlas-base-dev libxslt1-dev \
libxml2-dev zlib1g-dev libffi-dev libssl-dev \
libmariadb-dev libfreetype6-dev
3. MariaDB Configuration
bash
sudo mysql_secure_installation
# Edit config:
sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf
Add under [mysqld]:
ini
sql_mode = 'ONLY_FULL_GROUP_BY,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'
innodb_buffer_pool_size = 64M # RPi optimization
4. Deploy CybroWebScada
bash
# Create directory
sudo mkdir -p /usr/local/bin/cybrotech
sudo chown solar:solar /usr/local/bin/cybrotech
# Copy files (WinSCP/rsync/scp)
# Example using rsync:
rsync -avz ./cybrotech_files/ solar@raspberrypi:/usr/local/bin/cybrotech/
5. Python Environment
bash
# Create venv
python3 -m venv /usr/local/bin/cybrotech
source /usr/local/bin/cybrotech/bin/activate
# Install Python packages
pip install --upgrade pip wheel
pip install -r /usr/local/bin/cybrotech/app/requirements.txt
# Fix Pillow if needed
pip uninstall -y pillow
pip install --no-cache-dir pillow
6. Apache Setup
bash
sudo apt install -y apache2 libapache2-mod-wsgi-py3 acl
# Configure virtual host
sudo nano /etc/apache2/sites-available/cybrotech.conf
Paste (adjust paths as needed):
apache
<VirtualHost *:80>
Alias /static/ /usr/local/bin/cybrotech/app/web_scada/staticroot/
<Directory "/usr/local/bin/cybrotech/app/web_scada/staticroot/">
Require all granted
</Directory>
Alias /data/ /usr/local/bin/cybrotech/app/web_scada/data/
<Directory "/usr/local/bin/cybrotech/app/web_scada/data/">
Require all granted
</Directory>
WSGIDaemonProcess solar \
python-home=/usr/local/bin/cybrotech \
python-path=/usr/local/bin/cybrotech/app
WSGIProcessGroup solar
WSGIScriptAlias / /usr/local/bin/cybrotech/app/web_scada/wsgi.py
<Directory "/usr/local/bin/cybrotech/app/web_scada/">
Require all granted
</Directory>
</VirtualHost>
Enable config:
bash
sudo a2dissite 000-default.conf
sudo a2ensite cybrotech.conf
sudo systemctl restart apache2
7. Database Setup
bash
sudo mysql -u root -p
sql
CREATE DATABASE `solar` DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
CREATE USER 'solar'@'localhost' IDENTIFIED BY 'your_password';
GRANT ALL PRIVILEGES ON solar.* TO 'solar'@'localhost';
FLUSH PRIVILEGES;
8. Final Configuration
bash
# Set permissions
export SCADAHOME=/usr/local/bin/cybrotech/app
sudo setfacl -R -m u:www-data:rwx $SCADAHOME
sudo setfacl -R -m d:u:www-data:rwx $SCADAHOME
# Django setup
cd /usr/local/bin/cybrotech/app/web_scada
python manage.py migrate
python manage.py collectstatic --noinput
# Import initial data
mysql -u solar -p solar < doc/db_initial_data.sql
9. Start Services
bash
# Cron jobs
(crontab -l 2>/dev/null; echo "0 * * * * /usr/local/bin/cybrotech/bin/python /usr/local/bin/cybrotech/app/web_scada/manage.py create_reports &>/dev/null") | crontab -
(crontab -l 2>/dev/null; echo "0 * * * * /usr/local/bin/cybrotech/bin/python /usr/local/bin/cybrotech/app/web_scada/manage.py send_reports &>/dev/null") | crontab -
# Restart Apache
sudo systemctl restart apache2
RPi-Specific Optimizations
bash
# Reduce swapiness (for better SD card life)
echo "vm.swappiness=10" | sudo tee -a /etc/sysctl.conf
# Disable GUI (if installed)
sudo systemctl set-default multi-user.target
Verification
Access SCADA at http://<your_rpi_ip>
Login with admin/admin (change password immediately)
Key Differences from Ubuntu Setup
Explicit library installation (Debian minimal lacks default packages)
MariaDB memory tuning (Critical for RPi's limited RAM)
Pillow reinstallation (Ensures proper image library binding)
This guide covers all dependencies and RPi-specific adjustments.
NOW AUTOMATIZTION AND DEBUGGING IF NEED IT:
1. First, check if the SCGI server is actually running:
bash
ps aux | grep scgi
2. Check for existing SCGI services:
bash
systemctl list-units | grep scgi
3. If the service file is missing, you'll need to create it:
Create a new service file:
bash
sudo nano /etc/systemd/system/cybrotech_scgi.service
With this content (adjust paths as needed):
[Unit]
Description=CybroTech SCGI Server
After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/scgi_server # Adjust this path to your actual SCGI server executable
Restart=on-failure
User=www-data # Or whatever user it should run as
Group=www-data
[Install]
WantedBy=multi-user.target
4. Then reload systemd and start the service:
bash
sudo systemctl daemon-reload
sudo systemctl enable cybrotech_scgi.service
sudo systemctl start cybrotech_scgi.service
5. Check the status:
bash
sudo systemctl status cybrotech_scgi.service
6. Check logs for errors:
bash
journalctl -u cybrotech_scgi.service -b
Additional notes common error setup:
Make sure the SCGI server executable exists at the path you specify
Verify the port configuration in your SCGI server configuration
Check if there are any firewall rules blocking the SCGI port
The exact command you use to manually start the SCGI server
Any error messages from the logs
Your SCGI server configuration details
ps aux | grep scgi
solar 8370 0.0 0.0 8640 2144 pts/2 S+ 11:31 0:00 grep --color=auto scgi
It looks like your SCGI server isn't currently running (the grep scgi command only shows the grep process itself, not an SCGI server). Here's how to proceed:
1. First, verify if you have an SCGI server installed:
bash
which scgi_server
or
bash
find / -name "*scgi*" -type f -executable 2>/dev/null
2. If you find the executable, try running it manually to test:
bash
/path/to/scgi_server -p 4000 # Replace with actual path and port
3. If you can't find the executable, you may need to install it:
For Python SCGI server:
bash
pip install scgi
Or for a C-based implementation:
bash
sudo apt-get install scgi # On Debian/Ubuntu
4. For the service file error ("Unit not found"), let's check:
A) List all services to find the correct name:
bash
systemctl list-units --type=service --all | grep -i cybro
B) If it's truly missing, create the service file as I mentioned earlier:
bash
sudo nano /etc/systemd/system/cybrotech_scgi.service
5. If you're using a specific application (like CybroScgi):
Check the application's documentation for the correct service name
The service might be named differently (e.g., cybro-scgi, cybrotech-scgi)
6. Check for alternative management methods:
bash
ls /etc/init.d/ | grep -i cybro
cybrotech_scgi.service - CybroTech SCGI Server EXAMPLE COMMON ERROR
Loaded: loaded (/etc/systemd/system/cybrotech_scgi.service; disabled; preset: enabled)
Active: failed (Result: exit-code) since Tue 2025-08-05 11:37:36 CEST; 5s ago
Duration: 2ms
Process: 10017 ExecStart=/usr/local/bin/cybrotech/app/scgi_server (code=exited, status=203/EXEC)
Main PID: 10017 (code=exited, status=203/EXEC)
CPU: 2ms
avg 05 11:37:36 solarserver systemd[1]: cybrotech_scgi.service: Scheduled restart job, restart counter >
avg 05 11:37:36 solarserver systemd[1]: Stopped cybrotech_scgi.service - CybroTech SCGI Server.
avg 05 11:37:36 solarserver systemd[1]: cybrotech_scgi.service: Start request repeated too quickly.
avg 05 11:37:36 solarserver systemd[1]: cybrotech_scgi.service: Failed with result 'exit-code'.
avg 05 11:37:36 solarserver systemd[1]: Failed to start cybrotech_scgi.service - CybroTech SCGI Server.
The error indicates that the SCGI server is failing to start due to an execution problem (status=203/EXEC). This usually happens when:
Possible Causes:
Missing or incorrect executable path (/usr/local/bin/cybrotech/app/scgi_server does not exist or is not executable).
Permission issues (the service user cannot access the binary).
Missing dependencies (required libraries are not installed).
Wrong interpreter (if it's a script, the shebang #!/bin/bash or #!/usr/bin/python3 might be invalid).
Step-by-Step Fix:
1. Verify the SCGI Server Binary Exists
bash
ls -l /usr/local/bin/cybrotech/app/scgi_server
If it doesn't exist, reinstall the CybroTech software or check the correct path.
If it exists, check permissions:
bash
chmod +x /usr/local/bin/cybrotech/app/scgi_server
2. Check if the Binary is Executable
bash
file /usr/local/bin/cybrotech/app/scgi_server
If it's a script (Python/Bash), ensure the shebang (#!) line is correct.
If it's a compiled binary, check dependencies:
bash
ldd /usr/local/bin/cybrotech/app/scgi_server
(Missing libraries? Install them.)
3. Test Running It Manually
bash
sudo -u www-data /usr/local/bin/cybrotech/app/scgi_server
(Replace www-data with the user defined in your service file.)
4. Check the Service File
bash
sudo nano /etc/systemd/system/cybrotech_scgi.service
Ensure it has:
ini
[Service]
User=www-data # or another valid user
Group=www-data
WorkingDirectory=/usr/local/bin/cybrotech/app
ExecStart=/usr/local/bin/cybrotech/app/scgi_server
Then reload systemd:
bash
sudo systemctl daemon-reload
5. Check Logs for Exact Error
bash
journalctl -u cybrotech_scgi.service -b --no-pager
6. Restart the Service
bash
sudo systemctl restart cybrotech_scgi.service
If the Binary is Missing
Reinstall CybroTech SCGI or check their documentation.
If you built it from source, recompile and reinstall.
Final Check
bash
sudo systemctl status cybrotech_scgi.service
If it still fails, the issue is likely:
Missing binary
Missing dependencies
Permission errors
I suggest to anyone use micro developing board OrangePI5+ or Max because is AI capable and will work superb for your home automatization, why OrangePI vs Ubuntu Server, BECAUSE any computer will consume 50-100€ electricity per month depend on how powerful is PC and mainly how powerful is your GPU and for OrangePI consumption of electricity is 12-15€ per year!!! And results will be the same, you need only this models for home automatization I use DeepSeek is free and only 5 models for SmartHome automatization will be perfect on OrangePI5+ or MAX:
Predictive Maintenance (detecting device failures)
Anomaly Detection (intrusion/attack detection)
Natural Language Processing (NLP) (voice control)
Computer Vision (security cameras, face recognition)
Energy Optimization (smart energy management)
INSTALL IN YOUR ORANGEPI5+ OR MAX DEBIAN12 MINIMAL INSTALL SERVER, YOU CAN USE UBUNTU BUT HOME ASSISTANT WILL NOT WORK ON UBUNTU ON ORANGEPI5 SO BETTER USE DEBIAN OS MINIMAL INSTALL!
FROM ORANGEPI FORUM PUBLICATION:
Guide to Install Operation System on Orange Pi 5B
Here’s how to install the operating system to the eMMC on your Orange Pi 5B:
Installing Linux to eMMC
Prepare a TF Card
First, burn the Linux image (Debian/Ubuntu) onto a TF card.
Use the TF card to boot the development board into the Linux system.
Transfer the Image to eMMC
Upload the decompressed Linux image file to the TF card.
Use the following command to confirm the eMMC device node:
ls /dev/mmcblk*boot0 | cut -c1-12Example output:
/dev/mmcblk1
Burn the Image to eMMC
Clear the eMMC:
sudo dd bs=1M if=/dev/zero of=/dev/mmcblk1 count=1000 status=progress
sudo syncBurn the Linux image to eMMC:
sudo dd bs=1M if=Your_Linux_Image.img of=/dev/mmcblk1 status=progress
sudo syncAfter the process is complete, remove the TF card and restart the system.
📖 Detailed steps in the manual, page 59-61
Installing Orange Pi OS (Droid) to eMMC via Type-C
Connect the Board to a Windows PC
Use a Type-C data cable to connect the development board to your PC.
Ensure no TF card or USB device is inserted.
Enter MaskROM Mode
Hold down the MaskROM button while powering on the board.
Burn the OS Image
Install Rockchip Driver and RKDevTool.
Load the Orange Pi OS (Droid) image into RKDevTool.
Click Upgrade to start burning.
📖 More details on page 72-74
Let me know if you need further guidance! 🚀
SETUP EXTRA FOR HOME ASSISTANT
Set up Home Assistant on Orange Pi Zero 3
Install Debian/Ubuntu on Orange Pi Zero 3 or higher and prepare it for home automation with MQTT and Home Assistant
The Orange Pi Zero 3 is a powerful Single Board Computer (SBC) that can serve as the heart of your home automation system. With its compact size, low power consumption, and ample processing power, it's an ideal choice for DIY enthusiasts looking to automate their homes. In this guide, we'll walk you through the steps to set up and use the Orange Pi Zero 3 for home automation. I have previously used a less capable SBC and even an old router to run a self hosted MQTT server. It is time for an upgrade.
The main point of this upgrade is to add functionality beyond MQTT, such as database storage, reports and Home Assistant. I really want the latter since I have some ESP8266 relays and sensors I currently use and I think ESPHome could speed up software development while being easy to integrate with Home Assistant. Note that you may use another SBC from the OrangePi family for this purpose. I chose Zero 3 because it is powerful enough while being similar in size with the existing Zero I currently use.
Getting started with the hardware
When you unbox your Orange Pi Zero 3, you will find the SBC board itself in an antistatic bag, with no accessories whatsoever (unless you ordered). I chose the 2 GB version of the board since I consider it enough for my needs. You will also need:
MicroSD card (high speed 16GB or larger recommended; SBC manufacturer recommends SanDisk);
Power adapter (5V and at least 3A; if considering USB peripherals, get one with enough current);
USB to serial adapter, with 3.3 V levels. I will use the cheapest available based on CH340G;
Keyboard and mouse (may be temporarily needed, until you configure SSH);
HDMI cable and monitor (may be temporarily needed, until you configure SSH and/or remote access);
Internet connection (Ethernet is preferred).
Consider building a 5V UPS which can store enough energy to prevent sudden shutdowns of the SBC. Explore the possibility of powering your Orange Pi Zero 3 with solar panels for energy-efficient operation.
Power failures may damage the file system and require starting all over again with installation and configuration. Also, after you're done setting it up, turn off, pull out the MicroSD card and make a backup of the entire file system.
Orange Pi Zero 3 SBC with required accessories
It is recommended to place a self-adhesive heatsink on the Allwinner CPU. It tends to get quite hot. I also prepared a distribution box where I installed the SBC along with power supply and some other hardware (LAN switch and cable TV amplifier with splitter). An enclosure is highly recommended because it prevents dust getting on the SBC, however make sure of proper ventilation (add a cooling fan) to help spread the heat produced by electronics.
Home Assistant installation methods
Home Assistant is a complex software ecosystem which is available either as an operating system, container or standalone software. You must decide in advance which installation method you want because the operating system you will install on Orange Pi depends on this choice.
The easiest way to have Home Assistant is to get a hardware on which you can install HA OS, a customized Linux with preinstalled software. But this is not available for Orange Pi boards. More than that, it is a managed OS which is not very customizable if you want it to perform other tasks besides running Home Assistant. On the other hand you should not expect too much from Orange Pi either; although it has enough CPU and RAM, using SD card as storage will slow it down.
On Orange Pi and other Linux SBCs, there is Home Assistant Core which gets installed in a Python virtual environment. It is easier to install, however you will usually get delayed updates via pip3 package manager. It depends on the system-wide Python and sometimes you will get warning messages about using an older version of Python which is no longer supported by Home Assistant.
The other easier way of getting Home Assistant is using a Docker Container. This benefits of better update management and there are also additional containers for Home Assistant Add-Ons. It should be noted that both Core and Container installation methods will not come with the Add-ons Store in Home Assistant.
The most difficult installation method is Supervised which provides the full Home Assistant experience on a regular operating system, with a supervisor tool which manages the whole system and it will clean up, repair or reset settings to default if they no longer match expected values. This method is containerized and has strict requirements. One of them is that in only runs on Debian Bookworm.
Installing the host operating system
In the following posts I will show you how to install Home Assistant Core and Container. For these installation methods, both Debian and Ubuntu are suitable OSes. Because I regularly use Ubuntu desktop and I am familiar with it, I chose it for my SBC. Being more popular means you will have access to updated and more software packages. I don't need desktop environment, therefore I will get the server version. This is the download page for Pi Zero 3 SBC. I selected Ubuntu image, Linux 6.1 kernel version for development boards with 1 or 2 GB RAM, Jammy Server.
The easiest way to get this on the SD card is to use Etcher (on Windows or on Linux PC). Plug the microSD in a suitable adapter. Download and extract the OS image from archive (7-Zip is required). Etcher software is available for all desktop platforms and it is portable (for Linux it comes as an AppImage which you can run). User interface is very clean and straightforward. First you select source image, then the target storage. This is the step when you have to ba careful what you select. I recommend unplugging any other external storage device to avoid confusion. Etcher will not show by default your system drive. After you have selected target storage, just click on Flash! and it will start. At the beginning it needs your user password to format the SD card. It then writes the image and it also verifies it.
Etcher is ready to write Ubuntu image to SD card
When it is done, close it and unmount the SD card if it got automatically mounted by the host operating system. Pull it out from the card reader and insert it in the dedicated slot of Orange Pi board.
Powering up for the first time
If you don't have an USB to serial adapter, just connect Orange Pi to Ethernet and power it while monitoring DCHP leases on your router administration interface. Wait a few minutes after it gets an IP address and then try to open a SSH terminal to that address from another computer in the same network. Default user and password are orangepi and orangepi.
Otherwise, you need to set up the serial terminal which will allow you to perform the initial configuration. I like to use PuTTY because it is free and works on Windows and Linux. You can get it on Ubuntu after enabling Universe repository with the following commands:
sudo add-apt-repository universe
sudo apt update
sudo apt install puttyNow take the USB to serial adapter and three DuPont jumper wires and connect everything as follows:
On the opposite edge of micro HDMI connector, there is a 3-pin header named SIP3, with pins labelled TX, RX and GND. TX goes to RXD/RXI of the USB-serial adapter, RX goes to TXD/TXO and GND to GND. Plug the adapter in an USB extension cord and connect to computer.
Insert microSD card if you haven't done so already.
Go ahead and get a LAN cable from your local network. I do not recommend using WiFi and I will even disable it and remove the antenna.
Launch PuTTY, select Serial mode, 115200 baud and enter correct port. How do you find it? Well, if you're on Windows open Device Manager and unplug then re-plug the USB serial adapter to see which COM port appears. If you're on Linux open a terminal and use ls /dev/tty* or to be more specific ls /dev/ttyUSB*. Repeat the command with the adapter plugged in, then unplugged. Write the port with complete path in PuTTY (i.e. /dev/ttyUSB0).
Get the power supply ready and power the board.
Wait patiently for the first boot to complete. It is going to take a while; however you should see output in PuTTY. If you don't see any output in PuTTY while the board LED is flashing, check again the port you selected and try swapping RX and TX jumper wires.
First boot of Orange Pi with Ubuntu Jammy
Note that since this is the server version of Ubuntu it does not have a display manager, hence the low RAM usage. If you're curious or you can't get the serial terminal working, use HDMI to connect to a monitor and plug in an USB keyboard. You will see another terminal output on monitor.
While Orange Pi is booting or already running avoid cutting power to it. Instead use sudo reboot (or sudo poweroff).
Basic configuration
The default installation comes with two user accounts, a regular account named orangepi and the root account, which have the same password: orangepi. Let's configure network with:
sudo orangepi-configEnter password as requested after this command. After the utility launches, use arrow keys and Enter to select Network. Go to WiFi and select Deactivate, then Quit. Then go to IP and select Static, since this server has to have the same IP so you can access it over network. You need to choose an available IP address and set netmask and gateway. Make sure you select an IP address that is outside of the allowable range of the addresses which can be assigned to local clients by your router (for example, my router's DHCP server is set to assign addresses 192.168.1.100 to 192.168.1.255 to clients, therefore everything from 192.168.1.2 to 192.168.1.99 is left for static assignments of my choice). Gateway is router's IP (in my case 192.168.1.1).
Setting static IP on Orange Pi
Press Tab key after you have completed all fields, then Enter on OK to confirm. At this point you can quit PuTTY and disconnect serial adapter; you can get to the terminal over SSH at the IP you set, with PuTTY using the same credentials. However, there is no need to hurry. Let's continue configuration over the existing terminal.
Please note that the manual of Orange Pi recommends a different way of setting network configuration. It is easy and intuitive, however its main advantage is that it allows you to set more parameters, including DNS servers and IPv6 configuration. If you need advanced network interfaces configuration, use the following command:
sudo nmtuiNext, while I am in orangepi-config, I usually go to Personal section to set local timezone and I also customize Hostname (which can also be set from nmtui). If you want some services to be automatically discovered in the network, you should enable Avahi from System section. Once you are done with the configuration utility, let's close it (choose Back and Exit) and move on.
Let's update the installed software packages:
sudo apt update
sudo apt upgradeIf it says it has to modify some configuration files, you can type Y (from yes) and hit Enter to confirm. After it is done, perform a reboot.
Connecting via SSH
And this time disconnect the serial DuPont wires. We're switching to SSH. After reboot, if there are more updates, install them using the same commands. Use PuTTY or any other SSH client to connect to the IP address of the Orange Pi. For example, I would use in Ubuntu Terminal:
ssh orangepi@192.168.1.11Then I have to confirm I want to connect (with yes) and enter user password (which is still orangepi).
Conclusion
Well, this was the first part and after this how-to I didn't even get to Home Assistant. But I have the Orange Pi ready. There are also some other steps to consider. The most important one is to change the default password. To do this, use passwd command. You can also create a different user account (and I even recommend you to do so) with adduser username command (replace username with what you want and run the command with sudo).
I opted for a different IP address for the new Orange Pi. However, you might consider discarding the old board and using its IP for the new one, if you previously had another automation server. No matter the circumstances, choose a static IP.
Orange Pi Prime Debian Install
First, head over to the Orange Pi Prime downloads page and snag the correct download. Once you've downloaded the Debian desktop release for Orange Pi Prime, extract the image file using 7zip. It's an img.xz file in a RAR file, so you'll need to first unRAR the main folder, then extract the image file from the img.xz. Once that's finished, mount the img.xz to a microSD card with a program like Etcher. Next, pop the successfully created microSD card into your Orange Pi Prime and power on the device. You'll need to login with the username and password.
Username: root
Password: orangepi
By default the Orange Pi Prime Debian image runs the Xfce desktop environment. Since it's lightweight, this runs phenomenally well on the Pi Prime. Though a pretty barebones operating system, there are plenty of useful apps installed. There's the Thunar file manager, GNOME MPlayer for music and video playback, and Audacity for recording audio. For a basic Debian desktop, Debian for Orange Pi runs like a champ. I've also tried Ubuntu on the Orange Pi Prime, and both Debian and Ubuntu remain easy enough to use.
Occasionally, bugs present. For instance, the default web browser initially didn't work. It returned an error of "Failed to execute default Web Browser. Input/output error." As such, I went about installing Netfurf.
sudo apt-get install netsurf-gtkNext, I right clicked the browser icon, selected properties, then edit. After entering/usr/bin/netsurfI was able to launch a browser. You may, of course, use any browser you'd like to. Once I was able to sort out the browser frustration, everything was running well. It's a stable, secure Orange Pi Prime OS. The main issue with Debian on the Orange Pi Prime is merely support. There's very little documentation, a fault many single-board computers (SBCs) suffer from. As such, the board is still totally functional and, largely, runs most Linux and Android OSes perfectly. But when you encounter a problem, you're mostly on your own.
Debian on Orange Pi Prime Review: A Work in Progress
During my hands-on Debian for Orange Pi Prime review, I was a bit disappointed. While installation went smoothly, real-world use suitable, bugginess in a few spots marred an otherwise pleasant experience. I found myself on the verge of chucking my keyboard out the window a few times while attempting to perform a simple task like opening a web browser. Ultimately, I'm a fan of alternative SBCs like the Orange Pi Prime since they offer more choice in a market dominated by the Raspberry Pi. But competing boards such as offerings from Odroid, UDOO, Libre Computer, and Pine 64 deliver better experiences.
Wish you all the best and donate to Substack.com Team - I do not accept and donation! Grazie in advance. BP












