This easy script publish to MQTT the value from a serial teleinfo modem located at /dev/teleinfo. The labels are pushed to the EDF/ at local MQTT server.
The Paho-MQTT library used for the MQTT client may not be available on your default installation. It can be installed with pip like this:
pip install paho-mqtt
If you are running on a Raspberry Pi and need to install pip, you can do it with this:
sudo apt-get install python-setuptools && sudo easy_install pip