BREAKING CHANGE: Renamed models for consistent naming convention
- mqtt.device → ows.mqtt.device (table: ows_mqtt_device)
- mqtt.session → ows.mqtt.session (table: ows_mqtt_session)
- ows.iot.event unchanged (table: ows_iot_event)
Changes:
- Updated all Many2one/One2many relations to use new model names
- Updated all env references in controllers and tests
- Updated security CSV file with new model IDs
- Updated all view records (list/form/kanban/pivot/graph/search)
- Fixed controller reference that was still using old mqtt.session
Documentation:
- Added README.md for user-facing module documentation
- Regenerated API.md from updated docstrings
- Regenerated index.html from README.md
Cleanup:
- Removed debug/test files (check_routes.py, test-*.sh/txt)
- Removed obsolete python_proto_type directory
Note: This requires database migration or fresh setup.
Database was reset and module reinstalled successfully.
E2E test with Shelly Simulator passed.
- Implement build script (build_docs.py) with AST parser to auto-generate HTML docs from docstrings
- Add comprehensive Google-style docstrings to all controllers and models
- Create static/description/index.html for Odoo Apps UI with module overview
- Generate api_reference.html (20.5 KB) from source code, linked from Odoo UI
- Add DOCUMENTATION_STRATEGY.md with comparison of 5 documentation approaches
- Create API.md with complete REST API documentation
Device Status Monitoring:
- Implement device_status_monitor.py with health checks and offline detection
- Add /status endpoint for device health overview
- Automatic offline detection after message_timeout_s
Config Push Architecture:
- Add POST /config endpoint to IoT Bridge for dynamic device management
- Auto-push device config from Odoo on create/write/unlink
- Implement device_manager.py for runtime device updates
E2E Tests:
- All 6 E2E tests passing (Create, Update, Push, Delete, Restart, Status Monitor)
- Test coverage for device lifecycle and config synchronization
Documentation is auto-generated via: ./build_docs.sh
View in Odoo: Settings → Apps → Open Workshop MQTT → API Reference
Major architectural improvements to make Bridge resilient:
1. Bridge Autonomy (CRITICAL FIX):
- Remove sys.exit(1) when Odoo config fails (iot_bridge/main.py)
- Bridge now runs autonomously with local config.yaml
- No longer crashes in endless restart loop when Odoo is down
- Odoo connection check becomes optional warning, not blocker
2. Event Type Compatibility:
- Add 'session_ended' to controller event processing (iot_api.py)
- Bridge sends 'session_ended', controller expected 'session_stopped'
- Now accepts both event types for closing sessions
3. Event Type Support:
- Add 'session_ended' to iot_event model selection (iot_event.py)
- Fixes 500 errors when Bridge sends session_ended events
4. Architecture Documentation:
- Update FEATURE_REQUEST with new PUSH architecture (Odoo -> Bridge)
- Update IMPLEMENTATION_PLAN with Phase 3 refactoring plan
- Document autonomous mode and config-push design
- Remove obsolete documentation files
Tested Scenarios:
- ✅ Bridge starts and runs without Odoo
- ✅ Session detection works autonomously
- ✅ Events queue when Odoo is down
- ✅ Queue automatically processes when Odoo returns
- ✅ Sessions close correctly with session_ended events
This enables the next phase: Odoo pushing config to Bridge via HTTP API.