Commit Graph

11 Commits

Author SHA1 Message Date
Josh Finlay b372618cf7 Fixed MQTT commands and frontend event loading
- Fixed MQTT command handling by properly handling async callbacks
- Fixed frontend event loading to preserve loaded events
- Added proper state tracking for initial load
- Fixed useEffect dependencies
2025-01-08 10:34:59 +10:00
Josh Finlay 3e2511f019 Enhanced MQTT logging and fixed event loading in frontend
- Added detailed MQTT message logging
- Added validation for MQTT commands
- Fixed frontend event loading to preserve loaded events
- Added proper handling of new events while viewing history
2025-01-08 10:30:07 +10:00
Josh Finlay c8a48e8e7a fix: event pagination
- Added secondary sort by id DESC for consistent ordering
- Fixed hasMore calculation to use actual events returned
- Only append events in frontend if we got new ones
- Made SQL query more readable
2025-01-08 09:47:01 +10:00
Josh Finlay 3ad694f34b fix: frontend event handling
- Removed unnecessary reverse() since backend returns events in descending order
- Fixed event polling to preserve pagination
- Only update events on first page during polling
- Combined useEffects for better state management
2025-01-08 09:43:15 +10:00
Josh Finlay 9dc65a138f feat: add event cleanup
- Added background task to clean up events older than 3 months
- Added index on timestamp column for faster cleanup
- Fixed success column type in events table
- Updated shutdown handler for new task
2025-01-08 09:38:34 +10:00
Josh Finlay a0533e1d78 fix: database connection handling
- Create new connections for each request instead of reusing one
- Remove global connection pool to fix thread reuse error
- Simplify shutdown handler
2025-01-08 08:36:50 +10:00
Josh Finlay 0277e3d6ec fix: align frontend-backend types and API responses
- Updated Settings interface to use numbers for maxOpenTimeSeconds and triggerDuration
- Fixed triggerGate response type to match backend
- Updated SettingsDialog to handle numeric inputs correctly
2025-01-08 08:32:52 +10:00
Josh Finlay f6ca88f012 feat: Add MQTT and settings event logging, implement event pagination
- Add event logging for MQTT connection states
- Add event logging for settings changes
- Make event list more compact
- Implement pagination for event list with 'Show More' button
2025-01-08 07:46:08 +10:00
Josh Finlay 70f7e4fd84 Add MQTT integration with Home Assistant and update deployment script 2025-01-08 07:39:07 +10:00
Josh Finlay 18389ed0cb UI/UX Improvements and Infrastructure Updates
Frontend Changes:
- Enhanced mobile responsiveness:
  * Reduced top spacing on mobile screens
  * Made the gate control button larger and full-width on mobile
  * Improved text sizing and padding for better readability
- Improved visual design:
  * Enhanced macOS-style glass effect with deeper shadows
  * Added subtle gradient background with brand colors
  * Made backgrounds more translucent with white overlays
  * Added consistent border styling with white/50 opacity
  * Enhanced hover states with smoother transitions
  * Added shadow to the status indicator dot
  * Made the settings modal more translucent
  * Improved button styling consistency

Backend Changes:
- Updated static files path to use relative path ("../public")
- Removed HTTPS/SSL:
  * Changed API endpoint in frontend from HTTPS to HTTP
  * Removed redirect.py as it's no longer needed for HTTPS redirection
  * Simplified deployment by removing SSL-related configurations

Deployment Improvements:
- Fixed deployment script issues:
  * Preserved proper backend directory structure
  * Added proper directory handling for tar files
  * Fixed tar file naming consistency
  * Removed chmod for non-existent redirect.py
  * Added cd command to ensure correct working directory
  * Updated file paths to use absolute paths where needed

Testing:
- Verified mobile UI improvements
- Confirmed HTTP endpoints are working
- Tested gate control functionality
- Validated settings modal operation
2025-01-07 15:33:31 +10:00
Josh Finlay 596fbac864 Initial commit - DLB Gatekeeper project setup 2025-01-06 10:52:30 +10:00