With its own element at the uplink ts, a metadata key also returned by the script
overwrote the script's value. The metadata keys now go into the script's element at
that ts, only where the script has no value, as for an object result. Without such an
element they keep their own element at the uplink ts.
The metadata telemetry keys went into a separate array element without ts, so they
were saved at the server time, while the script's own values were saved at the
uplink time. The element now takes ts from the metadata, the same ts the script reads
and the one an object result already uses for these keys.
A new TTN or TTI integration now starts with the converter the IoT Hub LoRaWAN
packages install. A device registered from the LoRaWAN Device Repository gets the
profile <brand_id>-<model_id> and its decoded values as telemetry, with a Milesight-style
history list kept at each record's time. Any other device gets the LoRaWAN Device
profile and its raw payload as data. The device is named by its end device ID and
added to a group named after the application.
The TBEL and JS defaults are the same script. ConverterControllerTest runs both through
the real default v2 configuration for TTN and TTI, so ui-ngx now also copies that
configuration to the classpath.
Add the X-TB-Version header once in TbAiChannelPool, the single place a channel to TB AI is opened, instead of in OnPremiseTbAiTokenProvider only. Installs using LocalTbAiTokenProvider now send it too.
Updating an installed device package deleted everything the package created,
the device included, so its telemetry and attributes were lost, and nothing
was installed again.
Now the update opens the install wizard of the new version over the installed
package. It keeps the install method and the form values, finds the entities
by the ids in the install state (so a renamed profile is still found), keeps
the device and gateway as they are (id, credentials, history) and overwrites
the device profile, converters, integration, dashboard and rule chain with the
new templates under their current names. The installed item then takes the
new version through registerDeviceUpdate. The server no longer updates a
device package by itself.
PROD-9096
- The device install form shows placeholders, templated defaults, an
Advanced section and a ThingsBoard connection section with the MQTT host
and port, cleans pasted values, shows errors after the user leaves a field
and does not let the browser autofill ThingsBoard credentials.
- A field marked by the package checks the integration connection.
- The TTN and TTI install methods are named The Things Stack Sandbox and
The Things Stack Cloud.
- The TTN converter metadata includes the coding rate and the gateway channel.
- Deleting or updating a device package keeps the integrations, converters
and other entities that another installed device package uses, and the
delete dialog names them before the user confirms.
- The Open button of an installed item names what it opens.
- New /api/ai/resources endpoints (config, upload, download, delete) proxy file uploads to TB AI over the channel.
- Solution Creator messages go through a new JSON endpoint /api/ai/solution/{id}/{step}/messages carrying the attached
resource ids; the plain-text chat endpoint stays unchanged.
- The chat composer gets a + button, drag and drop onto the chat, paste of screenshots, image downscaling before
upload, previews with upload progress and remove, and a toolbar layout below the text; sent messages show image
thumbnails with a preview dialog and file chips that download the file.
Integration executors loaded the rule engine queues only at startup and never
evicted the cached tenant routing info. After a tenant switched to or from an
isolated rule engine they kept pushing its uplinks to the old queue until restart.
- send queue update/delete notifications to integration executors
(new repeated fields 2 and 3 in ToIntegrationExecutorNotificationMsg)
- apply them in DefaultClusterIntegrationService
- evict tenant routing info on TENANT / TENANT_PROFILE events, after the
tenant profile caches (new PartitionService.evictTenantProfileInfo)
The bean condition also required sql.ttl.api_keys.ttl to be greater than
zero, but that property is not defined in thingsboard.yml and defaulted to
zero, so the bean was never created and expired API key rows were never
removed.
ApiKeysCleanUpService does not read a retention value: it deletes keys whose
expiration time has already passed. Drop the unused property from the
condition and gate the bean on sql.ttl.api_keys.enabled alone.
Note that cleanup is now active by default on upgrade, since
sql.ttl.api_keys.enabled defaults to true. Expired API keys are already
rejected during authentication, so this only removes the stale rows.
security.api_key.value_bytes_size referenced SECURITY_API_KEY_VALUE_PREFIX,
the same variable as value_prefix. SECURITY_API_KEY_VALUE_BYTES_SIZE had no
effect, and setting a custom prefix made value_bytes_size resolve to a
non-numeric value, which fails int conversion of the @Value injection in
ApiKeyServiceImpl and breaks application startup.