It has been a while since I used MQTT, so I have to dig up some old notes. In the mean time, here is a link that may help. ‘’'Publishing an input with MQTT from an EmonPi - #2 by borpin