- The registration sends replaceInstalledItemId in the URL: HttpParams.set()
returned a plain HttpParams, which dropped ignoreLoading/ignoreErrors, so a
failed registration showed a toast next to the wizard's own error.
- The stepper header cannot go back while the installed version's entities
are being removed, like the Back button.
- A version from the Hub without its item is reported as such instead of a
NullPointerException.
- The wizard registers the entities it keeps from the moment they exist; the
second collection of the same ids before each registration is gone.
- The tests verify TbDeviceService.delete through the Device overload, as
4.4 and PE also have one for a DeviceId, so the test is the same file
everywhere.
- The registration sends replaceInstalledItemId in the URL: HttpParams.set()
returned a plain HttpParams, which dropped ignoreLoading/ignoreErrors, so a
failed registration showed a toast next to the wizard's own error.
- The stepper header cannot go back while the installed version's entities
are being removed, like the Back button.
- A version from the Hub without its item is reported as such instead of a
NullPointerException.
- The wizard registers the entities it keeps from the moment they exist; the
second collection of the same ids before each registration is gone.
- The tests verify TbDeviceService.delete through the Device overload, as
4.4 and PE also have one for a DeviceId, so the test is the same file
everywhere.
Review of the device package update:
- The update endpoint refuses device packages instead of removing them, so a
client that reads it as an update no longer reports success with nothing
installed.
- The wizard removes only the entities of the installed version
(installedItems/{id}/device/removeEntities, checked against the new version
first), right before it creates the new ones. The installed item keeps its
version until the wizard registers the new one on the same item
(device/register?replaceInstalledItemId), so closing the wizard never leaves
an item that claims a version that is not installed.
- Every registration (one per group of entity steps, and each Retry) updates
that one item and keeps tracking the entities it already tracks. A package
with several groups no longer gets an installed item per group.
- A failed registration is shown with Retry instead of being swallowed, and
no longer rolls the entities back; the step is done only once registered.
- The forms and the connection method start from what the user entered for
the installed version, when the value fits the new field.
- An entity of another tenant is never deleted for a package.
Review of the device package update:
- The update endpoint refuses device packages instead of removing them, so a
client that reads it as an update no longer reports success with nothing
installed.
- The wizard removes only the entities of the installed version
(installedItems/{id}/device/removeEntities, checked against the new version
first), right before it creates the new ones. The installed item keeps its
version until the wizard registers the new one on the same item
(device/register?replaceInstalledItemId), so closing the wizard never leaves
an item that claims a version that is not installed.
- Every registration (one per group of entity steps, and each Retry) updates
that one item and keeps tracking the entities it already tracks. A package
with several groups no longer gets an installed item per group.
- A failed registration is shown with Retry instead of being swallowed, and
no longer rolls the entities back; the step is done only once registered.
- The forms and the connection method start from what the user entered for
the installed version, when the value fits the new field.
- An entity of another tenant is never deleted for a package.
Updating an installed device package removed every entity it created and
installed nothing again, while the installed item showed the new version.
The update dialog now warns that the package is installed again and opens
the install wizard of the new version. The wizard removes the installed
version with its entities only when it starts creating the new entities,
so closing it earlier keeps the package as it was. The server removes the
installed item together with its entities, and the wizard registers the
new version when it is done. The entity-modified check is skipped for
device packages: their checksum was never computed, so it asked on every
update.
Updating an installed device package removed every entity it created and
installed nothing again, while the installed item showed the new version.
The update dialog now warns that the package is installed again and opens
the install wizard of the new version. The wizard removes the installed
version with its entities only when it starts creating the new entities,
so closing it earlier keeps the package as it was. The server removes the
installed item together with its entities, and the wizard registers the
new version when it is done. The entity-modified check is skipped for
device packages: their checksum was never computed, so it asked on every
update.
"New converter available" in Installed items opens "Update the converter?" instead of
the version update wizard. The dialog names the converter and, from the update check,
either warns that someone changed it (with a download of the current one) or lists the
other installed packages that use it. Update sends only the converter step, built from
ThingsBoard's default converter now, through the device package update.
An update to the installed version itself keeps the install state of the steps and forms
it leaves out, so the integration and its metadata stay as they are.
The wizard's error message, text-with-link and JSON download helpers move to
iot-hub-utils, and the installed device packages loader to iot-hub-default-converter,
for both to use.
Co-Authored-By: Claude <noreply@anthropic.com>
A device package's install state records, per INTEGRATION step, the metadata entries the step added to the integration (e.g. profile.milesight-iot-am308 -> the chosen profile name), both at install (UI) and on update (server). When the package is deleted and its integration is kept, because other installed packages use it or the package took it as it was, those entries are removed from the integration's configuration.metadata. Entries another installed package also recorded stay, and the integration is not saved when none of the package's entries is present. The integration checksum already leaves metadata out, so the remaining packages don't see the integration as changed.
Co-Authored-By: Claude <noreply@anthropic.com>
- UPLINK_CONVERTER step with "default": true and no template: the wizard builds the converter ThingsBoard creates for a new integration of the method's type (INTEGRATION_TTN: TTN) from the UI assets, and installs, overwrites and updates it like a template of the package.
- Installed items: a device package whose default converter differs from ThingsBoard's default converter now shows "New converter available". It opens the update of the installed version, which brings the converter to the default one. A package that took another package's converter overwrites it with the shared-entity warning.
- After an update overwrites an entity, the other packages that recorded its checksum record the new one.
- INTEGRATION step "metadata": its entries are added to the integration's metadata at create, overwrite, use existing and update; the entries the integration has stay. An entry that maps a name to itself (profile.<name>: <name>) isn't added. The checksum of an integration leaves out its metadata.
- The default TTN and TTI converters take the profile name from the integration metadata entry profile.<brand_id>-<model_id> when there is one.
- Form field "resettable": a field the user changed shows a button that puts its default value back.
Versioned cache writes (ts latest, attributes, versioned entity caches) took
a connection to the slot owner from the Jedis slot map and ran EVALSHA on it
directly, bypassing the Jedis cluster command executor. Only that executor
renews the slot map on MOVED or connection errors, so after a failover or a
node address change every later write to the moved slots failed until the
JVM restarted. A failed ts latest cache write fails saveLatest, so the
subscription update was never published and WebSocket clients got nothing.
- Send versioned puts through the cluster client: it follows MOVED/ASK and
renews the slot map itself.
- WATCH/MULTI and evictByPrefix still need a connection to one node: on a
connection or redirect error, renew the slot map and retry once.
- Build the JedisCluster in TbJedisClusterConnectionFactory, so the slot map
can be renewed on demand and is refreshed in the background
(redis.cluster.topology-refresh-period-sec, default 30 s, 0 disables).
- A transaction that queues EVALSHA fails with NOSCRIPT on a freshly promoted
replica. Load the script on that node and report the transaction as not
applied, instead of failing the read that filled the cache.
- Log saveLatest/removeLatest failures at WARN, at most once per 30 s. They
were logged only with TRACE enabled.
RedisClusterTopologyChangeTest covers a failover (old master alive, MOVED)
and a stopped master (old address gone) on a Valkey cluster; both fail on
the previous code.
- Integrations and converters need the INTEGRATIONS feature, as through their API
- An overwritten or created entity gets its step's attributes, as at install
- The checksum ignores debug settings and the default profile flag
- The installed item is locked during the update; a plan of another installed version is refused
- The integration check before save is shared with IntegrationController
- Without a checksum: dashboard image links and rule chain server fields don't count as changes;
with nothing to compare against, the entity counts as changed
- Renamed steps keep their form values, entity and check state
- An entity referring to an entity the update creates again is overwritten
- Instructions before the Update step resolve the installed entities
- The download link of a changed entity is one translation key
The wizard no longer saves the entities itself and reverts them from
snapshots on a failure. It plans the update and the server applies it.
- POST /api/iot-hub/installedItems/{id}/deviceUpdate takes the entity of
each step, resolved from the new version's template, and saves all of
them with the new version of the installed item in one transaction.
Any failure rolls everything back. The audit log, version control and
attributes are written after commit.
- The server checks the plan: only the package's entities or confirmed
conflicts are overwritten, the device and its credentials never change,
and an entity changed since the check fails the update (version).
- GET .../deviceUpdate/check reports for each entity whether it still
exists, is shared with other packages, or was changed since install,
by a checksum the server keeps in the install state at install and on
update. Packages installed before keep the comparison with the template.
- An entity changed since install is overwritten only after a warning,
with a link to download its current version. A shared one shows the
shared warning.
- Only texts changed: the version is recorded without the wizard.
- Try again checks the update again. Errors show validation messages and
a common message for anything else.