Add testing suite scripts to help read API camera parameters and test camera properties and p2p flow for verification#726
Open
MELSAID888 wants to merge 15 commits intobropat:developfrom
Open
Conversation
- Add EUFYCAM_S4 (Type 89) to DeviceType enum and DeviceName mapping - Define S4 device properties (battery, PTZ, motion detection, dual cam view) - Update isCamera, hasBattery, isPanAndTiltCamera, isOutdoorPanAndTiltCamera - Add Indoor Cam C220 (T8419N, Type 10011) to supported devices - Add device discovery and verification utility scripts - Update supported devices documentation with S4 image
…ation - Add prepare script to package.json to trigger build on install - Update package-lock.json and build artifacts
…ion was missing crucial "Station Properties" needed to process P2P data (because the S4 acts as its own station). I've updated src/http/types.ts to include these properties and verified the build.
- Make P2P and property test scripts universal for all device types. - Update documentation. - Remove build directory from git index.
- Make P2P and property test scripts universal for all device types. - Update documentation. - Remove build directory from git index.
The changes prevent processing push notifications for HB3 device type to avoid unnecessary operations and potential errors. This affects multiple device classes including Camera, WallLightCam, GarageCamera, EntrySensor, MotionSensor, and SmartDrop. (NOT Tested on all - only checked on Camera but logic says that it is)
…and enhance script authentication CHANGES: - Add StationTimeZone property to OUTDOOR_PT_CAMERA StationProperties (fixes S4 initialization) * S4 (eufyCam S4, type 89) now properly inherits timezone support for both standalone and hub-based operation * Timezone property was missing despite being present in other similar camera configurations - Enhance authentication flow in discovery and verification scripts * Add interactive readline prompts for captcha and 2FA (two-factor authentication) * Captcha images are now saved to disk as PNG files for manual viewing * 2FA verification code entry supports retry on failure * Both scripts now handle multi-step authentication interactively - Update scripts/README.md documentation * Document captcha handling (image saved to file in current directory) * Document 2FA flow and retry mechanism * Remove personal credentials from examples * Clarify what each script discovers and verifies FILES MODIFIED: - src/http/types.ts: Added [PropertyName.StationTimeZone] to OUTDOOR_PT_CAMERA.StationProperties - scripts/discover-device.ts: Added fs/path imports, enhanced captcha/2FA handlers, added device analysis section - scripts/verify-devices.ts: Enhanced 2FA handler with retry loop - scripts/README.md: Updated documentation for auth flow and captcha/2FA handling IMPACT: - S4 camera can now properly initialize and sync settings with parent station (HB3) or operate standalone - Users with 2FA enabled can now use discovery/verification scripts without API failures - Captcha handling is transparent and user-friendly in headless environments TESTING: - Verified S4 device (type 89) appears with timezone property (1249) in real account data - Confirmed S4 inherits StationGuardMode and other required properties from OUTDOOR_PT_CAMERA - Tested interactive authentication with both captcha and 2FA prompts
…S4 guard mode FEATURES: - Add full support for Eufy 4G LTE Cam S330 (T86P2, Type 111) device - Inherits configuration from CAMERA_FG (T8150, Type 110) architecture - 54 core parameters verified working - Supports all camera features: motion detection, battery, video streaming - Full 4G/LTE cellular support: signal, band, IMEI, ICCID, APN configuration - Add device type enum, properties, commands, and classifications - Add device classification methods (isCamera, hasBattery, is4GCameraBySn) FIXES: - Fix eufyCam S4 (T8172, Type 89) guard mode issue - Add missing StationTimeZone property to OUTDOOR_PT_CAMERA - Enables proper timezone support both standalone and with hub - Guard mode synchronization now works correctly DOCUMENTATION: - Add S330 to supported devices list - Add device support notes to scripts README - Document recent device additions and fixes TESTING: - Verified 100% parameter compatibility with real S330 device logs - Tested S4 with real device - confirmed timezone property present - All 54 S330 parameters mapped and working - Project builds successfully with all changes - test_camera_properties.ts confirms: S330 (Type 111) 49 properties, 8 commands - test_camera_p2p_flow.ts confirms: P2P parameter handling works correctly
…lication notification exclusion for now till logs are pulled again.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tests & developer scripts
test_camera_properties.ts — verifies properties/commands and classification for a DeviceType.
test_camera_p2p_flow.ts — simulates P2P parameter updates and validates ParameterHelper parsing.
discover-device.ts & verify-devices.ts — improved captcha/2FA handling; saved captchas to disk.
Generalised & documented scripts to help with adding new camera features.