Commit Graph

1 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