Skip to content

Latest commit

Β 

History

39 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Nodeice Board

A Meshtastic-based notice board application for creating a public message board on your Meshtastic mesh network.

Overview

Nodeice Board turns a Meshtastic device connected to a Raspberry Pi (or any computer) into a central notice board for your mesh network. Users can send messages to add posts to the board, view recent posts, and leave comments on existing posts.

Features:

  • Post creation and listing
  • Commenting on posts
  • Subscription system for notifications about new posts and comments
  • Configurable automatic post expiration (default: 7 days)
  • Simple command-based interaction
  • Automatic prevention of multiple instances running simultaneously

Requirements

  • Python 3.10 or higher
  • A Meshtastic device connected to your computer (via USB)
  • Meshtastic network with other nodes

Installation

One-Command Raspberry Pi Install (Recommended)

On a Raspberry Pi, a single command installs everything: uv, the repository, the notice board service, and the RGB LED matrix display service:

curl -fsSL https://raw.githubusercontent.com/AndreasThinks/nodeice-board/main/setup_pi.sh | sudo bash

The script is non-interactive, so you can run it remotely over SSH in one shot. It:

  • Installs system packages (git, build tools for the matrix library)
  • Installs uv for your user if it isn't already installed
  • Clones the repository to ~/nodeice-board (or updates an existing checkout)
  • Creates the Python environment from the lockfile with uv sync
  • Compiles the rpi-rgb-led-matrix Python bindings into the environment
  • Disables onboard audio (it conflicts with the matrix hardware; requires a reboot)
  • Adds your user to the dialout group for Meshtastic USB access
  • Installs, enables, and starts the nodeice-board and nodeice-matrix systemd services

Options can be passed after -s --:

curl -fsSL https://raw.githubusercontent.com/AndreasThinks/nodeice-board/main/setup_pi.sh | sudo bash -s -- --no-matrix
Flag Effect
--dir DIR Install location (default: ~/nodeice-board)
--user USER User to own the install and run the service (default: the sudo user)
--branch NAME Git branch to install (default: main)
--no-matrix Skip the RGB LED matrix display
--no-start Install and enable the services but don't start them now
--keep-audio Leave onboard audio enabled (matrix display will glitch)

If the script disabled onboard audio, reboot afterwards (sudo reboot) β€” the matrix display starts automatically after the reboot.

Manual Installation

  1. Clone this repository:

    git clone https://github.com/AndreasThinks/nodeice-board.git
    cd nodeice-board
  2. Install the package and dependencies, either with uv:

    uv sync

    or with pip:

    pip install -e .

Usage

Starting the Nodeice Board Server

Run the application with:

python main.py

Options:

  • --device_path: Specify the path to your Meshtastic device (optional, auto-detects if not provided)
  • --db_path: Specify the path to the SQLite database file (default: nodeice_board.db)

Example:

python main.py --device_path /dev/ttyUSB0 --db_path /path/to/database.db

Using the Nodeice Board from Meshtastic Nodes

Once the Nodeice Board server is running, other Meshtastic nodes can interact with it using the following commands:

Command Description Example
!help Show available commands and board information !help
!post <message> Create a new post !post Lost cat in sector 7
!list [n] Show n recent posts (default: 5) !list or !list 10
!view <post_id> View a specific post and its comments !view 42
!comment <post_id> <message> Add a comment to a post !comment 42 I saw that cat yesterday
!subscribe all Subscribe to notifications for all new posts !subscribe all
!subscribe <post_id> Subscribe to notifications for a specific post !subscribe 42
!unsubscribe all Unsubscribe from all notifications !unsubscribe all
!unsubscribe <post_id> Unsubscribe from notifications for a specific post !unsubscribe 42
!subscriptions List your current subscriptions !subscriptions
!info Show board statistics (post count, next wipe, uptime) !info

Setup as a Service on Raspberry Pi

For detailed instructions on setting up Nodeice Board to run automatically at boot on a Raspberry Pi, see the Raspberry Pi Setup Guide.

One-Command Setup

The easiest path is the all-in-one installer described in Installation above β€” it installs uv, both services, and the matrix display in a single command:

curl -fsSL https://raw.githubusercontent.com/AndreasThinks/nodeice-board/main/setup_pi.sh | sudo bash

Quick Setup (board service only)

Alternatively, use the standalone service installation script:

chmod +x install_service.sh
sudo ./install_service.sh  # sudo is REQUIRED

Why sudo is required: This script needs root privileges to:

  • Install system packages with apt-get
  • Create a systemd service file in /etc/systemd/system/
  • Create a log directory in /var/log/
  • Reload systemd daemon
  • Enable and start the systemd service

This script will:

  • Check prerequisites
  • Install dependencies
  • Create a systemd service
  • Enable the service to start at boot

RGB LED Matrix Display (optional)

Nodeice Board can drive an RGB LED matrix as a live visual display of board activity β€” ideal as a showpiece next to the node. It is designed for a 32x32 HUB75 panel on an Adafruit RGB Matrix Bonnet, but any panel size supported by rpi-rgb-led-matrix works.

The display runs as its own service and only reads the board database, so it can be added, restarted, or removed without touching the notice board itself. It shows:

  • A rotating status card: live post count, clock, all-time post count
  • A scrolling call-to-action marquee (!post / !help) so passers-by know how to interact
  • A recent-posts ticker every ~45 seconds
  • An eye-catching ring-burst + "NEW POST" animation whenever a post or comment arrives, followed by the message scrolling across the panel

The one-command installer sets the display up automatically. To install it separately (compiles the matrix library, sets up a systemd service, and offers to disable the conflicting onboard audio):

sudo ./install_matrix_service.sh

A matching 3D-printable case (front bezel frame + rear component shell for the panel, Pi and bonnet) lives in case/ with STLs, parametric OpenSCAD source, and print/assembly instructions.

Panel size, brightness and GPIO settings live in config.yaml under Matrix_display. To develop or preview on a desktop without hardware:

pip install -e ".[emulator]"
nodeice-board-matrix --emulator --db_path nodeice_board.db

Meshtastic Device Setup

If you're having issues with your Meshtastic device, use the device setup script:

chmod +x setup_meshtastic_device.sh
sudo ./setup_meshtastic_device.sh  # sudo recommended for full functionality

Sudo requirements:

  • Full functionality requires sudo
  • Some options (device detection, connection testing) will work without sudo
  • Critical functions (udev rules, adding user to dialout group) require sudo

This script helps with:

  • Detecting Meshtastic devices
  • Setting up udev rules (requires sudo)
  • Adding your user to the dialout group (requires sudo)
  • Testing device connection

Instance Management

The Nodeice Board application includes a mechanism to prevent multiple instances from running simultaneously, which helps avoid conflicts and resource issues:

# This happens automatically when you run the application
python main.py  # Will automatically check for and terminate any previous instances

When deploying on a Raspberry Pi or other Linux system, make sure the script is executable:

chmod +x kill_previous_instances.sh

This feature:

  • Detects any running instances of Nodeice Board
  • Safely terminates them before starting a new instance
  • Logs termination events for monitoring
  • Works with both manual execution and systemd service
  • Prevents potential database conflicts and resource contention

Monitoring and Status Check

To check the status of your Nodeice Board service and get basic monitoring information:

chmod +x check_nodeice_status.sh
sudo ./check_nodeice_status.sh  # sudo recommended for full access

Sudo requirements:

  • Works best with sudo for full access to service status and logs
  • Can run without sudo but with limited functionality
  • Some systemctl commands require sudo privileges

This script provides information about:

  • Service status and uptime
  • Instance management status
  • Meshtastic device detection
  • Log file status and recent entries
  • Database statistics
  • System information (memory, disk usage, CPU temperature)

Manual Setup

For manual setup instructions, see the Raspberry Pi Setup Guide or follow these basic steps:

  1. Create a service file:

    sudo nano /etc/systemd/system/nodeice-board.service
  2. Add the following content (adjust paths as needed):

    [Unit]
    Description=Nodeice Board Meshtastic Notice Board
    After=network.target
    
    [Service]
    ExecStart=/usr/bin/python3 /home/pi/nodeice-board/main.py
    WorkingDirectory=/home/pi/nodeice-board
    StandardOutput=inherit
    StandardError=inherit
    Restart=always
    User=pi
    
    [Install]
    WantedBy=multi-user.target
    
  3. Enable and start the service:

    sudo systemctl enable nodeice-board
    sudo systemctl start nodeice-board
  4. Check the status:

    sudo systemctl status nodeice-board

Configuration

The application can be configured using the config.yaml file:

Nodeice_board:
  Long_Name: "Nodeice BoardπŸ“ŒMsg me !help"  # Long name for the Meshtastic device
  Short_Name: "NDB"                         # Short name for the Meshtastic device
  Info_URL: "https://github.com/AndreasThinks/nodeice-board"  # URL for more information
  Expiration_Days: 7                        # Number of days after which posts are deleted

Architecture

The application consists of several components:

  • Database: SQLite database for storing posts, comments, and subscriptions
  • Meshtastic Interface: Handles communication with the Meshtastic device
  • Command Handler: Processes incoming messages and executes commands
  • Post Expiration Handler: Automatically removes posts older than 7 days
  • Config: Handles loading and accessing configuration settings
  • Instance Management: Prevents conflicts by ensuring only one instance runs at a time

Development

Project Structure

nodeice-board/
β”œβ”€β”€ nodeice_board/
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ main.py
β”‚   β”œβ”€β”€ config.py
β”‚   β”œβ”€β”€ database.py
β”‚   β”œβ”€β”€ meshtastic_interface.py
β”‚   β”œβ”€β”€ command_handler.py
β”‚   β”œβ”€β”€ post_expiration.py
β”‚   └── matrix/            # optional RGB LED matrix display
β”‚       β”œβ”€β”€ main.py        # nodeice-board-matrix entry point
β”‚       β”œβ”€β”€ app.py         # render loop and scene switching
β”‚       β”œβ”€β”€ scenes.py      # idle / ticker / alert / waiting scenes
β”‚       β”œβ”€β”€ render.py      # palette, marquee, scrolling primitives
β”‚       β”œβ”€β”€ watcher.py     # read-only database poller
β”‚       β”œβ”€β”€ driver.py      # hardware / emulator backend loading
β”‚       └── fonts/         # bundled BDF pixel fonts
β”œβ”€β”€ tests/
β”œβ”€β”€ main.py                # thin wrapper around nodeice_board/main.py
β”œβ”€β”€ install_service.sh
β”œβ”€β”€ install_matrix_service.sh
β”œβ”€β”€ setup_meshtastic_device.sh
β”œβ”€β”€ check_nodeice_status.sh
β”œβ”€β”€ kill_previous_instances.sh
β”œβ”€β”€ pyproject.toml
β”œβ”€β”€ config.yaml
└── README.md

Running the Tests

pip install -e . pytest
pytest

Or with uv:

uv run pytest

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A public notice board for the Meshtastic network built in Python

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages