Lightbridge handles the bridge between MQTT and the TPLink HS100/HS110's protocol.
One of these: https://www.tp-link.com/uk/home-networking/smart-plug/hs110
Includes handling around polling and publishing the energy stats from the socket.
Documentation can be generated with ExDoc.