This commit updates `bridge.py` to properly `await` the `join_muc_wait()`
coroutine instead of calling the deprecated `join_muc()`. This prevents
an unretrieved Task exception (`asyncio.TimeoutError`) from polluting
the logs or crashing the background task if the XMPP server is slow
or doesn't respond to the MUC join request in time.
Co-authored-by: jamessucla <2191476+jamessucla@users.noreply.github.com>
This commit resolves an `AttributeError` when starting the `SovereignBridge`
class due to the missing `process` method. Newer versions of `slixmpp` (1.8+)
leverage the standard `asyncio` loop directly and no longer provide the
legacy `process(forever=True)` wrapper.
The bridge now correctly starts the XMPP client by calling
`xmpp.loop.run_forever()` directly after `xmpp.connect()`.
Co-authored-by: jamessucla <2191476+jamessucla@users.noreply.github.com>
This commit adds a small tip to the README.md explaining how to
use `nix-shell -p git` to temporarily obtain git in order to clone
the repository on a completely fresh NixOS install that might not
have git in its system packages yet.
Co-authored-by: jamessucla <2191476+jamessucla@users.noreply.github.com>
This replaces the experimental flake-based Nix configuration with
a classic Nix setup (`default.nix`, `shell.nix`, `module.nix`)
per user request.
Changes include:
- Removing `flake.nix`.
- Creating `default.nix` to package the python bridge.
- Creating `shell.nix` for a reproducible development environment.
- Creating `module.nix` for the NixOS systemd service.
- The `module.nix` now uses systemd's `LoadCredential=` to safely
expose the XMPP password to the bridge daemon running as a dynamic
user, resolving permission issues.
- `README.md` instructions have been fully rewritten to focus on classic
Nix usage, answering user questions on secret management and repository
cloning structure.
Co-authored-by: jamessucla <2191476+jamessucla@users.noreply.github.com>
This updates the README to directly answer user questions regarding:
1. How to correctly provision the XMPP password file using standard Unix tools (or secret managers in production).
2. Updates the flake url alias to point to the actual repository name (`jshiffer/lora-xmpp-bridge`).
3. Adds explicit step-by-step commands on how to clone and run the bridge from a completely fresh NixOS install.
Co-authored-by: jamessucla <2191476+jamessucla@users.noreply.github.com>
This commit introduces a MVP for the sovereign computing hackathon. It
provides a Python-based bridge between a local Meshtastic node and an
internet-connected XMPP Multi-User Chat room.
Features:
- `bridge.py`: Uses `meshtastic` and `slixmpp` to bridge messages bidirectionally.
- Properly handles asynchronous/synchronous impedance mismatch between XMPP and serial interfaces.
- Avoids infinite loop echo chambers.
- `flake.nix`: Packages the Python script and its dependencies.
- Exposes a NixOS module for configuring the bridge as a persistent systemd service.
- Requires `--password-file` to prevent exposing XMPP passwords in process listings.
- `README.md`: Explains architecture, usage, and how to configure the NixOS module.
Co-authored-by: jamessucla <2191476+jamessucla@users.noreply.github.com>