Conversation
Collaborator
elad-bar
commented
Dec 30, 2025
- Implement exponential backoff for reconnection attempts to prevent aggressive retries
- Initial retry after 1 minute, increasing to 2, 4, 8, and maximum 15 minutes
- Reduces server load during extended connection issues
- Add AWS IoT credential caching with 2-hour validity
- Credentials are cached and reused for 1h50m after successful fetch
- Eliminates redundant token API calls when credentials are still valid
- Implement rate limiting for token endpoint calls
- Minimum 5-minute interval between token API requests
- Protects against API rate limiting during recurring disconnection issues
- Reduce token API calls from ~20-30 per hour during outages to ~1 per hour maximum
- Fix excessive API calls to Maytronics token endpoint during recurring disconnections
- Fix integration-version header value
…-during-reconnections Fix excessive token api calls during reconnections
…c in ConfigManager
…ion. Added is_disconnected method to ConnectivityStatus, updated reset_login_details to preserve motor unit serial, and refined error handling in RestAPI for better token management and logging.
…edentials before API calls. This ensures fresh authentication when tokens are outdated, improving overall security and reliability.
…tes and adjust update intervals. Implement debouncing for MQTT refresh to optimize performance and prevent excessive calls. Update tests to reflect changes in AWSClient initialization.
…andling, refactoring AWSClient for real-time MQTT updates, and enhancing connectivity status handling. Add documentation for MQTT update debouncing and workflows.
Maytronics retired the legacy mbapp18.maytronics.com email/password login. Switch to the working scheme: Cognito CUSTOM_AUTH email OTP + bearer-token calls against apps.maytronics.com. - Two-step config flow: collect email -> Cognito InitiateAuth -> collect OTP -> RespondToAuthChallenge -> profile + AWS STS creds - Persist id-token / refresh-token / id-token-expires-at; refresh via REFRESH_TOKEN_AUTH within 5 min of expiry - Swap robot details refresh to apps.maytronics.com/mobapi/user/ authenticate-user/ (bearer) and AWS creds to /mt-sso/aws/getToken/ - Preserve develop's improvements: IntegrationInfo User-Agent header, AWS_CREDENTIALS_TTL caching, MIN_TOKEN_FETCH_INTERVAL rate limit, RECONNECT_BACKOFF_MAX 401 token-age check, force_log_level on _set_status, is_disconnected() resets _device_loaded, reset_login_details() preserves motor_unit_serial - Drop password field, AES helpers, email-validation, reset-password, and the now-unused PasswordManager - Existing users: remove and re-add the integration after upgrading - Bump version to 1.0.25b6 (pre-release) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… enhancing validation for motor unit serials and AWS tokens, and improving connectivity status handling. Refactor AWSClient for real-time MQTT updates and add relevant documentation.
Update CHANGELOG for v1.0.25
Collaborator
Author
|
@sh00t2kill can you pls approve this pr, also if you can exclude me from the rule that i need you for merging it, thank you! |
Collaborator
Author
|
Settings → Branch protection rules → Edit (main branch) → Just add my user there. |
Replace login with Cognito OTP flow
…eflect new Cognito OTP login flow integration.
…ve code formatting across multiple files. Adjust README formatting for clarity and enhance import organization in MyDolphin Plus component files.
- Introduced STORAGE_DATA_LAST_AWS_CREDENTIALS_FETCH to track the last fetch timestamp for AWS credentials. - Updated ConfigManager to include a property for last AWS credentials fetch and methods to update this timestamp. - Enhanced REST API calls to include user-agent headers using IntegrationInfo. - Added tests to verify user-agent header inclusion and AWS credentials fetch behavior under rate-limiting conditions.
- Added support for reauthentication when the refresh token expires, allowing users to complete the OTP login flow without needing to remove and re-add the integration. - Updated README to clarify the reconfiguration process for users upgrading from pre-OTP versions. - Enhanced flow manager and coordinator to handle reauthentication logic and state management. - Introduced new strings for reauthentication prompts and success messages. - Added tests to ensure the reauthentication flow behaves as expected under various scenarios.
- Introduced new strings for successful reauthentication and session expiration prompts in English and Italian translations. - Enhanced user experience by providing clear instructions for reauthentication when sessions expire.
Post otp merge fixes
Add CONTRIBUTING.md and update README to include contribution guidelines
- Preserve stored Cognito tokens across Home Assistant restarts when cached AWS IoT credentials expire. - Clear only stale AWS credential cache metadata to allow for refreshing credentials without requiring reauthentication. - Bump version in manifest.json to v1.0.26b2.
Enhance AWS credential management
- Added entry for version v1.0.26b3 in CHANGELOG.md. - Fixed vacuum pause control to send the power-off command for active robots instead of only when docked. - Bumped version in manifest.json to v1.0.26b3. - Added tests to verify vacuum pause functionality for active and docked states.
Update changelog and fix vacuum pause behavior
- Updated CHANGELOG.md for version v1.0.26b3 with new config entry handling and removal of deprecated connection class usage. - Refactored async_unload_entry and async_remove_entry methods to improve config entry management and ensure proper unloading of platforms. - Adjusted DomainFlowHandler and DomainOptionsFlowHandler to eliminate deprecated connection class references and streamline options flow handling.
Add French translation (fr.json)
Update changelog and refactor MyDolphin Plus integration
- Updated fr.json to include new configuration steps and error messages in French. - Enhanced user experience with detailed descriptions for account setup and reauthentication processes. - Updated CHANGELOG.md to reflect the addition of French translation support.
…mp and update CHANGELOG.md accordingly.
Prepare for next beta version
…Maytronics integration, covering setup, startup, ongoing calls, error recovery, and entity actions. This update enhances user guidance and clarifies integration processes with detailed diagrams and flow descriptions.
- Updated tables in overview, OTP setup, startup, ongoing calls, error recovery, and entity actions sections for better readability. - Enhanced formatting for endpoints, parameters, and status values to ensure uniformity across documents. - Improved overall structure and presentation of information to facilitate user understanding of the Maytronics integration processes.
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.