Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
node_modules
build
*.tgz
.DS_Store
.DS_Store
.logs
10,561 changes: 0 additions & 10,561 deletions build/http/station.js

This file was deleted.

1 change: 0 additions & 1 deletion build/http/station.js.map

This file was deleted.

Binary file added docs/_media/eufycam_s330_4glte_small.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_media/eufycams4_t8172_small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions docs/supported_devices.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
| ![T8160 image](_media/eufycam3_small.jpg) | eufyCam S330 (T8160; eufyCam 3) | :heavy_check_mark: | Firmware: 3.1.8.6 (20221101) |
| ![T8161 image](_media/eufycam3c_small.jpg) | eufyCam S300 (T8161; eufyCam 3C) | :heavy_check_mark: | Firmware: 3.1.8.6 (20221101) |
| ![T8160 image](_media/eufycam3pro_small.png) | eufyCam S3 Pro (T8162; eufyCam S3 Pro) | :heavy_check_mark: | |
| ![T8172 image](_media/eufycams4_t8172_small.png) | eufyCam S4 (T8172) | :heavy_check_mark: | |
| ![T86P2 image](_media/eufycam_s330_4glte_small.jpg) | Eufy 4G LTE Cam S330 (T86P2) | :heavy_check_mark: | |
| ![T8600 image](_media/eufycame330_small.jpg) | eufyCam E330 (Professional; T8600) | :heavy_check_mark: | Firmware: 0.5.9.5 (20231218) |
| ![T8130 image](_media/solocame20_small.jpg) | SoloCam E20 (T8130) | :heavy_check_mark: | |
| ![T8131 image](_media/solocame40_small.jpg) | SoloCam C120 (T8131; SoloCam E40) | :heavy_check_mark: | |
Expand Down Expand Up @@ -57,6 +59,7 @@
| ![T8416 image](_media/indoorcamE30_small.jpeg) | Indoor Cam E30 (T8417) | :heavy_check_mark: | |
| ![T8416 image](_media/indoorcamC210_small.png) | Indoor Cam C210 (T8419) | :heavy_check_mark: | |
| ![T8416 image](_media/indoorcamC220_small.png) | Indoor Cam C220 (T8W11C; type 10008/10010) | :heavy_check_mark: | |
| ![T8416 image](_media/indoorcamC220_small.png) | Indoor Cam C220 (T8419N; type 10011) | :heavy_check_mark: | |
| ![T8150 image](_media/4g_lte_starlight_small.jpg) | 4G LTE Starlight (T8150) | :heavy_check_mark: | |
| ![T8150 image](_media/4g_lte_starlight_small.jpg) | 4G Camera S230 (T8151; 4G LTE Starlight) | :heavy_check_mark: | Firmware: 1.1.3.7 (20230730) |
| ![T8150 image](_media/4g_lte_starlight_small.jpg) | 4G LTE Starlight (T8152) | :heavy_exclamation_mark: | |
Expand Down
60 changes: 9 additions & 51 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
},
"homepage": "https://github.com/bropat/eufy-security-client",
"main": "build/index.js",
"exports": {
".": "./build/index.js",
"./package.json": "./package.json"
},
"scripts": {
"build:ts": "tsc -p tsconfig.build.json && npm run copy-proto-build",
"copy-proto-build": "npx copyfiles -u 1 \"src/**/*.proto\" \"src/**/*.crt\" build",
Expand All @@ -16,7 +20,8 @@
"watch:ts": "tsc -p tsconfig.build.json --watch",
"watch": "npm run watch:ts",
"lint": "eslint --ext .ts src",
"prepublishOnly": "tsc -p tsconfig.build.json && npm run copy-proto-build"
"prepublishOnly": "tsc -p tsconfig.build.json && npm run copy-proto-build",
"prepare": "npm run build"
},
"license": "MIT",
"keywords": [
Expand Down
92 changes: 92 additions & 0 deletions scripts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# Development Utility Scripts

This directory contains utility scripts for development and testing.

## Device Discovery Script

Discovers all devices on your Eufy account and displays their properties and parameters.

**Usage:**
```bash
npx ts-node --transpile-only scripts/discover-device.ts <email> <password> [country]
```

**Example:**
```bash
npx ts-node --transpile-only scripts/discover-device.ts your.email@example.com yourpassword US
```

**Authentication:**
- The script will connect to your Eufy account using the provided credentials.
- If a **Captcha** is required, the image will be saved to a file in your current directory (named `captcha_<id>.png`). You can open this file to view the captcha image and enter the code when prompted.
- If **2FA (Two-Factor Authentication)** is enabled, you will be prompted to enter the verification code sent to your email or SMS. The script will retry if an incorrect code is entered.

**Output:**
- Lists all stations (hubs) and their configurations
- Lists all devices with their types, models, serials, and parameters
- Includes a device property analysis showing which properties are present/missing
- Helpful for debugging device configuration and parameter issues

## Device Verification Script

Verifies that all devices on your account are correctly recognized by the system's device classification functions (isCamera, hasBattery, isPanAndTiltCamera, etc.).

**Usage:**
```bash
npx ts-node --transpile-only scripts/verify-devices.ts <email> <password> [country]
```

**Example:**
```bash
npx ts-node --transpile-only scripts/verify-devices.ts your.email@example.com yourpassword GB
```

**Authentication:**
- Same as Device Discovery Script: handles Captcha and 2FA prompts interactively
- Saves captcha images to disk for manual viewing if needed
- Retries 2FA code entry until successful

**Output:**
- Classifies each device and shows test results (isCamera, hasBattery, isPanAndTilt, etc.)
- Highlights any misclassifications that need fixing
- Useful for ensuring device type configuration is correct

## Universal Camera Properties Test

Checks if a specific device type has its Properties and Commands correctly defined in the `http/types.ts` configuration maps. Also checks classification (isCamera, etc.).

**Usage:**
```bash
npx ts-node --transpile-only scripts/test_camera_properties.ts <DeviceTypeNumber>
```

**Example:**
```bash
# Test EufyCam S4 (Type 89)
npx ts-node --transpile-only scripts/test_camera_properties.ts 89
```

## Universal Camera P2P Flow Test

Simulates an incoming P2P parameter update for a specific device to verify that `ParameterHelper` correctly parses the raw value.

**Usage:**
```bash
npx ts-node --transpile-only scripts/test_camera_p2p_flow.ts [DeviceTypeNumber] [DeviceSN] [StationSN]
```

**Arguments:**
- `DeviceTypeNumber`: Integer (default: 89 for S4)
- `DeviceSN`: String (default: "T8172DEMO")
- `StationSN`: String (default: "T8030DEMO")

**Example:**
```bash
npx ts-node --transpile-only scripts/test_camera_p2p_flow.ts 89 T8172TEST1 T8030TEST1
```

## Notes

- **Country**: Use 2-letter ISO country code (e.g., US, GB, DE, FR). Should match your Eufy app setting.
- **2FA/Captcha**: If prompted for 2FA or captcha, you may need to log in via the Eufy app first.
- Scripts require `npm install` to have been run first.
Loading