Skip to content

Add hawkBit firmware management extension#34

Open
dominiquekleeven wants to merge 19 commits into
mainfrom
feature/hawkbit-extension
Open

Add hawkBit firmware management extension#34
dominiquekleeven wants to merge 19 commits into
mainfrom
feature/hawkbit-extension

Conversation

@dominiquekleeven
Copy link
Copy Markdown

@dominiquekleeven dominiquekleeven commented May 4, 2026

Closes #33


Adds a hawkBit firmware extension that connects OpenRemote Manager to the hawkBit Management API, exposes firmware management endpoints, and syncs selected OpenRemote assets as hawkBit targets.

Core Functionality

  • Registers firmware meta items for marking assets as firmware targets (FIRMWARE_TARGET) and syncing selected attributes as hawkBit metadata (FIRMWARE_METADATA).
    • FIRMWARE_TARGET causes the asset to be synced as a target to hawkBit.
    • FIRMWARE_METADATA causes the attribute and its value to be synced as metadata to the target within hawkBit. This enables hawkBit to use attribute-aware target filters for grouping purposes.
  • Creates, updates, and deletes hawkBit targets in response to OpenRemote asset events.
  • Updates OpenRemote firmware target info attributes with hawkBit controllerId and securityToken.
  • Proxies firmware management endpoints for targets, software modules, distribution sets, target filters, and rollouts.
  • Adds OpenRemote read/write admin authorization and configured-realm access checks around firmware endpoints.
  • Adds artifact upload support for hawkBit software modules. (required a bit of a workaround, but streams the uploaded file to the hawkBit endpoint).

Core Files

  • HawkbitFirmwareService.java: Starts the integration, configures the hawkBit client, registers API resources, and handles asset/attribute sync.
  • HawkbitResponseProxy.java: Copies hawkBit responses back through OpenRemote while preserving status, body, and media type.
  • manager/hawkbit/*Client.java: RESTEasy clients for hawkBit Management API resources.
  • manager/resource/*ResourceImpl.java: OpenRemote API resource implementations that authorize requests and proxy them to hawkBit.
  • model/resource/*Resource.java: Public OpenRemote firmware endpoint definitions and role requirements.
  • FirmwareMetaItemType.java: Defines firmwareTarget and firmwareMetadata meta items.
  • FirmwareModelProvider.java: Registers firmware meta items with the OpenRemote model.
  • README.md: Documents setup, limitations, API coverage, deployment examples, and proxy configuration.

Caveats

  • The integration is currently limited to a single OpenRemote realm configured by HAWKBIT_REALM.
  • This extension is intended to be used with the companion hawkBit/OpenRemote management UI service: https://github.com/openremote/service-hawkbit-ui

Testing

  • Added mock based testing for checking whether asset events / attribute events trigger the appropriate 'client' call, e.g. sync behaviour.
  • Added simple tests for the proxy behaviour.

Notes

  • The large changed file count and addition count is mostly caused by license headers + model interfaces. The actual logic and behaviour is fairly minimal in terms of complexity/LoC.
  • Not all hawkBit management API endpoints are integrated, only those who are deemed necessary to enable basic firmware/OTA management.

@dominiquekleeven dominiquekleeven changed the title Add hawkBit extension (hawkBit firmware management / update server integration) Add hawkBit firmware management extension May 4, 2026
@dominiquekleeven dominiquekleeven self-assigned this May 18, 2026
@dominiquekleeven dominiquekleeven added the Feature Development of new feature label May 18, 2026
@dominiquekleeven dominiquekleeven marked this pull request as ready for review May 18, 2026 15:29
@dominiquekleeven dominiquekleeven requested a review from a team May 18, 2026 15:42
@dominiquekleeven
Copy link
Copy Markdown
Author

Would be nice to get this merged fairly quickly as I want to deploy the extension to staging for a custom project. Happy to go through the additions/changes if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature Development of new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[hawkBit] Add extension for integrating hawkBit firmware management

1 participant