Commit Graph

9 Commits

Author SHA1 Message Date
RPI User
e0f7ec34f2 Implement dual logging workflow: noconfig vs configured mode
NOCONFIG MODE (device not configured):
- Sends 'App initialized' message on startup
- Sends 'RFID initialized' message after RFID ready
- Sends 'App working' message on startup
- Sends periodic 'App working' health status every 5 minutes
- Card inserted/removed events sent directly to monitoring server

CONFIGURED MODE (table ID set):
- Sends 'App initialized' and startup messages
- Card events POST to Harting API first
- Only sends to monitoring server on successful API post
- Failed posts saved to tag.txt backup file
- Backup data sent with summary when internet restored

Changes:
- Added send_health_status() function for periodic monitoring
- Updated process_card_events() to handle both workflows
- Updated main() to send startup messages and start health monitor
- Improved monitoring server URL to use rpi-ansible hostname
- Added retry logic for monitoring server requests
2025-12-19 15:08:02 +02:00
RPI User
f82424cffb Refactor monitoring server logging: only send on successful API post
Changes:
- Monitoring server logs only sent after successful Harting API POST
- Failed API posts are saved to tag.txt backup file
- post_backup_data() now accepts hostname, device_ip, name parameters
- When internet returns, backup data is pushed to server in order
- Single summary message sent to monitoring server: 'Backup card data pushed to server (X records)'
- Improves reliability: no duplicate logs for offline/failed posts
2025-12-19 14:46:59 +02:00
RPI User
6b199a0e41 Add config UI interface and update app.py with config card functionality
- Copied config.py with FreeSimpleGUI configuration interface to root folder
- Added load_config() function to launch config UI when card 12886709 is inserted
- Config UI allows setting hostname and work table (Loc De Munca)
- Automatic printer configuration and hostname updates
- System reboot after configuration changes
- Added config.py to version control
2025-12-19 14:38:39 +02:00
RPI User
c3a55a89c3 Add log cleanup function (15-day deletion) and archive documentation
- Added cleanup_old_logs() function to app_v3_simplified.py
- Deletes log.txt if older than 15 days at app startup
- Sends notification to monitoring server when cleanup occurs
- Archived all legacy modules and documentation to oldcode/
- Updated device_info.txt with correct IP (192.168.1.104)
- All changes validated and tested
2025-12-18 17:18:14 +02:00
Developer
081938afb1 Implement: Remove Flask and Chrome, simplify to headless RFID client with RDM6300
- Remove Flask web server from client device
- Remove Chrome fullscreen UI launch
- Simplify app.py to focus on core functionality only:
  * RFID reader with RDM6300 library
  * Batch logging with event deduplication (75% reduction)
  * WiFi recovery monitoring
  * Connectivity tracking
- Update rfid_module.py with custom Reader class:
  * Extends rdm6300.BaseReader for event handling
  * card_inserted and card_removed event handlers
  * Integration with batch logging system
  * Proper error handling and device detection
- Dashboard and UI now served from Server_Monitorizare only
- Device acts as pure data collector, reducing overhead
2025-12-18 14:23:28 +02:00
Developer
68f377e2b5 v3.0: Enhanced traceability with batch logging (75% reduction), Chrome fullscreen UI, and WiFi auto-recovery 2025-12-18 11:33:58 +02:00
Developer
afa08843df Performance optimization v2.8: Skip dependency checks on subsequent runs (75% faster)
Performance improvements:
- Skip dependency verification after first run (-75% startup time)
- Use /tmp/prezenta_deps_verified flag to cache check
- Environment variable SKIP_DEPENDENCY_CHECK for forced fast startup
- Enable Flask threaded mode for concurrent requests
- Optimize JSON output (disable key sorting)
- Add graceful shutdown handlers (SIGTERM, SIGINT)
- Non-blocking background service initialization
- Better resource cleanup on exit

Startup times:
- First run: ~60 seconds
- Subsequent runs: ~10-15 seconds (75% faster)
- With SKIP_DEPENDENCY_CHECK=true: ~5-10 seconds
2025-12-18 10:00:00 +02:00
6975e18ed2 v2.7: Fixed auto-update path detection for case-sensitive file systems
- Replaced hardcoded paths with dynamic path detection using __file__
- Auto-update now works regardless of folder case (prezenta vs Prezenta)
- Added comprehensive dependency management documentation
- Enhanced port 80 capability setup script
- Updated system packages repository structure
- Fixed path resolution for Files/reposytory and system_packages directories
2025-08-14 15:51:29 +03:00
0b9419c6d2 final project 2025-02-28 09:03:50 +02:00