------------------
- Version bump (16) [Georgi Kirichkov]
- Read all data from the device, disable double-encoding, implement more
APIs, refactor querying, update README (11) [Teemu R]
* Read from socket until no data available, disable double string encoding
HS110 sends sometimes datagrams in chunks especially for get_daystat,
this patch makes it to read until there is no more data to be read.
As json.dumps() does JSON encoding already, there's no need to str()
the year or month either.
* Add cli.py, a simple script to query devices for debugging purposes.
* allow easier importing with from pyHS100 import SmartPlug
* move cli.py to examples, add short usage into README.md
* Implement more available APIs, refactor querying code.
This commit adds access to new properties, both read & write, while keeping the old one (mostly) intact.
Querying is refactored to be done inside _query_helper() method,
which unwraps results automatically and rises SmartPlugException() in case of errors.
Errors are to be handled by clients.
New features:
* Setting device alias (plug.alias = "name")
* led read & write
* icon read (doesn't seem to return anything without cloud support at least), write API is not known, throws an exception currently
* time read (returns datetime), time write implemented, but not working even when no error is returned from the device
* timezone read
* mac read & write, writing is untested for now.
Properties for easier access:
* hw_info: return hw-specific elements from sysinfo
* on_since: pretty-printed from sysinfo
* location: latitude and longitued from sysinfo
* rssi: rssi from sysinfo
* Update README.md with examples of available features.
* Handle comments from mweinelt
* Refactor state handling, use booleans instead of strings
* Fix issues raised during the review.
Following issues are addressed by this commit:
* All API is more or less commented (including return types, exceptions, ..)
* Converted state to use
* Added properties is_on, is_off for those who don't want to check against strings.
* Handled most issues reported by pylint.
* Adjusted _query_helper() to strip off err_code from the result object.
* Fixed broken format() syntax for string formattings.
* Fix ci woes plus one typo.
* Do initialization after changing device properties, fix nits.
- Constants will be static members of SmartPlug. [Martin Weinelt]
- Set up hound-ci. [Martin Weinelt]
- Normalize docstrings, address flake8 & pylint recommendations. [Martin
Weinelt]
- Properly detect advertised features, expose alias. [Martin Weinelt]
- Externalize the TP-Link Smart Home Protocol. [Martin Weinelt]
- HS200 support. [GadgetReactor]
Update version to reflect latest changes
- Adding in support for the HS200 Wall switch referencing issues (4),
simplifying model determination. [Stephen Maggard]
- Adding in support for the HS200 Wall switch referencing issues (4),
simplifying model determination. [Stephen Maggard]
- Adding in support for the HS200 Wall switch referencing issues (4)
[Stephen Maggard]
- Refactors state property to use get_info() and removes hs100_status()
[Georgi Kirichkov]
- Adds model check to current_consumption() and removes whitespace.
[Georgi Kirichkov]
- Fixes indentation and removes extra whitespaces. [Georgi Kirichkov]
- Update setup.py. [GadgetReactor]
- Update LICENSE. [GadgetReactor]
Updated to GPLv3 (instead of just copy and pasting)