Pyhs100

Latest version: v0.3.5.2

Safety actively analyzes 619426 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

0.3.5

------------

- Fix for SmartStrip repr (169) [Alex]

* Added unit tests for repr.

* Fix repr for SmartStrip.

Fixes 165

- Smartstrip: return on_since state information only when the socket is on (161) [Teemu R]

* Smartstrip: return on_since state information only when the socket is on

Fixes 160

* add proper cli printout for hs300 child sockets

* iterate over range, not an integer

- Bulb: add the temperature range to state_information, inform the user if the info is missing when calling temperature (163) [Teemu R]

- Fix Discoverdiscover incorrect documentation (159) [Georgi Kirichkov]

The documentation states the timeout defaults to 5 seconds, but in the definition of the method timeout is set to 3

- Add kelvin range for KL130 (156) [dieselrabbit]

* Add kelvin range for KL130 (new color bulb)

* Add kelvin range for KL120

Unable to test this personally as I don't have this bulb.

- Add LB230. [Teemu R]

Works according to https://github.com/home-assistant/home-assistant.io/pull/8090

- Add KL series of bulbs. [Teemu R]

works according to https://github.com/home-assistant/home-assistant.io/pull/8134

0.3.4

------------

There are two notable changes (and other small fixes) in this minor release thanks to our contributors:

* Support for HS300 smartstrip (thanks to jimboca!)
* The hue range for light bulbs is fixed (thanks to nkonopinski, Annika Jacobs and Joe Zach!)


- Updated valid range to 360 (with passing tests) (153) [Annika Jacobs, Zac Koch]

* Updated valid range to 360

with it set to 359 it will not show the color red. Just tested this with a buddies bulb - same model/fw
https://imgur.com/a/kSNZIuL

- Add support for HS300 power strip (137) [jimboca]

- Add HS103 to readme. [Teemu R]

- Avoid 'referenced before assignment' exception (150) [Kevron Rees]

- Cli: show an error for incorrect hsv values (142) [Annika Jacobs]

Raising an exception if an incomplete HSV colour is provided.

- Add a "Reviewed by Hound" badge (139) [Scott Albertson]

- Change valid hue range to 0-359 (fixes 130), update README.md & test
(140) [Annika Jacobs, nkonopinski]

Tested on LB130(EU) hardware 1.0, firmware 1.8.6 Build 180809 Rel.091659

- Remove deprecated identify, this has been deprecated for long enough.
(136) [Teemu R]

* Remove deprecated identify, this has been deprecated for long enough.

- Add missed test for invalid types. [Teemu R]

- Update README to include mention about hs220. [Teemu R]

- Add tests and pretty output for HS220, fix minor issues in tests.
[Teemu R]

- Add reboot command to restart the device (129) [Teemu R]

0.3.3

------------------

This release contains a breaking change for hsv setter, which is changed to accept
the new brightness value in percentage instead of an integer between 1 and 255.

The alias support has been extended to allow changing the alias, as well as accessing
the device using it (without specifying an IP address or a hostname), which can be
useful in some setups. Furthermore utf8-encoded aliases are now handled correctly.

- Fix bug that changed brightness at each HSV update (124) [Sebastian Templ]

* Fix bug that changed brightness at each hsv update

The HSV setter should accept a percentage for the brightness
value but actually assumed the brightness to be in absolute values
between 1 and 255.
This resulted in brightness reductions at each HSV update, in
steps of 100% -> 100/255=39% -> 39/255=15% -> ... (see also
https://github.com/home-assistant/home-assistant/issues/15582,
where I originally reported this bug).

* Modify HSV property to return brightness in percent

Switch from reported brightness values of 1..255 to percentage
values, for consistency with the apidoc and 8761dd8.

* Add checks and tests for the hsv setter

- make sure that new (hue, saturation, brightness) values are
within their valid ranges (0..255, 0..100, 0..100) and raise
SmartDeviceException if they are not
- add test function for the hsv setter

- Allow using alias instead of IP address or hostname (127) [kwazel]

* Added option to control devices by device name

* set unused ip address to dont-care

* spend less time discovering by devicename, removed command

* consistent use of alias instead of device name

* processed review comments

* Return when no device with alias has been found

- Add 'alias' command for querying and setting the alias (126) [Teemu R]

* add 'alias' command for querying and setting the alias

* calculate coverage only on library files, e.g., ignoring cli and test files

* remove py34 and add py37

* readd py33, remove it from travis as it seems to be a travis limitation only

* use xenial dist for travis, regular does not support py37..

- Support Unicode strings in encrypt/decrypt (125) [Anders Melchiorsen]

0.3.2

------------------

- Add bulb valid temperature range (122) [Thibault Cohen]

0.3.1

------------------

This release adds a few improvements, most importantly:

* emeter support for new HS110 hardware/firmware revision.

* HS220 supports now dimming.

Breaking changes:

* get_emeter_daily & get_emeter_monthly will report back in kwh on bulbs, making the API consistent with the smart plugs.

- Fix emeter support for newer HS110 firmwares (107) [Teemu R]

* Add support for new-style emeter

This commit adds a straightforward dict-extending container,
which converts between the old and new keys of the get_emeter_realtime()
Furthermore the unit tests are converted to base on HS100
instead of HS110.

This is the first step to fix 103, other emeter-using functionality
has not yet been converted, only getting the current consumption.

* fix a couple of linting issues

* Convert new-style emeter values also for get_emeter_daily() and get_emeter_monthly()

* Adds a new 'kwh' parameter for those calls, which defaults to True
* This changes the behavior of bulbs emeter reporting, use False if you prefer the preciser values

- Update pypi description (102) [Teemu R]

* update pypi description

* add wall switches

- Update smartplug.py to support dimming in HS220 (115) [JsChiSurf]

* Update smartplug.py to support dimming in HS220

Switch functions essentially as a "plug" with the addition to support for dimming, for which can be test for by verifying existence of
'brightness' array value.

* Attempt at updates to pass validator

* Maybe this time? :-)

* Add more detail to comment blocks

Make clear in requests for current brightness level the expected return values, and note that light will turn on when setting a brightness
level, if not already on. This makes clear that a state change request (turn_on) does NOT have to be made first when setting brightness.

* Update smartplug.py

* Update smartplug.py

Fixes 114

- Add python_requires for >= 3.4. [Teemu Rytilahti]

- Add hs210. [Teemu R]

Based on user report: https://community.home-assistant.io/t/tp-link-hs210-3-way-kit/39762/6

- Add support for DNS host names (104) [K Henriksson]

- Use direct device type discovery for devices (106) [K Henriksson]

This is more efficient than enumerating all devices and checking the IP.

- Cli: add 'time' command to get the current time from the device.
[Teemu Rytilahti]

- Created a docker file to aid dev setup (99) [TheSmokingGnu]

* created a docker file to aid dev setup

* fixed review comments in README and Dockerfile

* review comments to simplify the docker run command

0.3.0

------------------

This is the first release after a while and aims to improve the robustness all-around.
To make this happen we have decided to break the API and drop the support for Python 2.

API break:
* Python2 support has been dropped.
* pyHS100/pyHS100.py has been splitted to smartdevice.py, smartplug.py and smartbulb.py, no one should have ever accessed these directly though.
* SmartPlugException is no more, SmartDeviceException is used by both SmartPlug and SmartBulb
* Discovery has been moved from TPLinkSmartHomeProtocol into its own class for easier 3rd party use.
* SmartDevice's identify() and `features` will emit a warning when used. These will likely be dropped or revised in the future and their use should be avoided.

Other changes:

* CLI tool supports device discovery and is usable without specifying device type or IP for testing
* CLI tool supports changing bulb-specific settings
* Library support & unit tests are extended to cover more devices.
- Supported plugs: HS100, HS105, HS110
- Supported switches: HS200
- Supported bulbs: LB100, LB110, LB120, LB130

- Bump the version. [Teemu Rytilahti]

- Revise README, fixes 86. [Teemu Rytilahti]

- Update the changelog. [Teemu Rytilahti]

- Local test clean (96) [Sean Gollschewsky]

* Add ignores for working coverage/tox/IDE files.

* Allow tox not to fail if python version is not available.

- Move SmartDeviceException to SmartDevice, and remove types.py complet…
(95) [Teemu R]

* move SmartDeviceException to SmartDevice, and remove types.py completely. fixes 94

* do not import skipIf anymore

- Move has_emeter implementation from SmartDevice to SmartPlug, avoid
using features() internally (93) [Teemu R]

* move has_emeter implementation from SmartDevice to SmartPlug, avoid using features() internally

* add stacklevel to deprecation warnings to see where they are really called

* make tests pass on a real device. if PLUG_IP is not None, the tests will be run on a device at the defined IP address

- Add typing hints to make it easier for 3rd party developers to use the
library (90) [Teemu R]

* add typing hints to make it easier for 3rd party developers to use the library

* remove unused devicetype enum to support python3.3

* add python 3.3 to travis and tox, install typing module in setup.py
- Execute coveralls only on travis, fixes 84 (91) [Teemu R]

- Make flake8 pass by some rewording. [Teemu Rytilahti]

- Make hound a bit more happier. [Teemu Rytilahti]

- Deprecate features and identify, use state_information in __repr__ instead of identify. [Teemu Rytilahti]

- Fix smartbulb hsv documentation, values are degrees and percentages instead of 0-255. [Teemu Rytilahti]

- Another try, just with module name. [Teemu Rytilahti]

- Make tox run pytest-cov, add coveralls. [Teemu Rytilahti]

- Prevent failure if device's sysinfo does not have a "feature" attribute. (77) [Sean Gollschewsky]

- Allow None for rssi, add a missing newline to fakes.py. [Teemu Rytilahti]

- Add hs100 tests. [Teemu Rytilahti]

- Make tests to test against all known device variants. [Teemu Rytilahti]

- Remove unused tplinksmarthomeprotocol import. [Teemu Rytilahti]

- Fix hs105 mac to pass the test, wrap sysinfo_lb110 properly inside 'system' [Teemu Rytilahti]

- Return None instead of False for emeter related actions. [Teemu Rytilahti]

- Wrap sysinfo to defaultdict to return None for keys which do not exist, makes unsupported keys not to fail hard (72) [Teemu R]

- Add hs100 example to fakes.py, thanks to Semant1ka on 67 (74) [Teemu R]

- Discover refactoring, enhancements to the cli tool (71) [Teemu R]

* Discover refactoring, enhancements to the cli tool

* Discover tries to detect the type of the device from sysinfo response
* Discover.discover() returns an IP address keyed dictionary,
values are initialized instances of the automatically detected device type.

* When no IP is given, autodetect all supported devices and print out their states
* When only IP but no type is given, autodetect type and make a call based on that information.
* One can define --bulb or --plug to skip the detection.

* renamed pyHS100.py -> smartdevice.py

* SmartPlugException -> SmartDeviceException in comments

* fix mic_type check

* make time() return None on failure as we don't know which devices support getting the time and it's used in the cli tool

* hw_info: check if key exists before accessing it, add mic_mac and mic_type

* Check for mic_mac on mac, based on work by kdschloesser on issue 59

* make hound happy, __init__ on SmartDevice cannot error out so removing 'raises' documentation

- Add LB110 sysinfo (75) [Sean Gollschewsky]

* Add LB110 sysinfo

* Linting.

- Add pass_dev to hsv, adjust ranges (70) [Teemu R]

* add pass_dev to hsv command, it was always broken

* Hue goes up to 360, saturation and value are up to 100(%)

- Extract shared types (exceptions, enums), add module level doc, rename exception to be generic. [Teemu Rytilahti]

- Add check to ensure devices with lat/lon with `_i` suffix are supported (54) (56) [Matt LeBrun]

* Add check to ensure devices with lat/lon with `_i` suffix are supported (54)

* Add .gitignore for posterity

- Generalize smartdevice class and add bulb support for the cli tool (50) [Teemu R]

Fixes 48 and 51. The basic functionality should work on all types of supported devices, for bulb specific commands it is currently necessary to specify --bulb.

- Refactor and drop py2 support (49) [Teemu R]

* move is_off property to SmartDevice, implement is_on for bulb and use it

* refactor by moving smartbulb and smartplug to their own classes

* drop python2 compatibility, make flake8 happy

* travis: remove 2.7, add 3.6

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.