hap-controller
Advanced tools
Comparing version
@@ -245,3 +245,3 @@ /** | ||
*/ | ||
subscribeCharacteristics(characteristics: string[]): Promise<void>; | ||
subscribeCharacteristics(characteristics: string[]): Promise<Record<string, unknown> | null>; | ||
/** | ||
@@ -255,3 +255,3 @@ * Unsubscribe from events for a set of characteristics. | ||
*/ | ||
unsubscribeCharacteristics(characteristics?: string[]): Promise<void>; | ||
unsubscribeCharacteristics(characteristics?: string[]): Promise<Record<any, unknown> | null>; | ||
/** | ||
@@ -258,0 +258,0 @@ * Get the list of subscribed characteristics |
@@ -502,3 +502,14 @@ "use strict"; | ||
this.subscribedCharacteristics = this.subscribedCharacteristics.concat(newSubscriptions); | ||
let body = {}; | ||
try { | ||
if (response.body) { | ||
body = json_bigint_1.default.parse(response.body.toString()); | ||
} | ||
} | ||
catch (err) { | ||
// ignore | ||
} | ||
return body; | ||
} | ||
return null; | ||
} | ||
@@ -516,3 +527,3 @@ /** | ||
if (!this.subscriptionConnection || !this.subscribedCharacteristics.length) { | ||
return; | ||
return null; | ||
} | ||
@@ -556,3 +567,14 @@ if (!characteristics) { | ||
} | ||
let body = {}; | ||
try { | ||
if (response.body) { | ||
body = json_bigint_1.default.parse(response.body.toString()); | ||
} | ||
} | ||
catch (err) { | ||
// ignore | ||
} | ||
return body; | ||
} | ||
return null; | ||
} | ||
@@ -559,0 +581,0 @@ /** |
{ | ||
"name": "hap-controller", | ||
"version": "0.9.0", | ||
"version": "0.9.1", | ||
"description": "Library to implement a HAP (HomeKit) controller", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -276,2 +276,5 @@ # hap-controller | ||
## Changelog | ||
### 0.9.1 (2023-01-10) | ||
* (Apollon77) Return response body for getCharacteristics and subscribe/unsubscribe also when return code was 207 in IP mode | ||
### 0.9.0 (2023-01-09) | ||
@@ -278,0 +281,0 @@ * (Apollon77) BREAKING: Returned data objects partially contain BigInt values (represented by bignumber.js instances) for iid/aid fields! |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
517764
0.27%7384
0.3%340
0.89%