Ubo App is a Python application for managing Raspberry Pi utilities and Ubo-specific features.
![Ubo ai pod photo](https://private-user-images.githubusercontent.com/94014876/319426648-9438ab51-9b40-46b8-a656-80b8fcb72bc3.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ4MDAzNDUsIm5iZiI6MTcyNDgwMDA0NSwicGF0aCI6Ii85NDAxNDg3Ni8zMTk0MjY2NDgtOTQzOGFiNTEtOWI0MC00NmI4LWE2NTYtODBiOGZjYjcyYmMzLmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI3VDIzMDcyNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTg0ZTMwYmM4NGJmNDIwODNkZDVhMzk2ZDIzOWRmNmM0OTJmZWM2YjM3ZDFkN2E5ZDJiYWU1OTExOGZkNDVkMmImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.OsQ2cpXD2fDK_jkISK9thcLnMIyFf2DuISn1EN_64cw)
Example screenshots:
![Ubo ai pod photo](https://private-user-images.githubusercontent.com/94014876/319426425-899d32e4-ef8e-4849-a967-1e21ad12297a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ4MDAzNDUsIm5iZiI6MTcyNDgwMDA0NSwicGF0aCI6Ii85NDAxNDg3Ni8zMTk0MjY0MjUtODk5ZDMyZTQtZWY4ZS00ODQ5LWE5NjctMWUyMWFkMTIyOTdhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI3VDIzMDcyNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI5YmI3NDE0Yzc0MGRiZGQwMzk2OTFlODgwYTFlNTYxNmI3OGZkNDFkODA1YThkMjg5YjBhNTU0YWU1MDQ5NmMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.cwilQVOt87gd-_OZ98_RKv1pdFfJMsnIbj1N0OATTLs)
Be aware that at the moment, Ubo app sends crash reports to Sentry. Soon we will limit this to beta versions only.
- Headless WiFi on-boarding with QR code
- Easy headless remote access with SSH and VS Code tunnel
- Install and run Docker apps headlessly
- Access and control basic RPi utilities and settings
Ubo app is developed to run on Raspberry Pi 4 and 5. The experience is optimized around Ubo Pod which offers
- a minimal LCD display and GUI with a keypad
- stereo microphone and speakers,
- camera
- LED ring
- sensors
The app functions even if some of these hardware elements are not provided, however some of the features that rely on these hardware components may not function. For example, WiFi onboarding with QR code requires a camera onboard.
Ubo Pod ships with a pre-flashed MicroSD card that has the app installed on it by default.
If you don't have it, or you just want to set up a fresh device, then:
- download one of the images from the release section
- Use Raspberry Pi Images and choose
custom image
to provide the download image file. - Write to the image
- Use the image to boot your Ubo Pod or Raspberry Pi
This is the fastest, easiest, and recommended way to get started with Ubo App.
If you want to install the image on an existing operating system, then read on. Otherwise, skip this section.
To install ubo, run this command in a terminal shell:
curl -sSL https://github.com/raw/ubopod/ubo-app/main/ubo_app/system/install.sh\
| sudo bash
If you want to install docker service and configure ubo to be able to use it run this:
curl -sSL https://github.com/raw/ubopod/ubo-app/main/ubo_app/system/install.sh\
| sudo WITH_DOCKER=true bash
To allow the installer to install the latest alpha version of ubo run this:
curl -sSL https://github.com/raw/ubopod/ubo-app/main/ubo_app/system/install.sh\
| sudo ALPHA=true bash
# or
curl -sSL https://github.com/raw/ubopod/ubo-app/main/ubo_app/system/install.sh\
| sudo ALPHA=true WITH_DOCKER=true bash
Note that as part of the installation process, these debian packages are installed:
- git
- i2c-tools
- libasound2-dev
- libcap-dev
- libegl1
- libgl1
- libmtdev1
- libzbar0
- python3-alsaaudio
- python3-apt
- python3-dev
- python3-gpiozero
- python3-libcamera
- python3-picamera2
- python3-pip
- python3-virtualenv
- rpi-lgpio
Also be aware that ubo-app only installs in /opt/ubo
and it is not customizable
at the moment.
Contributions following Python best practices are welcome.
- Use
UBO_
prefix for environment variables. - Use
ubo:
prefix for notification ids used in ubo core and<service_name>:
prefix for notification ids used in services. - Use
ubo:
prefix for icon ids used in ubo core and<service_name>:
prefix for icon ids used in services.
To set up the development environment, you need to have Python 3.11+ and poetry
installed.
First, clone the repository, then install the dependencies:
poetry install --with dev --extras=dev
Now you can run the app with:
poetry run ubo
Easiest way to run tests is to use the provided Dockerfile
s. To run the tests in a container, you first need to create the development images by running:
poetry run poe build-docker-images
Then you can run the tests with:
docker run --rm -it --name ubo-app-test -v .:/ubo-app -v ubo-app-dev-pypoetry-cache:/root/.cache/pypoetry ubo-app-test
You can add arguments to the pytest
command to run specific tests like this:
docker run --rm -it --name ubo-app-test -v .:/ubo-app -v ubo-app-dev-pypoetry-cache:/root/.cache/pypoetry ubo-app-test -- <pytest-args>
For example, to run only the tests in the tests/test_app.py
file, you can run:
docker run --rm -it --name ubo-app-test -v .:/ubo-app -v ubo-app-dev-pypoetry-cache:/root/.cache/pypoetry ubo-app-test -- -n3 tests/test_some_test.py
You can also run the tests in your local environment by running:
poetry run poe test
In development environment, the camera is probably not working as it is relying, on picamera2
, so it may become challenging to test the flows relying on QR code input.
To address this, the qrcode_input
method, in not-RPi environments, will try to get its input from /tmp/qrcode_input.txt
. So, whenever you encounter a QR code input, you can write the content of the QR code in that file and the application will read it from there and continue the flow.
This project is released under the Apache-2.0 License. See the LICENSE file for more details.