|
BeagleBone Black - Rev C |
x 1 |
|
Home Assistant OS |
|
|
Debian ArmHfDebian Community
|
|
|
Python 3.9Python Community
|
|
|
Eclipse Mosquitto |
Homeassistant in Beaglebone Black With Debian 11
Intro: The primary objective of my project was to give some use to the Beaglebone Black that has been sitting in my workshop for years. For various reasons I ended up using the Raspberry Pi and Orange Pi more in my projects and the Beaglebone was being discarded. My current research involves the use of opensource platforms for home automation in Escape Room rooms. And I ended up opting for Home Assistant.
Installing Debian Bullseye on Beaglebone Black
I am adapting this tutorial here: https://paranoiaque.fr/en/2021/08/26/flash-debian-bullseye-beaglebone-black/
Few words about the BeagleBone Black. It’s a single board computer with a single core 1ghz Cortex-A8 processor, 512Mb of memory and depending of the version 2gb or 4gb of EMMC (my version is 2Gb). It is impossible to install the entire dependencies in this memory. So I am using a 32Gb SD Card.
Before flashing our BeagleBone Black, we need:
- A cable to connect the BeagleBone Black to the network
- A micro SD card
- A computer with a card reader, connected to the same network
- A terminal, to access to the system
Download the latest bone image from Robert Nelson’s website, (allways check if this link still works) : https://rcn-ee.net/rootfs/debian-armhf/2022-03-30/bone-debian-11.2-iot-armhf-2022-03-30-4gb.img.xz
Plug your card in your computer, it will be erased. You can create the card using balenaEtcher.
Just select the image that you downloaded, put the SD Card on your computer and click Flash.
Boot from the micro SD card
Plug your microSD card into your Beaglebone Black. Press the Boot button (S2) and plug your card to the electricity. When the 4 lights are on, wait 1s and release the button. The board will start using the micro SD card.
Connect to the Board
You can connect to your Beaglebone through SSH using its hostname (beaglebone) and the default credentials.
User: debian
Password: temppwd
ssh debian@beaglebone.local
Setting Up the time and upgrade the system
Beaglebone does not have Real Time Clock, and probably, the current date in your system will be March 30. To correct this, just type:
sudo timedatectl set-time "2022-04-25 13:35" # adjust the time according to your current setting
sudo apt update && sudo apt upgrade -y
sudo timedatectl set-ntp false
sudo apt install chrony
sudo timedatectl set-ntp true
This will make the system update the date and time when connected to the internet.
Getting Python 3.9
Once the update is done, you can proceed with the dependencies installation. So you can run this command to install all the required dependencies:
sudo apt install wget build-essential libreadline-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev -y
Installing Python 3.9 on Debian 11
First of all, we need to download the source from python so we can proceed with the manual installation, so please run this command now:
wget -c https://www.python.org/ftp/python/3.9.12/Python-3.9.12.tgz
tar xvf Python-3.9.12.tgz
cd Python-3.9.12/
./configure --enable-optimizations
sudo make altinstall
This should install your Python 3.9 at default system location.
To test it, just type:
python3.9 --version
Installing Mosquitto
sudo apt install mosquitto mosquitto-clients -y
Install Home Assistant Core
First, install all dependencies:
sudo apt-get install python3 python3-dev python3-venv python3-pip libffi-dev libssl-dev autoconf -y
Go to the right directory for the installation:
cd /srv/
Make a directory for the python virtual environment:
sudo mkdir homeassistant
Change ownership to pi user and pi group (default otherwise is ‘root’ user under /srv):
chown debian:debian /srv/homeassistant
Now, create a python virtual environment:
Python virtual environment is an isolated environment with its own set of binaries and dependencies. Projects running in a virtual environment will not interfere with the standard execution and sets of python on your computer.
Note. Don’t use ‘sudo’ in python virtual environment, I think this command might overwrite standard python files, outside the venv (virtual environment) and that defeats the purpose of an isolated environment.
python3 -m venv .
Note. Don’t miss the dot after ‘venv’, meaning ‘here’.
Activate the virtual environment:
source bin/activate
Note. See how the terminal changes after you activated the python virtual environment:
(homeassistant) debian@beaglebone:/srv/homeassistant $
In this environment, we need a python package. Install it with this command:
python3 -m pip install wheel
Finally, we can install Home Assistant:
pip3 install homeassistant
Make Home Assistant run automatically
If we want home assistant to start automatically on boot, we need to make some configurations.
First, we need to create a service file to control Home Assistant.
Create/edit it here: /etc/systemd/system/home-assistant@debian.service
sudo nano /etc/systemd/system/home-assistant@debian.service
Enter these into the file: /etc/systemd/system/home-assistant@debian.service
[Unit]
Description=Home Assistant
After=network-online.target
[Service]
Type=simple
User=%i
WorkingDirectory=/home/%i/.homeassistant
ExecStart=/srv/homeassistant/bin/hass -c "/home/%i/.homeassistant"
[Install]
WantedBy=multi-user.target
You need to reload systemd to make the daemon aware of the new configuration:
sudo systemctl –system daemon-reload
To have Home Assistant start automatically at boot, enable the service:
sudo systemctl enable home-assistant@debian.service
To disable the automatic start, use this command.
sudo systemctl disable home-assistant@debian.service
To start Home Assistant now, use this command.
sudo systemctl start home-assistant@debian.service
You can check the status with:
systemctl status home-assistant@debian.service
Onboarding
Home Assistant’s GUI is web based, and you access it with a browser. (The installation comes with a webserver).
Open a Browser and go to http://beaglebone.local:8123
From now, you can follow this link: https://www.home-assistant.io/getting-started/onboarding/ and learn how to configure it.
Homeassistant in Beaglebone Black With Debian 11
- Comments(2)
- Likes(1)
- Engineer Dec 10,2022
- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
More by nicolaudosbrinquedos
- Homeassistant in Beaglebone Black With Debian 11 Intro: The primary objective of my project was to give some use to the Beaglebone Black that has bee...
- The Adventures of Porting Circuitpython to Wio RP2040 I have been developing some electronic props solutions for Escape Rooms. And periodically I usually ...
- Simple Electronics to Escape Room Owners - Using a bunch of voltmeters with PCA9685 This is a preliminary study for an Escape Room game. My main goal was to add as many analog displays...
- Simple Electronics to Escape Room Owners - First Chapter I've been developing puzzles and artifacts for Escape Room since 2018 and most of the time, I've bee...
- Finally! Animated Eyes using Seed Xiao RP2040 This is another advance in my studies to enable a more economically viable version for the Monster M...
- Circuitpython on Seeed XIAO RP2040 Step 1: Unboxing... I2C Not Working?As soon as the card arrived, I installed the firmware version fo...
- Raspberry Pi Pico with GC9A01 Round Display using Arduino IDE and TFT-eSPI Library This is a work in progress for another one of the artifacts I used in Leonardo Cortez's "Strange Hou...
- Recreating an 80s TV with Raspberry Pi Recently I built a series of special effects for the scenography of the play "Strange House" by Leon...
- Talk to Me This project is part of an extensive research on the use of animatronics and interactive objects tha...
- Back in time! Make a Zoetrope using Arduino I'm working on a series of animated objects for a children's play and decided to build a Zoetrope, t...
- Alastor Moody Eye using Raspberry Pi Pico, CircuitPython and Round Display GC9A01 I am developing a series of objects for a children's play about fear and terror. And then I got insp...
- The Crazy Pots Game At some point on the internet I came across someone who had made a game like that, but unfortunately...
- Arduino Mastermind Game I created this little game as a hobby for my children during the Covid-19 quarantine. I had already ...
- Raspberry Pi Pico With I2C Oled Display and CircuitPython This is my first experience using this little board from Raspberry Pi Foundation.I preferred to inst...
- Raspberry Pi Pico and TFT ILI9341 with Circuit Python I decided to write another tutorial on the Raspberry Pi Pico, mainly because the card is very recent...
- Arduino Minesweeeper It was then that I found the works of Rachit Belwariar, on the page https://www.geeksforgeeks.org/cp...
-
-
-
-
-
-
3D printed Enclosure Backplate for Riden RD60xx power supplies
154 1 1 -
-