Utility to publish MQTT topics to cloud services like cosm.com or tempo-db.com
GPL-3.0 License
MQTT2Cloud is a set of python daemons that will subscribe to an MQTT broker and push values to different providers whenever a message is recevied from certain topics.
You can read more about this in my post about Storing and publishing sensor data.
Just clone or extract the code in some folder. I'm not providing an setup.py file yet.
Rename or copy the config/mqtt2???.yaml.sample files to config/mqtt2???.yaml and edit them. The configuration is pretty straight forward:
Just define the log file paths.
These are standard Mosquitto parameters. The status topic is the topic to post messages when the daemon starts or stops.
The API key and timeout value.
A set of databases, each with its api key and secret.
A set of things, each with its token.
For every topic you want to push you have to specify a destination string. This destination string has two parameters, using '/' as separator. Depending on the cloud service you are using these parameters could be: feed/datastream for xively.com, feed/(empty) for sen.se or database/series from tempo-db.com. The tempo-db.com 'database' must have been defined in the tempodb/databases section of the configuration.
The utils stay resident as a daemons. You can start them, stop them or restart them (to reload the configuration) by using: