All notable changes to this project will be documented in this file (since version 1.1.8
).
If you notice that something is missing, please open an issue or submit a PR.
The format is based on Keep a Changelog.
- Implement zerocopy writes for the encrypted protocol. #476
- Linter and test fixe.
- Fix handling of explict close. #467
- Hashing of accessories no longer includes their values, resulting in more reliable syncs between devices. #464
- Add AccessoryInformation:HardwareFinish and NFCAccess characteristics/services. #454
- Fix handling of multiple pairings. #456
- Save raw client username bytes if they are missing on successful pair verify.#458
- Add support for Write Responses. #459
- Ensure tasks are not garbage-collected before they finish. #460
- Allow passing multiple ip to advertise on to AccessoryDriver. #442
- Fix for the new home architecture - retain the original format of the UUID. #441
- Add python 3.11 to the CI. #440
- Use orjson.loads in loader to speed up startup. #436
- Patch for [WinError 5] Access Denied. #421
- Add support for a custom iid manager. #423
- Fix pairing with iOS 16. #424
- Fix error logging when
get_characteristics
fails. #425 - Add necessary support for Adaptive Lightning. #428
- Speed up "get accessories". #418
- Increase minimum python version to 3.7. #417
- Speed up encryption by using ChaCha20Poly1305Reusable. #413
- Speed up serialization using orjson. #412
- Avoid redundant parsing of the URL. #402
- Allow invalid client values when enabled. #392
- Only send the latest state in case of multiple events for the same characteristic. #385
- Handle invalid formats from clients. #387
- Fix floating point values with minStep. #382
- Bump zeroconf to 0.36.2. #380
- Handle additional cases of invalid values. #378
- Allow passing the zeroconf server name when creating the AccessoryDriver. #379
- Increment the config version when the accessory changes. #376
- Add support for HAP v 1.1. #365
- Reduce event overhead. #360
- Ensure floating point values are truncated for int formats. #361
- Remove python 3.10 alpha from ci workflow. #362
- Protocol 1.1: Add support for prepared writes. #366
- Decrease snapshot timeout to avoid being disconnected. #367
- Avoid writing delayed camera snapshots when the connection is closed. #368
- Switch from ed25519 to pynacl. #355
- Bumped zeroconf to 0.32. #351
- Handle additional cases of invalid hostnames. #348
- Python 3.5 is no longer supported. #354
- Add async registration for zeroconf. #342
- Reduce payload sizes by adding support for short UUIDs and compact json (~40% reduction). #345
- Fix
run_at_interval
with multiple accessories. #335 - Ensure HTTP 200 status is sent when there are no failures for
get_characteristics
. Improves battery life. #337
- Python 3.10 support. #328
- Improve connection stability with large responses. #320
- Fix
Accessroy.run
not being awaited from a bridge. #323 - Clean up event subscriptions on client disconnect. #324
- Implement partial success response for
set_characteristics
(wasBAD_REQUEST
on error). #316
- Fix an issue that would cause pairing to fail (implement
list pairings
). #307 - Remove unsupported characters from Accessory names. #310
- Speed up event subscription for new connections. #308
- Properly handle camera snapshots. #311
- Properly handle pairing attempt when already paired. #314
- HTTP server is now based on asyncio. #301
- Fix a bug in the pairing URL generator. #303
- Ensure an error response is generated on exception. #292
- Improve error reporting during pairing. #289
- Handle request for an empty read instead of throwing an exception. #288
- Fix thread safety in get characteristics. #287
- Support for multiple camera streams. #273
- Use SimpleQueue instead of Queue when available (performance improvements). #274
- Make sure accessory setup code appears when running under systemd. #276
- Improve event loop handling. #270
- Auto-detect the IP address in the camera demo so it can work out of the box. #268
- Correctly handling of a single byte read request. #267
- Add compatibility with zeroconf 0.27. #263
- Fix random disconnect after upgrade to encrypted. #253
- Convert the characteristic UUID to string only once. #256
- Fix pairing failure - split read/write encryption upgrade. #258
- Allow negotiated framerate to be used - add "-framerate" parameterto avfoundation. #260
- Add support for unavailable accessories. #252
### Developers
- Cleanup and fixes for python 3.7 and 3.8. Enable pylint in Travis. #255
- Fix race condition that causes pairing and unpairing failures. #246
- Fix loop on dropped connections that causes temporary stalls and connection loss. #249
- Fix exception on missing video fields. #245
- Fix exception caused by wrong parameter encoding to tlv.encode in camera.py. #243
- Log exceptions when handling a request in the HTTP server. #241
- Add an option to select the zeroconf broadcast interface. #239
- Allow service callbacks to handle multiple AIDs. #237
- Fix an issue where reading just one byte at the beginning of a block can crash the connection. #235
- Improve camera accessory integration. #231
- Add support for service-level callbacks. You can now register a callback that will be called for all characteristics that belong to it. #229
-
- Switch the symmetric cipher to use the cryptography module. This greatly improves performance. #232
- Example Accessory that exposes the raspberry pi GPIO pins as a relay. #220
- The HAP server is now HTTP version 1.1. #216
- Fixed an issue where accessories on the server can appear non-responsive. #216
- Correctly end HAP responses in some error cases. #217
- Fixed an issue where an accessory can appear as non-responsive after an event. Events for value updates will not be sent to the client that initiated them. #215
- The
AccessoryDriver
can now advertise on a different address than the one the server is running on. This is useful when pyhap is running behind a NAT. #203
- Added support for Television accessories.
- Fixed an issue where stopping the
AccessoryDriver
can fail withRuntimeError('dictionary changed size during iteration')
. - Fixed an issue where the
HAPServer
can crash when sending events to clients.
- Tests for
hap_server
.
- Correctly proxy
_io_refs
to the socket. #145
- Added a
asyncio.SafeChildWatcher
as part ofAccessoryDriver.start
if started in the main thread. - Added
Camera.stop
, which terminates all streaming processes. AccessoryDriver.safe_mode
parameter. Set withdriver.safe_mode = True
beforedriver.start
to disableupdate_advertisement
call forpair
andunpair
. After unpairing a restart is necessary. #168
- The default implementations of the
Camera
'sstart_stream
,stop_stream
andreconfigure_stream
are now async. - The streaming process is started with
asyncio.create_subprocess_exec
instead ofsubprocess.Popen
- Moved most of the metadata from
setup.py
tosetup.cfg
. Added long description.
AccessoryDriver.add_job
now correctly schedules coroutines wrapped in functools.partial.- Fixed the slow shutdown in python 3.7, which was caused by the changed
behavior of
ThreadingMixIn.server_close
. - Fixed an issue where sockets are blocked on
recv
while inCLOSE_WAIT
state, which can eventually exhausts the limit of open sockets. #145
- Added support for the camera accessory. #161
- Added a demo script that starts four fake accessories.
- Added
NeoPixelsLightStrip
accessory. #144 - Added new Accessory categories. Commit
- Updated the README with information on how to setup a camera accessory.
- Spelling fix - executor (accessory_driver). #159
- Char.client_update_value now ignores call if value is already set. This could happen during automations. #162
- Updated README. #138
- Accessory return codes for characteristics. #143
- Deprecation notice in
accessory.py/config_changed
. #150 - Add end_response in set_characteristics. #153
- Spelling mistake in
setup.cfg
that caused broken builds. #130
- Package data is now included again. #128
- Option to pass custom loader object to
driver
with parameterloader
. #105 - Default port for
accessory_driver.port = 51234
. #105
- The
loader
object is now stored in thedriver
and can be accessed throughdriver.loader
. #105 - Use the
Accessory.run_at_interval
decorator for therun
method, instead ofwhile True: sleep(x); do_stuff()
. #124
- The
driver
doesn't take the topaccessory
anymore. Instead it's added throughdriver.add_accessory()
after the initialization. #105 - All
driver
init parameter are now required to be passed as keywords. #105 - Any
accessory
needs thedriver
object for its initialization, passed as first argument. #105 - Removed class
AsyncAccessory
. All of its methods are now fully integrated into theAccessory
class.run
,stop
can be either normal or async methods andrun_at_interval
works with both as well. #124
- Removed
acc.set_driver()
andacc.set_sentinel()
methods.acc.run_sentinel
,acc.aio_stop_event
andacc.loop
are now accessed throughacc.driver.xxx
.run_sentinel
is changed tostop_event
. #105 - Added scripts for
setup
andrelease
. #125 - Added
async
helper methods and restructuredstart
andstop
methods forasync
conversion. #124
- Added
getter_callback
to Characteristics. #90 - The
pincode
can now be assigned as a parameter for the driver. #120
- Improved documentation for version
2.0.0
. #114
- The
accessory
andbridge
parametermac
andpincode
are now deprecated. #120 Accessory.config_changed
, usedriver.config_changed
instead. #120Accessory.paired
, usedriver.state.paired
instead. #120
- Typo in log message in
accessory_driver.stop
. #112
- Moved all accessories from
pyhap.accessories
to anaccessories
folder at the root of the project. #115 - Removed unused method
accessory.create
. #117 - Removed
iid_manager
andsetup_id
parameter fromaccessory
andbridge
init
calls. #117
- The
driver
event loop name changed fromevent_loop
toloop
. #107 pyhap.accessories
is now a native namespace package. Seepyhap/accessories/README.md
for details on how to integrate third party Accessories. #115- Added static code checks. To run them locally use
tox -e lint
andtox -e pylint
. #118 - Added
State
helper class to keep track of (semi-)static information. #120 - Variables that are related to pairing and storing static information have been moved to
driver.state
. That includes fromaccessory
:config_version
,mac
,setup_id
,private_key
,public_key
andpaired_clients
as well as theadd_paired_client
andremoved_paired_client
methods. Foraccessory_driver
:address
andport
. #120
- New helper methods to run the
run
method repeatedly, until the driver is stopped.Accessory.repeat(time)
orAsyncAccessory.repeat(time)
. #74 - New helper method
service.configure_char
. Shortcut to configuring a characteristic. #84 - Characteristics and Services can now be created from a json dictionary with
from_dict
. #85 - Added helper method to enable easy override of the
AccessoryInformation
service. #102 - Added helper method to load a service and chars and add it to an accessory. #102
- Accessory.run method is now called through an event loop. You can either inherit from
Accessory
like before: Therun
method will be wrapped in a thread. Or inherit fromAsyncAccessory
and implementasync def run
. This will lead to the execution in the event loop. #74 - Scripts are now located in a separate directory:
scripts
. #81 driver.start
starts the event loop withloop.run_forever()
. #83- Debug logs for
char.set_value
andchar.client_update_value
. #99 - Changed default values associated with the
AccessoryInformation
service. #102 Accessory._set_services
is now deprecated. Instead services should be initialized in the accessoriesinit
method. #102
- Overriding properties now checks that value is still a valid value, otherwise value will be set to the default value. #82
- The
AccessoryInformation
service will always have theiid=1
. #102
- With introduction of async methods the min required Python version changes to
3.5
. #74 - The
Accessory.Category
class was removed and theCategory
constants moved topyhap/const.py
with the naming:CATEGORY_[OLD_NAME]
(e.g.CATEGORY_OTHER
) #86 - Updated
Accessories
to work with changes. #74, #89 - Renamed
Accessory.broker
toAccessory.Driver
.acc.set_broker
is nowacc.set_driver
. #104 - QR Code is now optional. It requires
pip install HAP-python[QRCode]
. #103 Loader.get_serv_loader
andLoader.get_char_loader
are replaced byLoader.get_loader
, since it now handles loading chars and services in one class. #108
to_HAP
methods don't require theiid_manager
any more #84, #85Service._add_chars
is now integrated inService.add_characteristic
85driver.update_advertisment
is nowdriver.update_advertisement
85TypeLoader
,CharLoader
andServiceLoader
are now combined into theLoader
with the new methodsget_char
andget_service
to load new chars and services. 85- Moved some constants to
pyhap/const.py
and removedHAP_FORMAT
,HAP_UNITS
andHAP_PERMISSIONS
in favor forHAP_FORMAT_[OLD_FORMAT]
, etc. #86 - Updated tests and added new test dependency
pytest-timeout
#88 - Rewrote
IIDManager
and splitIIDManager.remove
intoremove_obj
andremove_iid
. #100 requirements.txt
file has been added for min,requirements_all.txt
covers all requirements. #103
Characteristics
are now initialized with onlydisplay_name
,type_id
andproperties
as parameter. Removedvalue
andbroker
. 73- Split
Characteristic.set_value
method intoset_value
andclient_update_value
.set_value
is intended to send value updates to HomeKit, it won't call thesetter_callback
anymore.client_update_value
is now used by thedriver
to update thevalue
of the char accordingly and callsetter_callback
. It will also notify any other clients about the value change. 73
- Removed
Characteristic.NotConfiguredError
. 73 - Updated tests. 73
Characteristic.to_HAP
doesn't require theiid_manager
any more. 73Characteristic.notify
doesn't check if broker is set anymore. 73- Added helper function
Characteristic._get_default_value
. 73 - Added helper function
Characterisitc.to_valid_value
. 73
- New method
Characteristic.override_properties
. #66 - Added new
Apple-defined
types. Please check the commit to see which have changed.
- Driver calls
char.set_value
now withshould_notify=True
instead ofFalse
to notify other clients about the value change as well. #62
- Accessories with
AID=7
stopped working #61. Don't assign it to new accessories.
- Default value for
ValidValues
parameter is now thevalid value
with the least value. Mostly0
or1
. #57 - Removed the deprecated method
char.get_value
. #67 - Removed optional characteristics (
Service.opt_characteristics
) from the service characterization. They have been handled similar toService.characteristics
internally. They are still part ofpyhap/resources/services.json
however. #67 - Updated the
Apple-defined
types. Unsupported once have been removed. Please check the commit to see which have changed.
- Removed
Characteristic._create_hap_template()
and merged it intoCharacteristic.to_HAP
. #66 - Removed
char.has_valid_values
and replaced it with runtime checks. #66 - Added a
requirements_all.txt
file. #65
No changelog for this version has been added yet.