Files
meshcore-bot/docs/installation.md
T
agessaman 9ff8dcc7f2 feat: add a Home Assistant add-on
Adds repository.yaml and homeassistant/meshcore_bot/ so the repo can be added to the Home Assistant add-on store. The add-on runs a 64-bit image built FROM the release image (Dockerfile.ha). On start, modules/ha_addon.py seeds config.ini, applies add-on options and fixed paths from one mapping table, records which keys Home Assistant owns, and execs the bot. Unset options leave config.ini alone.

CI builds and pushes the add-on image for amd64 and arm64 after the base image and lints the manifest. update_ini_values gains backup_dir so add-on backups land under /data.

Refs #366
2026-11-09 19:26:13 -08:00

2.7 KiB

Installation

Choose how to run the bot:

Method Best for
Docker Containers, consistent environments, easy updates
Home Assistant Home Assistant OS and Supervised
Service (systemd) Linux servers, run at boot, no containers
Debian package make deb in the repo — see README
pipx A single-user install with no repo checkout and no venv management

Requirements

  • Python 3.10+
  • MeshCore-compatible device (USB, BLE, or TCP)

pipx

pipx installs the meshcore-bot and meshcore-viewer console scripts into their own isolated environment, which sidesteps PEP 668 (externally-managed-environment) on Debian 12+, Ubuntu 23.04+, Fedora and Arch without you managing a virtualenv:

pipx install "git+https://github.com/agessaman/meshcore-bot@v1.1.0"

Upgrade to a newer tag with pipx install --force "git+https://github.com/agessaman/meshcore-bot@vX.Y.Z".

Where your data lives

The bot has no fixed data directory. Everything is resolved relative to the directory containing your config.ini, so that directory is effectively your install:

What Default Resolved against
Config config.ini your working directory, unless you pass --config
Database meshcore_bot.db ([Bot] db_path) the config file's directory
Local plugins local/ ([Bot] local_dir_path) the config file's directory

Because a bare meshcore-bot looks for config.ini in the current directory, running it from somewhere else silently starts a different, empty install. Pass an absolute --config so it is unambiguous:

mkdir -p ~/.local/share/meshcore-bot
cd ~/.local/share/meshcore-bot
# put your config.ini here, then:
meshcore-bot --config ~/.local/share/meshcore-bot/config.ini

The database and local/ are then created alongside that config.ini no matter where you launch from. Absolute paths in db_path or local_dir_path are used as-is.

For a systemd unit, set WorkingDirectory= to that directory and use the absolute --config in ExecStart=. Note the service installer is a separate, self-contained path — it builds its own virtualenv under /opt/meshcore-bot and does not use pipx.

Development setup

See Getting started for a quick development setup (run from the repo with python meshcore_bot.py).

Upgrading

If you are upgrading from an older release, read the Upgrade guide before restarting the bot.