-
-
Notifications
You must be signed in to change notification settings - Fork 49
603 feature request location ingestion via mqtt #664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
603 feature request location ingestion via mqtt #664
Conversation
- Added Mosquitto MQTT container for testing purposes
- Introduced `DynamicMqttProvider` service to handle dynamic MQTT connections - Added `MqttIntegration` and `PayloadType` to configure client settings - Implemented `MqttPayloadProcessor` interface for payload processing - Integrated HiveMQ MQTT client dependencies
- Added `UserJdbcService` for managing users in MQTT configuration - Updated `DynamicMqttProvider` to support user-specific connections - Implemented `testConnection` method for verifying MQTT connectivity - Improved client connection handling and introduced QoS settings - Added `MqttIntegrationJdbcService` for database interactions - Created OwnTracks payload processor for handling location data - Added database migration script for `mqtt_integrations` table
…ository pattern with: 1. A method to find an MQTT integration by user 2. A save method that handles both create and update scenarios 3. Separate create and update methods 4. A row mapper to convert database rows to domain objects 5. Optimistic locking using a version field The code handles nullable timestamps, uses prepared statements for safe parameter insertion, and follows the existing code style. Would you like me to elaborate on any part of the implementation?
- Added `createdAt`, `updatedAt`, `lastUsed`, and `version` fields to `MqttIntegration` - Updated database operations to handle new fields - Replaced manual test user creation with `TestingService.randomUser` in tests - Fixed incorrect RabbitMQ container import in `TestContainerConfiguration`
…ient ID generation
…grations - Deleted `MqttIntegrationSettingsController` in favor of consolidating logic in `IntegrationsSettingsController` - Added support for saving and testing MQTT integrations in `IntegrationsSettingsController` - Refactored `MqttIntegration` with builder-like methods for easier updates - Simplified redirection and flash messaging for better user feedback - Improved CSS styling for read-only input elements
…troller - Updated `IntegrationsSettingsController` to use consistent parameter names prefixed with `mqtt_` - Adjusted HTML form inputs in `integrations.html` to align with updated parameter naming - Replaced `autocomplete="off"` with `autocomplete="new-password"` for better security practices
- Added detailed logging for MQTT client connection, subscription, and errors in `DynamicMqttProvider` - Refactored `remove` method to use `User` object instead of `userId` - Updated `IntegrationsSettingsController` to dynamically register or remove MQTT clients based on integration status
- Updated log level from `debug` to `info` in `DynamicMqttProvider` for client connection messages
- Log username when disconnecting MQTT client in `DynamicMqttProvider`
- Add `OwnTracksProcessor` to handle and process location messages - Integrate `LocationBatchingService` to queue validated location points - Add JSON parsing and validation for OwnTracks payloads - Improve MQTT disconnection log message in `DynamicMqttProvider`
…tor and method calls
…ngestion - Add `DynamicMqttProviderIntegrationTest` for comprehensive MQTT location processing validation - Add `mosquitto-no-auth.conf` configuration for Mosquitto MQTT test container - Enhance `DynamicMqttProvider` with `MqttStatus` enum for connection state tracking - Update test container to load Mosquitto configuration file
|
Does this also support MQTT over TLS (usually on port 8883)? I run my MQTT broker publicly and only allow encrypted TLS connections. |
I assume that the used library supports this out of the box. But I will test this before dping the release. |
|
Thanks for testing it. Let me add it |
|
MQTT connection test successful 🥳 Thanks! Will do some more tests in the coming days. |
|
Just for the record: I used MQTT ingestion the past few days, and I can report that it works perfectly well! |
Thank you for the feedback |

No description provided.