Overview
One client-mode connector, EclipseHawkbit, for the Eclipse hawkBit Management API. hawkBit is an open-source server for rolling out software and firmware updates to devices. Each device is a target (identified by its controller id), each piece of firmware or software is a software module, modules are bundled into a distribution set, and a rollout deploys a set to a filtered group of targets in stages. Use the connector to drive updates from the broker: register a device when it first appears on the UNS, push a firmware set to one machine, watch the action until it finishes, or start a staged rollout to a whole line and pause it if the error rate climbs.
Every request is relative to
/rest/v1. Replies arrive on <topic>/response.
Authentication
hawkBit is self-hosted or run by a vendor. Every event sendsAuthorization: {authorization}, so pass the whole header value:
"Basic <base64(user:password)>"for a hawkBit user. The stock server ships withadmin/adminon tenantDEFAULT; change it before the server is reachable from anywhere else."Bearer <token>"when hawkBit is configured for OAuth 2.0 or OpenID Connect.
HAWKBIT_AUTHORIZATION) and map it in with GET SECRET. Wrong credentials return 401; a user without the right permission gets 403.
Basic Syntax
SetBASE_ADDRESS to your hawkBit server, with no trailing slash. For a local server that is http://localhost:8080, with USE_SSL "false".
MQTT examples
Request bodies go underbody, so control fields like authorization and controller_id are not sent to hawkBit. List events always need a query field; send "" when you have no filter.
Register a device: publish to cloud-iot/eclipse-hawkbit/target/create:
201 with the new target, or 409 if the controller id already exists.
Push firmware to one machine: publish to cloud-iot/eclipse-hawkbit/target-assigned-ds/assign:
assigned, alreadyAssigned and assignedActions with the new action id. Use "type": "soft" to let the device choose when to install.
Follow the update: publish {"authorization": "...", "controller_id": "press-07", "query": "limit=5&sort=id%3ADESC"} to cloud-iot/eclipse-hawkbit/target-action/list, or read one action on cloud-iot/eclipse-hawkbit/target-action/get with action_id. cloud-iot/eclipse-hawkbit/target-installed-ds/get returns 204 until the device reports a finished install.
Find devices with failed updates: publish to cloud-iot/eclipse-hawkbit/target/list with a pre-encoded FIQL filter:
cloud-iot/eclipse-hawkbit/rollout/create, wait until rollout/get shows "status": "ready", then publish {"authorization": "...", "rollout_id": 3} to cloud-iot/eclipse-hawkbit/rollout/start:
rollout/pause and rollout/resume take the same rollout_id; rollout-group/list shows each group’s progress.
Helper actions
Register new machines as they appear and check rollout progress on a timer:409 on the create response just means the machine is already registered. Restrict who can publish to cloud-iot/eclipse-hawkbit/# with a rule: its payloads carry the credentials and can push firmware to devices.
Notes
- Errors come back on the response topic:
400for bad JSON or a bad FIQL filter,401for missing or wrong credentials,403for a missing permission,404for an unknown target, action, set or rollout,405when an action can no longer be cancelled,409for a duplicate id or a rollout in the wrong state,423when a distribution set is locked, and429when a quota is exceeded. querymust be URL-encoded. hawkBit filters use FIQL, for examplecontrollerId==press*orupdateStatus==error.- A distribution set is only deployable once it holds its required modules (
AssignSoftwareModules). Uploading the firmware file itself is a multipart upload and is not covered by this template; do it in the hawkBit UI or with a script. - Devices talk to hawkBit over its separate Direct Device Integration (DDI) API or the Device Management Federation (DMF) API. This template covers the Management API only.
- Rollouts are created asynchronously: start one only after
GetRolloutreportsready, or hawkBit answers409.

