/joypi-mqtt-demo

Demo projekt using MQTT on the Joy-Pi

Primary LanguagePythonMIT LicenseMIT

Demo project using MQTT on the Joy-Pi

Description

This demo project consists of the following components:

  1. A MQTT producer sending temperature and humidity
  2. A Streamsheets app calculating the trend
  3. A MQTT consumer drawing the trends on the 8×8 pixel display as bars

Used hardware: Joy-Pi experimental case

Joy-Pi

The sensor is the blue part in the lower part.

Streamsheets

Installation

  1. Install Streamsheets. It runs the MQTT broker. I've installed it on a virtual machine running Debian.
  2. Install the necessary libraries to run the DHT11 sensor and the LED matrix as written in the manual (German version).
  3. Install Paho MQTT on the Raspberry Pi.

Preparation of Streamsheets

  1. Start Streamsheets by executing ./start.sh.
  2. Open Streamsheets in the browser on http://ip address:8081
  3. Login using your credentials.
  4. Import the Streamsheets app .
  5. Create the necessary MQTT connector and streams. It uses the local MQTT broker, which is already created by the installation. The topic of the connector is tutorial/. The topic of the consumer stream is joy1.
    Connector, Consumer and Producer
  6. Run the app by pressing the start button on the sheet.

Preparation on Raspberry Pi

  1. Set the following environment variables MQTT_SERVER, MQTT_USERNAME (most probably streamsheets) and MQTT_PASSWORD (see the password on the connector settings).
  2. Run ./send_mqtt.py in one terminal.
  3. Run ./receive_mqtt.py in the other terminal.
  4. Enjoy it!

Streamsheet projects in this repository

Display of the trend of temperature and humidity

This is the project described above. It was created for a demo at the University of Applied Sciences Burgenland.

Calculation of the dew point

Streamsheets

A project calculating the dew point using temperature and humidity, extended with an alarm, if the spread is too low.

This project was build for a presentation at the local Linux event called Linuxwochen Eisenstadt.