mqtt firmware for raspberry pi
Python
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
LICENSE.md
README.md
config.example.yml
requirements.txt
sensor_mqtt.py

README.md

#pi_sensor_mqtt

Reads sensor data from serial wireless sensors and publishes to an MQTT broker.

Requirements

Setup

git clone https://github.com/sushack/pi_sensor_mqtt.git
cd pi_sensor_mqtt
source /usr/bin/virtualenvwrapper.sh
workon pi_sensor_mqtt
pip install -r requirements.txt

Copy config.example.yml to config.yml and add details for your gateway uuid, serial port, sensors, MQTT broker, etc.

Plug in the serial receiver and make sure you have read permissions on the device:

sudo chmod a+r /dev/ttyACM0

There are better ways of doing some of the steps above, but configuring those is left as an exercise for the reader.

Run

./sensor_mqtt.py

License

This code is released as Open Source under the MIT license. See LICENSE.md for details.