Skip to content

PaulSchulz/production-assistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Production Assistant

— Cool Logo Goes Here —

Contents

Introduction

doc/images/screenshot.png

Software tools for use in production of embedded products

The aim of this repository is to create an easily deployable set of tools to support the engineering and (almost) mass production of embedded devices.

The initial target is for ESP32-S3 based boards, installed via esphome/esptool.

Note: This tool was developed on Ubuntu 24.04. It is expected to work on Debian based systems (eg. Raspberry Pi OS) but you mileage may vary.

Installation

Clone this repository

(Work-in-progress) Edit ‘config.yaml’ to reflect the environment, tools, scripts and processes that you want to use.

Setup python virtual environmental (venv)

Requires python3

Create ‘venv’ environment.

python -m venv venv

. venv/bin/activate

The ‘activate’ step needs to be run each time, to set up the environment.

Dependency: ESPHome

ESPHome needs to be installed and available. (It provides esptool)

pip install esphome

Data

By default, data is stored in the ‘data’ directory in the location where the software has been installed.

If it doesn’t exist, a data directory will be created to record the software operation.

It is recommended that the runtime data is kept separate from the application software by either:

  • pointing to a new data location with a symbolic link (eg. ln -s new-dir data); or
  • changing the config to point to a different location.

Running

To run the development web server (currently the only option) use-case

. venv/bin/activate
python app.py

A script has been created to do this with:

./app-run

The server can be started by the user when the system is rebooted by adding something like the following in your crontab file. (eg. run ‘crontab -e’)

reboot: /usr/bin/screen /home/paul/Documents/git/production-assistant/run-app

Running Manually (for development)

Configure the environment

. venv/bin/activate  

Connect a device, check status and record details.

./bin/esp-status.py

This will query the attached device and store some details in the ‘data’ directory (and create it if required.)

Operation

Access the app by going to the webpage. (This may be different if you have changed the default configuration.)

http://localhost:8080

Tasks (Status, Programming, Testing)

(Work-in-progress)

Integrations

ESPhome

Built in for using esp32 devices.

NodeRED

(Work-in-progress)

Separate git submodule: production-assistant-nodered

Drive Production Assistant via a web based NodeRED GUI.

MQTT

(Work-in-progress)

Design

The ‘app’ is driven by a top level pyton program (app.py) which uses other python scripts and libraries to function.

The main collection of python scripts live in the ‘bin’ which can be run individually to perform specific tasks as required. (eg. esp-status.py)

These scripts can be called and combined in NodeRED via a web interface, or scripted together in other ways.

The top level ‘config.yaml’ file is used to define all system configuration parameters.

Within the ‘data’ directory:

repos/
Git repositories containing the sources required for making devices.
devices/
Definition files for each device being created including:
  • which repo to use
  • instructions on how to build the software
  • how to install the device
  • the tests and how to run them for the device
  • what manufacturing details need to recorded for each unit
units/
Records on the production of each unit. Details stored under a unique id for each unit produced.

This data is accessible via a unique URL, which could be turned into a QRcode for displaying on packaging.

About

Software tools for use in production of embedded products

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published