Skip to main content

Ubo main app, running on device initialization. A platform for running other apps.

Project description

🚀 Ubo App

image image image Actions status codecov

🌟 Overview

Ubo App is a Python application for managing Raspberry Pi utilities and Ubo-specific features.

Ubo ai pod photo

Example screenshots:

Ubo ai pod photo

🚧 Disclaimer

Be aware that at the moment, Ubo app sends crash reports to Sentry. Soon we will limit this to beta versions only.

⚙️ Notable Features

  • 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

📋 Requirements

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.

📦 Installation

Pre-packaged image

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:

  1. download one of the images from the release section
  2. Use Raspberry Pi Images and choose custom image to provide the download image file.
  3. Write to the image
  4. 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.

Install on existing OS

If you want to install the image on an existing operating system, then read on. Otherwise, skip this section.


⚠️ Executing scripts directly from the internet with root privileges poses a significant security risk. It's generally a good practice to ensure you understand the script's content before running it. You can check the content of this particular script here before running it.


To install ubo, run this command in a terminal shell:

curl -sSL https://raw.githubusercontent.com/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://raw.githubusercontent.com/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://raw.githubusercontent.com/ubopod/ubo-app/main/ubo_app/system/install.sh\
  | sudo ALPHA=true bash
# or
curl -sSL https://raw.githubusercontent.com/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:

  • accountsservice
  • 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.

🤝 Contributing

Contributions following Python best practices are welcome.

ℹ️️ Conventions

  • 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.

Development

Setting up the development environment

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

Running tests

Easiest way to run tests is to use the provided Dockerfiles. 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

⚠️Note: When running the tests in your local environment, the window snapshots produced by tests may mismatch the expected snapshots. This is because the snapshots are taken with a certain DPI and some environments may have different DPI settings. For example, we are aware that the snapshots taken in macOS have different DPI settings. If you encounter this issue, you should run the tests in a Docker container as described above.

QR code

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.

🔒 License

This project is released under the Apache-2.0 License. See the LICENSE file for more details.

Project details


Release history Release notifications | RSS feed

This version

1.0.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ubo_app-1.0.0.tar.gz (58.7 MB view details)

Uploaded Source

Built Distribution

ubo_app-1.0.0-py3-none-any.whl (58.7 MB view details)

Uploaded Python 3

File details

Details for the file ubo_app-1.0.0.tar.gz.

File metadata

  • Download URL: ubo_app-1.0.0.tar.gz
  • Upload date:
  • Size: 58.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for ubo_app-1.0.0.tar.gz
Algorithm Hash digest
SHA256 5d8cc6c47fad5bf854d0c2b5d8f23146d4f198e77a8d85f9dc7d9b8da6d91d35
MD5 1750afefe3576d66855c8c301802ef42
BLAKE2b-256 114ddcf0803f45dc54f39e32585059ec6441ab8659ceacda5a66653f74f12fbf

See more details on using hashes here.

File details

Details for the file ubo_app-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: ubo_app-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 58.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for ubo_app-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9f81d7978a5a4acea7c94845c843a273c01d3a402d3d43d29861a941c072330d
MD5 517d34d9c8c76ffa2543886e93ccae73
BLAKE2b-256 722f8018252c8e2622b5f432be409885e1692d181c4a648a62cb677f34b5e346

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page