Welcome to the MakerSpace Leiden Aggregator. This software aggregates and distributes real-time information about the makerspace.
- Listens to MQTT messages
- Aggregates useful information (like who is at the space now, what machines are on, etc.)
- Publishes the information live via HTTP and WebSockets
Architecture diagram also available at: https://balsamiq.cloud/s84bb/pl6cb2r
- Python 3.7
- Python 3 venv
- Redis
- git
Standard Setup
- Clone the repository:
git clone https://github.com/MakerSpaceLeiden/aggregator.git
- Set up virtual environment:
python3.7 -m venv venv . venv/bin/activate
- Install Python dependencies:
pip install -r requirements.txt
Note for OSX 10.14 users: If you have a locked down ~/Library, use:
pip install --no-cache-dir -r requirements.txt
to avoid having to write in ~/Library/Caches/pip/wheel
.
After installation, start the development server:
python server-dev.py
Run the test suite with:
python run-tests.py
Please refer to the feature documentation in the source directories for detailed information on specific components:
The server runs in production using systemd.
Location: /usr/local/aggregator
Managing the Service:
- View environment:
sudo systemctl show-environment
- Set environment variables:
sudo systemctl set-environment var=value
- Restart service:
sudo systemctl restart msl_aggregator
- View logs:
sudo journalctl _PID=<pid> sudo journalctl --since="10 minutes ago"