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

@@ -59,3 +59,9 @@ There is also a simple tool for testing connectivity in examples, to use:
```python
python -m examples.cli <ip>
```
# Discovering devices
```python
python3 -m examples.discover
```