Apr 22 2017

TP Link HS110 smartplug linux monitoring with Grafana

The TP-Link HS110 smartplug has a mobile app that is not very useful. Digging through the internet i found a few scripts that can read data from it. I used a script with Grafana and Prometheus and made a nice dashboard with the collected data.

BASH – link

Python – link

TP-Link HS110 smart plug

Details about HS110 smartplug (from TP-Link website) :

Description : Wi-Fi Smart Plug with Energy Monitoring
– Remote Access : Control devices connected to the Smart Plug wherever you have Internet using the free Kasa app on your smartphone.
– Scheduling : Schedule the Smart Plug to automatically power electronics on and off as needed, like setting lights to come on at dusk or turn off at sunrise.
РEnergy Monitoring : Analyze a device’s real-time and historical power consumption.
– Away Mode : Turns your devices on and off at different times to give the appearance that someone is home.

I used the python version of the script with python prometheus exporter. Below are my results. I’m using the TP-Link HS110 smartplug to measure the consumption of my fridge.

Below there are some screens with the last 24 hours info in Grafana.

TP Link HS110 smart-plug general data : state, wireless signal, instant consumption, time running, total power consumption since start.

TP-Link HS110 smartplug current drawn

TP-Link HS110 smartplug voltage reading

TP-Link HS110 smartplug power consumption

TP-Link HS110 smartplug power consumption 2

TP-Link HS110 smartplug power consumption 3


  1. Jim

    Any chance you could write up a guide on how you set this up? I would love to graph my TP-Link HS110’s with the rest of my SmartThings data in Grafana.

    I have the python script working, but I am unfamiliar with everything you did beyond that.

    Thanks in advance!

  2. Chris

    I second the need for a tutorial. That would be really awesome!

  3. doodie

    80/tcp HTTP
    9999/tcp TP-Link Smart Home Protocol
    1040/udp TP-Link Device Debug Protocol (TDDP)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>