Skip to content

Commit e3d73e2

Browse files
committed
Bump for new version
1 parent e80c588 commit e3d73e2

File tree

5 files changed

+58
-7
lines changed

5 files changed

+58
-7
lines changed

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -112,3 +112,4 @@ ENV/
112112
/.idea/homekit_python.iml
113113
*.json
114114
MANIFEST
115+
Tests.md

Diff for: Tests.md

+14
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,18 @@
44

55
```bash
66
python3 -m unittest -v
7+
```
8+
9+
# Test pair & unpair
10+
11+
# Bluetooth LE
12+
```bash
13+
PYTHONPATH=. python3 homekit/pair_ble.py -f ble.json -a DW1 -m e2:a3:cb:26:77:61 -p 893-01-591;\
14+
PYTHONPATH=. python3 homekit/unpair.py -f ble.json -a DW1
15+
```
16+
17+
# IP
18+
```bash
19+
PYTHONPATH=. python3 homekit/pair.py -f controller.json -a esp -d EC:73:A0:BD:97:22 -p 111-11-111;\
20+
PYTHONPATH=. python3 homekit/unpair.py -f controller.json -a esp
721
```

Diff for: doc/overview.puml

+33-5
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,9 @@ package homekit {
107107
}
108108
}
109109

110-
class homekit.Pairing {
110+
class homekit.AbstractPairing {
111+
+ close()
112+
+ list_accessories_and_characteristics()
111113
+ get_accessories()
112114
+ get_characteristics(characteristics[], include_meta, include_perms, include_type, include_events)
113115
+ get_events(characteristics[], callback_fun, max_events=-1, max_seconds=-1)
@@ -120,17 +122,43 @@ class homekit.Controller {
120122
+ __init__(self, data)
121123
+ get_pairings()
122124
+ load_data(filename)
123-
+ perform_pairing(alias, accessory_id, pin)
125+
+ perform_pairing(alias, id, pin, type='IP')
124126
+ remove_pairing(alias)
125127
+ save_data(filename)
126128
+ {static}discover(max_seconds)
127-
+ {static}identify(accessory_id)
129+
+ {static}identify(id, type='IP')
128130
}
129131

132+
package homekit {
133+
note as n3
134+
The <b>type</b> marks whether the
135+
transport is IP or Bluetooth LE.
136+
Depending on the type the <b>id</b>
137+
is either the device ID for IP
138+
Accessories or the MAC for
139+
Bluetooth LE Accessories.
140+
end note
141+
}
142+
143+
n3 .right. homekit.Controller
144+
145+
146+
class homekit.IpPairing {
147+
}
148+
149+
class homekit.BlePairing {
150+
}
151+
152+
homekit.IpPairing -up-|> homekit.AbstractPairing
153+
154+
homekit.BlePairing -up-|> homekit.AbstractPairing
155+
156+
homekit.AbstractPairing "*" <-down- "1" homekit.Controller
130157

131158

132-
homekit.Pairing "*" <-down- "1" homekit.Controller
159+
homekit.BleSession <-left- homekit.BlePairing
133160

161+
homekit.IpSession <-right- homekit.IpPairing
134162

135163
class homekit.discover <<(E,#FF7700) executable>> {
136164
+ timeout
@@ -201,7 +229,7 @@ hide <<executable>> circle
201229
@enduml
202230

203231

204-
class homekit.Session {
232+
class homekit.IpSession {
205233
+ {static} create_from_pairing_data(data)
206234
+ {static} create_from_file(file)
207235
+ get(self, url)

Diff for: setup.cfg

+8
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,11 @@ description-file = README.md
33

44
[run]
55
source = homekit
6+
7+
[flake8]
8+
max-line-length = 120
9+
statistics = True
10+
; F401 module imported but unused
11+
; F403 ‘from module import *’ used; unable to detect undefined names
12+
; F405 name may be undefined, or defined from star imports: module
13+
ignore=F401,F403,F405

Diff for: setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@
2525
packages=['homekit', 'homekit.crypto', 'homekit.http_impl', 'homekit.model', 'homekit.model.services',
2626
'homekit.model.characteristics', 'homekit.protocol', 'homekit.zeroconf_impl'],
2727

28-
version='0.12.0',
28+
version='0.12.1',
2929
description='Python code to interface HomeKit Accessories and Controllers',
3030
author='Joachim Lusiardi',
3131
author_email='[email protected]',
3232
url='https://github.com/jlusiardi/homekit_python',
33-
download_url='https://github.com/jlusiardi/homekit_python/archive/0.12.0.tar.gz',
33+
download_url='https://github.com/jlusiardi/homekit_python/archive/0.12.1.tar.gz',
3434
keywords=['HomeKit'],
3535
classifiers=[
3636
'License :: OSI Approved :: Apache Software License',

0 commit comments

Comments
 (0)