Skip to main content

Wifi Electricity Meter

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wifimeter-0.1.1.tar.gz (9.4 kB view details)

Uploaded Source

Built Distributions

wifimeter-0.1.1-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

wifimeter-0.1.1-py2-none-any.whl (10.3 kB view details)

Uploaded Python 2

File details

Details for the file wifimeter-0.1.1.tar.gz.

File metadata

  • Download URL: wifimeter-0.1.1.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for wifimeter-0.1.1.tar.gz
Algorithm Hash digest
SHA256 be72bd83cb8b96061d6029d206b81b7bc36ad503ee9eafa97431d4ff6c399dfe
MD5 0386b1f73005b906dc98ce565ada0116
BLAKE2b-256 fb91ed93be7ef1da6e9a68cf4b448042fc0067f40abc7b2a7a28552ecf5191b6

See more details on using hashes here.

File details

Details for the file wifimeter-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: wifimeter-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for wifimeter-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 10f150c3b3d78eb39a0319b38f4fc1b8849c999d3df7ee34a9f8cd595c98fe9d
MD5 360d03dbb0ca33461dbd60fed330c7b5
BLAKE2b-256 1b5b06b52af926f13578c08030817c5876e3d9f396bb7a53dd1621692e3e0be7

See more details on using hashes here.

File details

Details for the file wifimeter-0.1.1-py2-none-any.whl.

File metadata

  • Download URL: wifimeter-0.1.1-py2-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 2
  • Uploaded using 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

File hashes

Hashes for wifimeter-0.1.1-py2-none-any.whl
Algorithm Hash digest
SHA256 d8b8739ba23ec3635cad69e495247c9cf9792fac2534d146cffcd98779dabf0b
MD5 1089da170e15994471ce4a0d09b62e0d
BLAKE2b-256 edfd8a26befacd910cdf693b2953ff4e6e9235636f8004018a4b0f36dc4e6034

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page