Repository navigation
Conversation
- Add SyncCacheQuery/SyncCacheResponse MQTT protocol for cache sync - Implement FabBackend::syncCache() method for server communication - Add AuthProvider::syncCacheFromServer() and clearCache() methods - Create periodic task for automatic cache synchronization (30min interval) - Support up to 200 authorized cards in synchronized cache - Maintain backwards compatibility with existing circular cache - Memory usage: +112 bytes RAM, +2.4KB Flash (well within limits) The cache now synchronizes with the server every 30 minutes when online, ensuring offline authentication remains current with server-side changes. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Firmware size changes for esp32-devboardCommit CURRENT e6d782e vs REFERENCE 1ed3348 |
Firmware size changes for hardware-rev0-it_ITCommit CURRENT e6d782e vs REFERENCE 1ed3348 |
Merged
5 tasks done
This branch has not been deployed
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.
Summary
Implements automatic RFID cache synchronization between ESP32 boards and the backend server to ensure offline authentication remains current with server-side changes.
Key Features
synccacheMQTT action for requesting authorized card listTechnical Implementation
MQTT Protocol Extension
{"action": "synccache"}{"request_ok": true, "cards": [{"uid": "1234ABCD", "level": 1}, ...]}New Components
MQTTtypes.hppConfiguration
Memory Analysis
Behavior
taskSyncCache()executesBackend Server Requirements
Test Results
Files Changed
conf/conf.hpp: Added sync configuration constantsinclude/MQTTtypes.hpp: Added SyncCacheQuery/Response classessrc/MQTTtypes.cpp: Implemented payload generation and JSON parsinginclude/FabBackend.hpp: Added syncCache() method declarationsrc/FabBackend.cpp: Implemented syncCache() methodinclude/AuthProvider.hpp: Added cache sync method declarationssrc/AuthProvider.cpp: Implemented syncCacheFromServer() and clearCache()include/BoardLogic.hpp: Added syncRfidCache() methodsrc/BoardLogic.cpp: Implemented syncRfidCache() methodsrc/main.cpp: Added periodic sync task🤖 Generated with Claude Code