Add device discovery (#25)

* add (untested) discover mode

* Keep discovery and normal communication separate, uppercase magic consts

This sepearates the earlier test code for discovering devices,
and adds 5 sec timeout for gathering responses from potential devices.

This commit also uppercases magic constants.

Discovery & communication tested with HS110.

* update readme with example how to discover devices, pep8ify
This commit is contained in:
Teemu R
2017-01-08 00:44:57 +02:00
committed by GadgetReactor
parent 1e01530447
commit 71ac1f043a
4 changed files with 64 additions and 5 deletions

View File

@@ -1,3 +1,3 @@
from __future__ import absolute_import
from __future__ import unicode_literals
from pyHS100.pyHS100 import SmartPlug, SmartPlugException
from pyHS100.pyHS100 import SmartPlug, TPLinkSmartHomeProtocol, SmartPlugException