Skip to content

Commit fa8edf4

Browse files
committed
Automatic detection of supported P2P encryption (none, type1, type2)
Fixed regression introduced with activating p2p encryption for all devices (some older devices do not support it!) Updated docs Updated versions of the package dependencies
1 parent 255a4c8 commit fa8edf4

22 files changed

+1151
-971
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,12 @@ Please use GitHub issues for this.
8080

8181
## Changelog
8282

83+
### 2.8.1 (2023-08-31)
84+
85+
* (bropat) Automatic detection of supported P2P encryption (none, type1, type2)
86+
* (bropat) Fixed regression introduced with activating p2p encryption for all devices (some older devices do not support it!)
87+
* (bropat) Updated versions of the package dependencies
88+
8389
### 2.8.0 (2023-08-20)
8490

8591
* (bropat) Implemented p2p data encryption for all supported commands

docs/_coverpage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
![logo](_media/eufy-security-client.png)
22

3-
# eufy-security-client <small>2.8.0</small>
3+
# eufy-security-client <small>2.8.1</small>
44

55
> This shared library allows to control [Eufy security devices](https://us.eufylife.com/collections/security) by connecting to the Eufy cloud servers and local/remote stations over p2p
66

docs/supported_devices.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
| ![T8420X image](_media/floodlight_small.jpg) | Floodlight Camera (T8420X) | :heavy_check_mark: | Firmware: 2.0.6.1 (20220824) |
2525
| ![T8422 image](_media/floodlight_small.jpg) | Floodlight Cam (T8422) | :heavy_check_mark: | |
2626
| ![T8423 image](_media/floodlight2pro_small.jpg) | Floodlight Cam 2 Pro (T8423) | :heavy_check_mark: | Firmware: 1.0.7.4 (20211219) |
27-
| ![T8424 image](_media/floodlight2_small.jpg) | Floodlight Cam 2 (T8424) | :heavy_check_mark: | |
27+
| ![T8424 image](_media/floodlight2_small.jpg) | Floodlight Cam 2 (T8424) | :heavy_check_mark: | Firmware: 2.0.8.8 (20230807) |
2828
| ![T84A1 image](_media/walllight_s100_small.jpg) | Wired Wall Light Cam S100 (T84A1) | :heavy_check_mark: | Firmware: 1.0.8.2 (20230521) |
2929
| ![T8200 image](_media/wireddoorbell2k_small.jpg) | Wired Doorbell 2k (T8200) | :heavy_check_mark: | |
3030
| ![T8200X image](_media/wireddoorbell2k_small.jpg) | Wired Doorbell 2k (T8200X) | :heavy_check_mark: | Firmware: 2.0.6.0 (20220826) |

package-lock.json

Lines changed: 187 additions & 137 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eufy-security-client",
3-
"version": "2.8.0",
3+
"version": "2.8.1",
44
"description": "Client to comunicate with Eufy-Security devices",
55
"author": {
66
"name": "bropat",
@@ -42,7 +42,7 @@
4242
"dependencies": {
4343
"got": "^11.8.6",
4444
"long": "^5.2.3",
45-
"protobufjs": "^7.2.4",
45+
"protobufjs": "^7.2.5",
4646
"qs": "^6.11.2",
4747
"node-rsa": "^1.1.1",
4848
"crypto-js": "^4.1.1",
@@ -52,23 +52,23 @@
5252
"@cospired/i18n-iso-languages": "^4.1.0",
5353
"fs-extra": "^11.1.1",
5454
"sweet-collections": "^1.1.0",
55-
"mqtt": "^5.0.3",
55+
"mqtt": "^5.0.4",
5656
"node-schedule": "^2.1.1",
5757
"p-throttle": "^4.1.1",
5858
"image-type": "^4.1.0",
5959
"date-and-time": "^3.0.2"
6060
},
6161
"devDependencies": {
62-
"@types/node": "^16.18.41",
62+
"@types/node": "^16.18.46",
6363
"@types/qs": "^6.9.7",
6464
"@types/node-rsa": "^1.1.1",
6565
"@types/crypto-js": "^4.1.1",
6666
"@types/fs-extra": "^11.0.1",
6767
"@types/node-schedule": "^2.1.0",
68-
"@typescript-eslint/eslint-plugin": "^6.4.0",
69-
"@typescript-eslint/parser": "^6.4.0",
70-
"eslint": "^8.47.0",
71-
"typescript": "^5.1.6"
68+
"@typescript-eslint/eslint-plugin": "^6.5.0",
69+
"@typescript-eslint/parser": "^6.5.0",
70+
"eslint": "^8.48.0",
71+
"typescript": "^5.2.2"
7272
},
7373
"bugs": {
7474
"url": "https://github.com/bropat/eufy-security-client/issues"

src/eufysecurity.ts

Lines changed: 81 additions & 81 deletions
Large diffs are not rendered by default.

src/http/api.ts

Lines changed: 106 additions & 116 deletions
Large diffs are not rendered by default.

src/http/device.ts

Lines changed: 86 additions & 86 deletions
Large diffs are not rendered by default.

src/http/parameter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Logger } from "ts-log";
22

33
import { CommandType } from "../p2p/types";
4-
import { decodeBase64 } from "../p2p/utils";
4+
import { decodeBase64, getNullTerminatedString } from "../p2p/utils";
55
import { parseJSON } from "../utils";
66
import { ParamType } from "./types";
77

@@ -26,7 +26,7 @@ export class ParameterHelper {
2626
type === CommandType.CMD_WALL_LIGHT_SETTINGS_COLORED_LIGHTING_COLORS ||
2727
type === CommandType.CMD_WALL_LIGHT_SETTINGS_DYNAMIC_LIGHTING_THEMES) {
2828
if (typeof value === "string") {
29-
const parsedValue = parseJSON(decodeBase64(value).toString("utf8"), log);
29+
const parsedValue = parseJSON(getNullTerminatedString(decodeBase64(value), "utf-8"), log);
3030
if (parsedValue === undefined) {
3131
log.warn("Non-parsable parameter value received from eufy cloud. Will be ignored.", { type: type, value: value });
3232
}

src/http/station.ts

Lines changed: 246 additions & 225 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)