Skip to content

Commit

Permalink
Bump for new version
Browse files Browse the repository at this point in the history
  • Loading branch information
jlusiardi committed Jan 21, 2019
1 parent e80c588 commit e3d73e2
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -112,3 +112,4 @@ ENV/
/.idea/homekit_python.iml
*.json
MANIFEST
Tests.md
14 changes: 14 additions & 0 deletions Tests.md
Expand Up @@ -4,4 +4,18 @@

```bash
python3 -m unittest -v
```

# Test pair & unpair

# Bluetooth LE
```bash
PYTHONPATH=. python3 homekit/pair_ble.py -f ble.json -a DW1 -m e2:a3:cb:26:77:61 -p 893-01-591;\
PYTHONPATH=. python3 homekit/unpair.py -f ble.json -a DW1
```

# IP
```bash
PYTHONPATH=. python3 homekit/pair.py -f controller.json -a esp -d EC:73:A0:BD:97:22 -p 111-11-111;\
PYTHONPATH=. python3 homekit/unpair.py -f controller.json -a esp
```
38 changes: 33 additions & 5 deletions doc/overview.puml
Expand Up @@ -107,7 +107,9 @@ package homekit {
}
}

class homekit.Pairing {
class homekit.AbstractPairing {
+ close()
+ list_accessories_and_characteristics()
+ get_accessories()
+ get_characteristics(characteristics[], include_meta, include_perms, include_type, include_events)
+ get_events(characteristics[], callback_fun, max_events=-1, max_seconds=-1)
Expand All @@ -120,17 +122,43 @@ class homekit.Controller {
+ __init__(self, data)
+ get_pairings()
+ load_data(filename)
+ perform_pairing(alias, accessory_id, pin)
+ perform_pairing(alias, id, pin, type='IP')
+ remove_pairing(alias)
+ save_data(filename)
+ {static}discover(max_seconds)
+ {static}identify(accessory_id)
+ {static}identify(id, type='IP')
}

package homekit {
note as n3
The <b>type</b> marks whether the
transport is IP or Bluetooth LE.
Depending on the type the <b>id</b>
is either the device ID for IP
Accessories or the MAC for
Bluetooth LE Accessories.
end note
}

n3 .right. homekit.Controller


class homekit.IpPairing {
}

class homekit.BlePairing {
}

homekit.IpPairing -up-|> homekit.AbstractPairing

homekit.BlePairing -up-|> homekit.AbstractPairing

homekit.AbstractPairing "*" <-down- "1" homekit.Controller


homekit.Pairing "*" <-down- "1" homekit.Controller
homekit.BleSession <-left- homekit.BlePairing

homekit.IpSession <-right- homekit.IpPairing

class homekit.discover <<(E,#FF7700) executable>> {
+ timeout
Expand Down Expand Up @@ -201,7 +229,7 @@ hide <<executable>> circle
@enduml


class homekit.Session {
class homekit.IpSession {
+ {static} create_from_pairing_data(data)
+ {static} create_from_file(file)
+ get(self, url)
Expand Down
8 changes: 8 additions & 0 deletions setup.cfg
Expand Up @@ -3,3 +3,11 @@ description-file = README.md

[run]
source = homekit

[flake8]
max-line-length = 120
statistics = True
; F401 module imported but unused
; F403 ‘from module import *’ used; unable to detect undefined names
; F405 name may be undefined, or defined from star imports: module
ignore=F401,F403,F405
4 changes: 2 additions & 2 deletions setup.py
Expand Up @@ -25,12 +25,12 @@
packages=['homekit', 'homekit.crypto', 'homekit.http_impl', 'homekit.model', 'homekit.model.services',
'homekit.model.characteristics', 'homekit.protocol', 'homekit.zeroconf_impl'],

version='0.12.0',
version='0.12.1',
description='Python code to interface HomeKit Accessories and Controllers',
author='Joachim Lusiardi',
author_email='pypi@lusiardi.de',
url='https://github.com/jlusiardi/homekit_python',
download_url='https://github.com/jlusiardi/homekit_python/archive/0.12.0.tar.gz',
download_url='https://github.com/jlusiardi/homekit_python/archive/0.12.1.tar.gz',
keywords=['HomeKit'],
classifiers=[
'License :: OSI Approved :: Apache Software License',
Expand Down

0 comments on commit e3d73e2

Please sign in to comment.