* 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
* discover runs, prints on since of device 0
* added preliminary support for HS300
* forgot to add smartdevice to commit
* added index to CLI
* clean up dirty code
* added fake sysinfo_hs300
* changed device alias to match MAC
* #131 Move _id_to_index into smartstrip so everyone can pass index
* Update pyHS100/discover.py
Co-Authored-By: jimboca <jimboca3@gmail.com>
* refactoring to deduplicate code between smarplug and smartstrip
* fixing CI failures for devices without children
* incorporating feedback from pull request.
* fixing hound violation
* changed internal store from list of dicts to dict
* changed other methods to dictionary store as well
* removed unused optional type from imports
* changed plugs to Dict, remove redundant sys_info calls
* added more functionality for smart strip, added smart strip tests
* updated FakeTransportProtocol for devices with children
* corrected hound violations
* add click-datetime
* 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
* 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..
* 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
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```.
* 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
* 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