github RinDevJunior/matterbridge-roborock-vacuum-plugin 1.1.1-rc15

latest release: 1.1.1-rc16
9 hours ago

Release Notes - v1.1.1-rc15

๐ŸŽ‰ Major Improvements

Architecture Refactoring

This release introduces a comprehensive architectural refactoring that significantly improves code maintainability, testability, and scalability.

New Service Layer

  • AreaManagementService: Centralized room and area management
  • AuthenticationService: Dedicated authentication handling with improved error recovery
  • ClientManager: Unified client connection management
  • MessageRoutingService: Streamlined message routing and command execution
  • ConnectionService: Enhanced connection lifecycle management
  • DeviceManagementService: Centralized device state and operations
  • PollingService: Efficient device status polling
  • ServiceContainer: Dependency injection for better modularity

Domain-Driven Design (DDD)

Introduced domain layer with properly structured entities and value objects:

  • Entities: VacuumDevice, CleaningSession, CleaningRoutine, RoomEntity
  • Value Objects: BatteryStatus, CleaningArea, Coordinates, DeviceIdentifier

Improved Error Handling

  • Structured error hierarchy with specific error types
  • Better error messages and recovery strategies
  • Error classes: AuthenticationError, CommunicationError, ConfigurationError, DeviceError, ValidationError

๐Ÿ› Bug Fixes

Critical Fixes

  • Protocol 4/5 Message Handling โœ…: Fixed timeout issues when fetching room/map information from Roborock devices

    • Root cause: Messages with protocol 4 (general_request) had data stored in key 102, but listener only checked protocol-specific keys
    • Solution: Updated SyncMessageListener to check key 102 first, then fallback to protocol-specific keys
    • Impact: Rooms are now successfully retrieved (Kitchen, Study, Living room, Bedroom, etc.)
  • Cross-Platform Compatibility โœ…: Fixed case-sensitive file name issues causing test failures on Linux CI

    • Corrected service file names: AreaManagementService.ts โ†’ areaManagementService.ts, etc.
    • Ensures consistent builds across macOS (case-insensitive) and Linux (case-sensitive) systems

Code Quality

  • Fixed typos: initalData.ts โ†’ initialData.ts
  • Removed unused variables and imports
  • Improved TypeScript type safety in tests

๐Ÿ”ง Technical Improvements

Communication Layer Enhancements

  • Added protocol-specific serializers: L01Serializer, A01Serializer, B01Serializer, V01Serializer
  • Implemented factory patterns: MessageBodyBuilderFactory, MessageProcessorFactory
  • Enhanced message deserialization with better protocol version handling

Constants & Configuration

  • Extracted magic numbers to dedicated constant files
  • Improved code readability with named constants for battery levels, timeouts, device IDs, etc.

Code Reduction

  • Refactored roborockService.ts: Reduced by 752 lines through proper separation of concerns
  • Consolidated test files: Removed redundant tests, improved test organization
  • Net code improvement: +9,186 lines (including comprehensive tests and documentation)

๐Ÿ“š Documentation

  • Added comprehensive CODE_STRUCTURE.md documenting the new architecture
  • Enhanced inline code documentation
  • Improved test coverage with detailed test scenarios

๐Ÿงช Testing

  • Added 3000+ lines of comprehensive unit tests
  • Test coverage for all new services and error handlers
  • Integration test scenarios for real-world workflows
  • All 846 tests passing โœ…

๐Ÿ”„ Breaking Changes

None - This release maintains backward compatibility while introducing new architectural patterns.

๐Ÿ“ฆ Migration Notes

No migration required. The refactoring is internal and does not affect plugin configuration or behavior.

๐Ÿ™ Acknowledgments

This release represents a significant step forward in code quality and maintainability, setting the foundation for future features and improvements.


Full Changelog: https://github.com/[your-repo]/compare/v1.1.1-rc14...v1.1.1-rc15

Don't miss a new matterbridge-roborock-vacuum-plugin release

NewReleases is sending notifications on new releases.