Skip to content

Releases: homebridge/HAP-NodeJS

v0.9.2 (2020-02-23)

23 Feb 08:27
410f400
Compare
Choose a tag to compare

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 the minValue and maxValue 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 of 0.
  • #833 - All MulticastOptions properties are now correctly marked as optional.

v0.9.1 (2020-02-17)

17 Feb 18:22
1c143f6
Compare
Choose a tag to compare

Bug Fixes

  • Fixed an issue where the SupportedAudioStreamingConfiguration characteristic of a cameras RTPStreamManagement service would always encode that comfortNoise 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)

16 Feb 23:46
92414b8
Compare
Choose a tag to compare

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).
  • 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. Secondly bool formats are now encoded as 1 and 0 to optimize transmission size.
  • 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 the instanceOf operator, instead please fall back to using a UUID 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 the chacha20-poly1305 cipher, requiring node 10.17.0.
  • Improved typing of events by removing custom EventEmitter type, replaced by defining overloads for on 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)

28 Dec 00:39
186ce56
Compare
Choose a tag to compare

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)

05 Dec 16:47
d1a49b9
Compare
Choose a tag to compare

Notable changes

  • ciao library was updated to v.1.1.0

v0.8.2 (2020-09-16)

16 Sep 01:34
b3bc73c
Compare
Choose a tag to compare

Bug Fixes

  • ciao was updated to 1.0.5

v0.8.1 (2020-09-15)

15 Sep 01:51
a793f20
Compare
Choose a tag to compare

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)

14 Sep 18:08
f2adec3
Compare
Choose a tag to compare

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

02 Sep 21:56
f563641
Compare
Choose a tag to compare

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 property addressOverride of the PrepareStreamResponse object as the now deprecated property address is ignored.
  • Added new Accessory Categories Television Set Top Box (35) and Television Streaming Stick (36) introduced with iOS 14, iPadOS 14, macOS 11 beta 5 (061737c).

v0.7.8

14 Aug 14:07
e01835d
Compare
Choose a tag to compare

Notable Changes

  • Added Service and Characteristic definitions introduced with iOS 14, iPadOS 14, macOS 11, ... beta 4 (2db8d57)
    • The HeartBeat characteristic was added to the AccessoryRuntimeInformation service as an optional characteristic