#pi_sensor_mqtt
Reads sensor data from serial wireless sensors and publishes to an MQTT broker.
- Python 3.2
- virtualenv & virtualenvwrapper (http://virtualenvwrapper.readthedocs.org/en/latest/)
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.
./sensor_mqtt.py
This code is released as Open Source under the MIT license. See LICENSE.md for details.