Skip to content

knolleary/twitter-to-mqtt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Twitter to MQTT Publisher

A python daemon that uses the Twitter Streaming API to access tweets and republishes them to an MQTT topic.

Prerequisites

The daemon uses the Mosquitto Python client - http://mosquitto.org/

Configuration

Update settings.py with:

  1. Your twitter username/password
  2. The twitter streaming API url to use (see https://dev.twitter.com/docs/streaming-api)
  3. The MQTT broker details and topic to publish to

Running

To start the daemon, run:

$ python twitter-to-mqtt.py

It can be stopped with Ctrl^C, but thanks to the way pycurl works, it will not exit until the next tweet is received. Alternatively, kill the process.

TODO

  1. Handle connection lost from either connection

About

A python daemon that uses the Twitter Streaming API to access tweets and republishes them to an MQTT topic.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages