Leverages the MQTT protocol using Mosca, MQTT.js, and Paho Python.
View screenshots from Redditors here
Broken into 3 main applications:
- MQTT/UI Server
- Single Node.js application with two main functions:
- Run a Mosca MQTT broker.
- Serve web pages using Express.
- Each UI client subscribes to the Mosca broker.
- Start with
npm start
.- Remember to
npm install
. - Requires a MongoDB instance.
- NGINX is an optional dependency.
- Remember to
- Commands:
- View logs with
pm2 logs matrix
. - See online users with
pm2 trigger matrix online
. - Ban a user with
pm2 trigger matrix ban <ip>
. - Unban a user with
pm2 trigger matrix unban <ip>
.
- View logs with
- Single Node.js application with two main functions:
- LED Client
- Raspberry Pi client which subscribes to the Mosca broker.
- Controls an 8x8 RGB LED matrix.
- Start with
sudo python app.py
.- Requires Python 3.6 and dependencies in
requirements.txt
. - Run
pip install -r requirements.txt
to install dependencies.
- Requires Python 3.6 and dependencies in
- Stream Server
- Streams live video of the LED matrix to the UI clients.
- Runs on the same Raspberry Pi as the LED client.
- Start with
npm start
.- Remember to
npm install
.
- Remember to
- Mosca by Matteo Collina - Node.js MQTT broker
- MQTT.js by Matteo Collina - Use MQTT in the browser
- MQTT over WebSockets by Matteo Collina - Use MQTT over WebSockets
- Paho Python by Eclipse - Use MQTT in Python
- rpi_ws281x by Jeremy Garff - Control WS281X RGB LEDs through Raspberry Pi
- raspivid-stream by Tim Perry - Capture video from Raspberry Pi
- pi-cam by Tim Perry - Working example of raspivid-stream
- h264-live-player by François Leurent - Play h264 video in the browser