Welcome to TP-LINK Tech Support Forum
+ Reply to Thread
Results 1 to 8 of 8

Thread: Smart plug API

  1. #1

    Smart plug API

    Model :

    Hardware Version :

    Firmware Version :

    ISP : [/COLOR]

    Hi! It's my first post in the forum.

    I would like to know where I can find information about the smart plug API.

    All the best,
    Danilo

  2. #2
    Github. Go ahead.

  3. #3
    What are you looking to do with the API, Danilo?

    If its list devices, see status, turn on, turn off, I've had some joy marshalling these calls via the TP-Link API (tplinkcloud.com).

    There's a few hops you have to go through (create a UUID, get a token, understand the specific JSON required to access / read the API) but its nothing too complex.

    You can pull all of my code from here, or try it out on codepen (see links in the git hub readme).

    Andy

  4. #4
    I am mostly interested in the power comsuption monitoring feature of HS110.

    Is there any way to achieve that without a third-party service?

  5. #5
    If you want to get this resource from TPLINK then you can give up. They NEVER, never give the code to you.

  6. #6
    I can see the JSON requests I'm making return emeter data that looks like it might be relevant:

    "emeter": {
    "get_realtime\":{"
    current ":0.012146,"
    voltage ":232.028969,"
    power ":0,"
    total ":0.051000,"
    }
    }

    I'd have to dig in to see if this is the power consumption you're after. Voltage, Current, Total, could be a thing...
    Control your TP-Link smart plugs from the web with my github repo

  7. #7
    Quote Originally Posted by Anton L.Z. View Post
    If you want to get this resource from TPLINK then you can give up. They NEVER, never give the code to you.
    If that's true, that's a retrograde business mindset. Open API is a requirement for IoT's evolution.

    I realized there was some effort to hack it on github. I just would like to know if an Open API it's officially supported.
    Last edited by danguafer; 01-09-2018 at 00:49.

  8. #8
    Well, it looks to be possible.

    Please see screenshot below, captured from a new PowerUsage branch at github, showing realtime power consumption in the console.

    Name:  sample.jpg
Views: 0
Size:  81.3 KB
    Control your TP-Link smart plugs from the web with my github repo


 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Copyright 1996-2018 TP-LINK Technologies Co., Ltd. All rights reserved.