Skip to content
A simple Python republisher to help organize topics
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
tests fix naming conflict
LICENSE Added licence
map.csv Fixed typo with examples and csv
mqtt-republisher.default A default file for /etc/default/ in Debian
mqtt-republisher.init Fixed up start-stop-daemon usage



A quick python script to accept incoming MQTT payloads under the topic of /raw/, and look them up in a table for republishing under a logical topic name

It stems from a suggestion by Robert at to try and organize disparate sources into one logical hierarchy. 

Anything that is published under /raw/ but does not match anything in the map gets republished with /unknown/ prepended to the topic.

Some examples of source data I have...

/raw/ -> /bishopbriggs/gordonhouse/electricity/voltage
/raw/ -> /bishopbriggs/gordonhouse/electricity/watts
/raw/ -> /milngavie/parentshouse/garden/temperature
/raw/ -> /milngavie/parentshouse/sunlounge/temperature
/raw/wmlp1000/apci/core_temp -> /mobile/wmlp1000/cpu_temp


mkdir /usr/local/mqtt-republisher/ /etc/mqtt-republisher/
cd /usr/local/
git clone git://
cp mqtt-republisher.init /etc/init.d/mqtt-republisher
cp map.csv /etc/mqtt-republisher/
cp mqtt-republisher.cfg.example /etc/mqtt-republisher/mqtt-republisher.cfg
update-rc.d mqtt-republisher defaults
cp mqtt-republisher.default /etc/default/mqtt-republisher

Edit /etc/mqtt-republisher/map.csv and /etc/mqtt-republisher/mqtt-republisher.cfg to suit, and then

/etc/init.d/mqtt-republisher start
Something went wrong with that request. Please try again.