Commit Graph

8 Commits

Author SHA1 Message Date
Sean Gollschewsky
25e550d3fe Fix brightness and temperature. (#89) 2017-09-15 14:23:06 +02:00
Teemu Rytilahti
1d7e5fa73c remove unused tplinksmarthomeprotocol import 2017-08-05 17:30:40 +02:00
Teemu R
07af48e41a Discover refactoring, enhancements to the cli tool (#71)
* 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
2017-08-05 15:49:56 +02:00
Teemu R
10544004cc add @pass_dev to hsv, adjust ranges (#70)
* add @pass_dev to hsv command, it was always broken

* Hue goes up to 360, saturation and value are up to 100(%)
2017-08-03 22:13:56 +02:00
Teemu R
09e8948790 generalize smartdevice class and add bulb support for the cli tool (#50)
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```.
2017-04-24 19:28:22 +02:00
Teemu R
86f14642c8 Refactor and drop py2 support (#49)
* 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
2017-04-14 14:24:58 +02:00
Teemu Rytilahti
23e51a8686 cli: display an error if no ip is given
also bump the version to 0.2.4.1 with this fix.
2017-03-26 03:22:18 +02:00
Teemu R
d253b55d41 Add new client tool (#42)
* Add new client tool

After installing the package pyhs100 command-line tool can be used
to control the plug.

See --help for its usage, most of the features for plugs are implemented,
some of the shared functionality works for bulbs too.

* Add discover command

* Delete old examples, the cli works as an example well enough
2017-03-20 19:03:19 +01:00