Releases: homebridge/HAP-NodeJS
Releases · homebridge/HAP-NodeJS
v0.9.2 (2020-02-23)
Bug Fixes
- #884 - Characteristic user input validator will now endeavour to always correct the provided value rather than throwing an error.
- A warning will still be shown for invalid values.
- #884 -
Characteristic.setProps
will now validate theminValue
andmaxValue
do not exceed the minimum or maximum value allowed by the number format, and automatically correct them if required.- A warning will be displayed if invalid values are provided.
- #884 - The
Current Temperature
characteristic now has a default minimum value of-273.15
(absolute zero) instead of0
. - #833 - All
MulticastOptions
properties are now correctly marked as optional.
v0.9.1 (2020-02-17)
Bug Fixes
- Fixed an issue where the
SupportedAudioStreamingConfiguration
characteristic of a camerasRTPStreamManagement
service would always encode thatcomfortNoise
is supported, leading to audio being broken. HomeKit seems to take some time to read the updated audio configuration. A repair might be required.
v0.9.0 (2021-02-17)
Notable changes
- Added support for Adaptive Lighting via the AdaptiveLightingController.
- Added support for
Promise
based read and set handler: Configured via Characteristic.onGet and Characteristic.onSet. - Introduced the HAPStatusError for an easier way to return custom defined HAPStatus codes.
Though be aware, that only a few HAPStatus codes are semantically correct for read and write handlers. Returning unexpected status codes might result in erroneous behavior. Refer to the HAP specification! - Introduced new PublishInfo options:
- The advertiser property can be used to customize the MDNSAdvertiser library used (while
bonjour-hap
is back as the default). - The bind option allows to uniformly specify binding options, for the HAP socket as well as for the advertised mdns address records.
- The addIdentifyingMaterial can be used to turn off the automatically added postfix (which is used to add identifying material based on the
username
).
- The advertiser property can be used to customize the MDNSAdvertiser library used (while
- Improved sanity checking for characteristic values.
Characteristic values now run through a more extensive check trying to highlight common mistakes made (e.g. rendering the instance unresponsive). Watch out for warnings printed to the log indicating such issues.
A brief Wiki article can be found here, though written within the context of homebridge. - Improved sanity checking when setting CharacteristicsProps using Characteristic.setProps. Again this will highlight coming mistakes, leading to HomeKit rejecting the accessory in most cases
- Read and Write Handlers are now imposed with a timeout, printing a warning for handlers taking longer than 3 seconds and leading to a timeout being returned to HomeKit after 10 seconds.
This change aims to make you aware of certain characteristics slowing down the response time of your accessory. In any case you should always aim to return immediately from read and write handlers. - Added Accessory.removeController to remove a given
Controller
instance (like a AdaptiveLightingController, CameraController or a RemoteController). - Request made to
/accessories
(used by HomeKit to read the accessory database), will now contact the read/GET handler to provide proper default values (as/accessories
is typically the first call made to a freshly booted instance). - Added Characteristic.validValuesIterator to retrieve an iterator of valid values for a given characteristic independently of its way for representing valid values (e.g.
validValues
,validValueRanges
,minValue
/maxValue
).
You code should not assume that a given type of representation is present for a characteristic, thus you should migrate using this iterator when checking valid values, in order to maintain compatibility with future releases. - Added support for Characteristics with Additional Authorization, by using Characteristic.setupAdditionalAuthorization.
This can only be utilized when used with a custom made iOS App. - Added preliminary typedoc support.
- The old
./gen
folder containing Service and Characteristics definitions was replaced with a new way of generating those definitions, making it again easier to incorporate the latest set of Apple defined Service and Characteristics.
Those new definition files are now placed in the./definitions
folder, namely CharacteristicDefinitions.ts and ServiceDefinitions.ts. - Incorporate latest additions to the Service and Characteristics definitions of iOS 14.x releases.
Bug Fixes
- Improvements and fixes regarding the conformance to the HAP specification:
- Requesting metadata on
GET /characteristics
are now properly returned. - Event Notifications are now properly accumulated to a certain extent.
- Removed usage of TCP Keepalive, as it drains the power of connected mobile devices. Instead, similar to the HomeKitADK, a periodic cleanup of connections is done once a certain amount is reached.
- The internal http server is now limited to listen on the loopback interface only.
- Response Encoding was optimized: Fixing rounding with a specified
minStep
value. Secondlybool
formats are now encoded as1
and0
to optimize transmission size.
- Requesting metadata on
- The
instanceOf
operator is now somewhat supported for deserialized characteristics and services. However it still fails to work on characteristics and services restored from preexisting caches. Thus it is still not recommended to make use of theinstanceOf
operator, instead please fall back to using aUUID
based check. HAP-NodeJS
will now validate that the minimum required node.js version is installed and will fail with a properly phrased error message. This check primarily consist of checking the availability of thechacha20-poly1305
cipher, requiring node10.17.0
.- Improved typing of events by removing custom
EventEmitter
type, replaced by defining overloads foron
method. - Added
source-map-support
support. - Fix a
EventEmitter
memory leak warning, appearing on instances with multiple Controllers set up. - Minor fixes and code cleanup.
v0.8.5 (2020-12-28)
Bug Fixes
- The ciao library was bumped to v1.1.2, fixing the following mDNS related issues:
- Fixed a bug where ciao wouldn't respond to queries coming from a different subnet
- Response packets are now properly marked as authoritative
- SRV record ttl is now properly set to 120 seconds (instead of previously 4500 seconds)
- Fixed an issue where sending continuous truncated queries could lead to a memory leak
v0.8.3 (2020-12-05)
Notable changes
ciao
library was updated to v.1.1.0
v0.8.2 (2020-09-16)
Bug Fixes
ciao
was updated to 1.0.5
v0.8.1 (2020-09-15)
Bug Fixes
- Fixed a bug related to bonjour discovery where on some machines (FreeBSD and some containerized installs) the HAP server was not correctly advertised
v0.8.0 (2020-09-14)
Notable changes
- The newly written ciao library replaces the old bonjour-hap library. This heavily improves the advertising performance. We already heard from faster updating accessories for many people.
- Corrected a debug message #845
v0.7.9
Notable Changes
CameraController
will now automatically determine the local IP address (be34945).
Attention: If you rely on supplying a custom address you will need to switch to the new propertyaddressOverride
of thePrepareStreamResponse
object as the now deprecated propertyaddress
is ignored.- Added new Accessory Categories
Television Set Top Box (35)
andTelevision Streaming Stick (36)
introduced with iOS 14, iPadOS 14, macOS 11 beta 5 (061737c).