Skip to main content

Wifi-Energy-Meter API for TP-Link HS110 Smartplug

Python library for the TP-Link HS110

DISCLAIMER

This is NOT an official Software by TP-Link.
We are not affiliated, associated, authorized, endorsed by, 
or in any way officially connected with TP-Link.
NO WARRANTY. Use on your own risk.

Capabilities

  • Setup Device
  • Read Measurements (power, voltage, current and the total consumption)
  • Switch State

Install

Using pypi

pip install wifimeter

Using source

python setup.py install

Usage

Usage: wifimeter [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  measure  Receives readings every second
  setup    Setup device (alias, WLAN)
  switch   Switch device ON/OFF

Connect Smartplug to Wifi

Before setup: Connect to the Smartplug's Wifi (TP-LINK_Smart Plug_*)

wifimeter setup -a <ALIAS> -n <WLAN-NAME> -p <PASSWORD> -t <WLAN-TYPE>
Usage: wifimeter setup [OPTIONS]

  Setup device (alias, WLAN)

Options:
  -a, --alias TEXT
  -n, --wlan-name TEXT
  -p, --password TEXT
  -t, --wlan-type [0|2|3]  0 = without any security, 2 = WEP, 3 = WPA
  -l, --log-level TEXT
  --help                     Show this message and exit.

Read Measurements

Receives measurements every second and prints them on screen with a current timestamp

wifimeter measure

Example Output:

alias, timestamp, current, total, power, voltage, err_code
testdevice, 2016-08-10 13:29:09.305675+02:00, 0.013050, 0.001, 0, 227.170061
testdevice, 2016-08-10 13:29:10.242483+02:00, 0.012753, 0.001, 0, 227.174989
testdevice, 2016-08-10 13:29:11.238036+02:00, 0.012842, 0.001, 0, 227.187237

Switch

Switch plug ON/OFF

wifimeter switch --state 0
wifimeter switch --state 1

License

This software is MIT licensed, as found in the LICENSE file.

Metadata

Release files for wifimeter 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wifimeter 0.1.1
File Size Uploaded Provenance Actions
wifimeter-0.1.1.tar.gz 9.4 kB Without provenance Details for wifimeter-0.1.1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for wifimeter 0.1.1
File Interpreter ABI Platform Actions
wifimeter-0.1.1-py3-none-any.whl Python 3 none any Details for wifimeter-0.1.1-py3-none-any.whl
wifimeter-0.1.1-py2-none-any.whl Python 2 none any Details for wifimeter-0.1.1-py2-none-any.whl

Total release size: 29.9 kB

Release files / wifimeter-0.1.1.tar.gz

Download URL wifimeter-0.1.1.tar.gz
Size 9.4 kB
Tags Source
SHA-256 checksum
How to use checksums
be72bd83cb8b96061d6029d206b81b7bc36ad503ee9eafa97431d4ff6c399dfe
BLAKE2b-256 checksum
How to use checksums
fb91ed93be7ef1da6e9a68cf4b448042fc0067f40abc7b2a7a28552ecf5191b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

Release files / wifimeter-0.1.1-py3-none-any.whl

Download URL wifimeter-0.1.1-py3-none-any.whl
Size 10.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
10f150c3b3d78eb39a0319b38f4fc1b8849c999d3df7ee34a9f8cd595c98fe9d
BLAKE2b-256 checksum
How to use checksums
1b5b06b52af926f13578c08030817c5876e3d9f396bb7a53dd1621692e3e0be7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

Release files / wifimeter-0.1.1-py2-none-any.whl

Download URL wifimeter-0.1.1-py2-none-any.whl
Size 10.3 kB
Tags Python 2
SHA-256 checksum
How to use checksums
d8b8739ba23ec3635cad69e495247c9cf9792fac2534d146cffcd98779dabf0b
BLAKE2b-256 checksum
How to use checksums
edfd8a26befacd910cdf693b2953ff4e6e9235636f8004018a4b0f36dc4e6034
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

Security for wifimeter 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

3 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page