Skip to content

Instantly share code, notes, and snippets.

@matbor
matbor / mqttitudeTOmysql.py
Last active September 3, 2022 13:32
Simple Python script (v2.7x) that subscribes to a MQTT broker topic and inserts the data into a mysql database for later querying. This is designed to be used with the http://mqttitude.org/
#!/usr/bin/env python
# September 2013
# by Matthew Bordignon, @bordignon on Twitter
#
# Simple Python script (v2.7x) that subscribes to a MQTT broker topic and inserts the topic into a mysql database
# This is designed for the http://mqttitude.org/ project backend
#
import MySQLdb
import mosquitto
@matbor
matbor / 00readme.md
Last active April 23, 2017 18:03
Onewire Temperatures to mqtt broker server.Have modified the onewire example program so that no mater how many sensors u have plugged in it will always publish each reading to my MQTT broker server. It will use the onewire sensor ROM ID as part of the topic, ie. /house/arduino/[DEVICE ID/temperature/current and the message payload will be the Ce…