- A pooled AI channel compares the profile limits carried by the token instead of the raw token, so a new client address no longer retires and reopens a user's channels; tests cover retiring an idle stale channel, finishing a running call on one, and keeping the channel when only the address changes.
- AI transport failures answer with their status: 401/403 for a refused handshake, 503 when the service is unavailable, 504 when it does not answer in time. The user-facing messages are shared constants. A generic 503 outside AI keeps error code 2.
- The solution creator chat checks the tenant profile limit "AI chat requests" like the assistant chat.
- The AI Assistant badge and Home no longer count the solution that is open on screen; Home sorts solutions by their last update.
- The unsaved New chat draft is kept when a prompt is composed into the chat and comes back on returning to New chat.
- Cleanup: the native and JPQL alarm severity ranks both derive from AlarmSeverity, the approval card's unchanged fields use one template, escapeHtml lives in core utils, the AI chat breakpoints are named in one place, and an unused handshake token getter and a rule for a control TB does not have are removed.
* Fixed the description of the Integration Executor queue partitions setting
The comment above queue.integration.partitions in thingsboard.yml and tb-integration-executor.yml was a copy of the hash function comment. Replaced it with a description of what the setting controls.
* Simplified the Integration Executor queue partitions setting description for operators
* fix(notifications): set mutable-content on iOS push notifications
The mobile app's iOS notification service extension draws the icon
configured in the notification template and attaches it to the push.
iOS runs the extension only when the APNs payload carries
mutable-content: 1, so pushes received while the app was in the
background or closed were shown without the icon.
* chore: update the license header of DefaultFirebaseService
Inline review: legacy ai_solution_creator menu id maps to ai_assistant, quick
web link ids use guid(), white labeling and report templates no longer reload
over unsaved edits, the solution chat stop state clears when a run ends, the
tour skips stops whose target never appears, the hand-over clock runs only
while waiting and outside the zone, ai-theme no longer leaks into component
stylesheets, SSE heartbeats are ignored, unknown alarm-update actions fall back
to "other", the panel margin follows the panel actually being present, and
ALARM_RULE reviews get their label.
Bundle: the docked panel and the AI Assistant page load lazily; AiModule is
split into core, composer and chat modules; the CLI guide moved next to its page.
Translations: no sentences assembled in code, plural forms, entity words as
keys, wording fixes, unused and stale keys removed, help lists recipient params.
Maintainability: one isAiAvailable() rule, one '/' shortcut service, OnPush
chat components, shared chat-session helpers, single chat list, shared reload,
toast, count and storage helpers, prefixed generic theme classes, Prism skipped
where the kit highlighter re-renders code, dead code, CSS and assets removed.
License headers restamped and three files curated.
- AI credits limit increase request rolls back its dedupe key on any failure after it is stored, so a failed attempt no longer blocks retries (PR #16848)
- DefaultAiChatServiceTest expects the credit check on createChat (PR #16848)
- startNew uses the credit-checking process(action, user) overload and its test verifies it (PR #16848)
- Unit tests for owner-scoped alarm subscriptions and TbEntityDataSubCtx.onSameEntities (PR #16848)
* UI: Map - load Esri reference layer styles from ArcGIS Online instead of bundling them
The styles are Esri content under the Esri Master License Agreement, which
prohibits redistributing or self-hosting it.
* UI: Map - retry a failed reference layer style load on the next map load and log the error
* UI: Map - remove Esri layers from the default map layers and the built-in Google and HERE API keys
* UI: Map - make the Google and HERE API keys optional with a warning, show the layers without a key without using ours
* UI: Map - add the Esri provider with an optional ArcGIS API key, use the key for the Esri reference layers and the ArcGIS vector basemap styles
* UI: Map - make the legacy Google and HERE API keys optional, show an accurate warning for a missing ArcGIS API key and add the Esri attribution to the raster Esri layers
* Update license headers of the modified map files
* UI: Map - drop the hidden reference layer API key, show the Esri attribution on the reference and legacy Esri layers and describe the missing API key warning to screen readers
* UI: Load Ace modes, snippets and themes on demand
The first editor used to load all 14 modes, 11 snippet files and 2 themes
up front (901 KB, 29 requests). Ace now loads only what an editor uses
through config.setModuleLoader; a JSON editor loads 534 KB in 5 requests.
- Once a module is defined, its loader is removed, so Ace resolves it
synchronously again, as before.
- getAce() accepts modules to preload for editors that read the session
mode synchronously after setMode; js-func preloads javascript and tbel.
- mode-c_cpp and snippets/protobuf are no longer loaded: no editor uses
the C/C++ mode, mode-protobuf bundles its own copy, and the protobuf
mode takes its snippets from snippets/c_cpp.
* UI: Load the SystemJS modules map lazily and cut eager imports of home code
- The SystemJS modules map, which imports most of the application, now
loads only when a widget or rule node loads an extension module. Pages
and dashboards no longer carry it.
- WidgetService, DashboardUtilsService and HomeService no longer import
the widget config component, the dashboard component models and the
router tabs component, which kept them in the login bundle:
the basic config base class is passed to
registerBasicWidgetConfigComponents, the gridster limits moved to
shared dashboard models (re-exported from the old place), and router
tabs are detected by a flag instead of instanceof.
- BlobEntitiesComponent reads the header actions panel from the widget
context instead of injecting WidgetComponent. That import closed the
only NgModule import cycle (SharedHomeComponentsModule ->
WidgetComponentsModule), which crashed startup with "Cannot read
properties of undefined (reading 'ngModule')" when the module init
order changed.
* UI: Take dashboard screenshots with modern-screenshot, loaded on demand
The dashboard image dialog used html2canvas, which is no longer
maintained. It shifted and cropped the captured area and failed on
dashboards that use the CSS color() function (charts, gauges, maps).
- modern-screenshot (MIT, no dependencies, 10 KB gzip instead of 44 KB)
renders the dashboard through the browser itself, so the thumbnail
matches the page. It loads only when a screenshot is taken.
- The whole dashboard is captured and the selected area is cut out of
the canvas; the development notice is still stamped before the image
is serialised.
- Elements marked with data-html2canvas-ignore are still left out, and
videos with no source are skipped, since the capture would wait for
them forever.
* UI: Import entity type models directly in entity chips instead of the shared public API barrel
The barrel re-exports report-component.models, which imports the time series
chart models and with them echarts and zrender. Any eager import path to
entity chips would pull ~1.7 MB of chart code into the startup bundle, as
happened in PE through the AI audit log dialog.
DeviceInstalledItemDescriptor.getUsedExistingEntities reads usedExistingEntityIds, or the install state of an install that has none. Update, delete and the delete dialog call it; the static helpers in DevicePackageEntities and both services are gone.
Installs made before 4.4.1 record the entities the user chose to use as they were only in their install state. The delete and the delete dialog read only usedExistingEntityIds, which those installs don't have, so they deleted the entities; update already fell back to the install state, as the 4.2 and 4.3 lines do. One implementation in DevicePackageEntities now serves update, delete and the dialog.
* Renamed the Tuya integration credential fields to Access ID and Access Secret, as in the Tuya Developer Platform
* Removed unused Access Key length translations
---------
Co-authored-by: Vladyslav_Prykhodko <vprykhodko@thingsboard.io>
The attributes updated notification is built from the saved typed entries,
so it marks the string entries that would read back as numbers in
typeCastDisabledKeys. Copy to entity view and the device profile parse it
with JsonConverter.attributesFromMsg and get the values the device has.
* IoT Hub device packages: the update service becomes DevicePackageService, ready to install too
* IoT Hub device packages: an install saves its entities and the installed item in one transaction
* IoT Hub device packages: an install keeps only entities the user chose, and its errors read for install too
* IoT Hub device packages: an install from a customer or a device group puts its device and dashboard there, in the same transaction
* IoT Hub device packages: an install never moves an overwritten device to another owner
* IoT Hub device install: the wizard checks every step first, asks about all conflicts at once and installs in one request
* IoT Hub device install: an overwritten device takes the package's credentials, a cancelled check installs nothing, one install is one request
* IoT Hub device install: no second check or install from the step header, Retry checks the package again, messages and comments fit install and update
* IoT Hub device packages: install and update share one plan, review and result path, with neutral names
* IoT Hub device install: the plan looks like the update review, with a footer to confirm warnings and no jump to Verify
* IoT Hub device install: the rows after an install say Created, Used existing, Overwritten or Created copy
* IoT Hub device install: no overwrite of a device or gateway, Use existing keeps the step attributes, Try again asks again about the failed choice
- At install a name conflict on a device or gateway offers only Use existing; the
server rejects an install that overwrites one. An overwrite keeps the device's
credentials, which are applied only to a created device.
- Use existing at install writes the step's server and shared attributes after
commit, as the browser install did.
- Try again at install keeps the conflict choices except the one of the failed step.
- The provisioning step label is translated; ca_ES and ar_AE get the install texts.
- Tests check that the audit log, the Hub install report and the attributes run
after commit.
* IoT Hub device packages: a test pins that an overwrite keeps the device's credentials
* IoT Hub device install dialog: cleanup after review
* IoT Hub device install: the conflict check resolves names from the plan, an install overwrite sends the version
- The pre-check resolves each step's template with the names the plan gives the
entities of earlier steps (alias -> name, in step order), not with outputs left
from a failed attempt, so a dashboard titled ${device.name} is checked under the
device's planned name and the first check and Try again agree. Placeholders known
only after the install, e.g. ${device.id}, stay. An update still resolves with the
installed entities. The request sent to the server is unchanged.
- The pre-check keeps the version of the entity it found (rule chain, dashboard,
converter, integration), and an install overwrite sends it as expectedVersion, so
the server rejects an entity changed between the check and the install.
- The conflict message names the existing entity, as a step's name can differ from it.
- The duplicate-key comment says the check runs before the plan is sent, and the
server checks too.
* IoT Hub device install: a device profile overwrite sends the profile's version
The names lookup has no version, so the pre-check reads the matched profile once and keeps its version for expectedVersion.
* IoT Hub device install: a device overwrite sends the device's version
The device lookup of the pre-check now keeps the version, as the other lookups do, and the state key comment says the duplicate check runs before the plan is sent.
* IoT Hub device install: pass the preview outputs instead of swapping entityOutputs
preCheckTemplates passes its preview outputs to resolveTemplateJson instead of temporarily replacing entityOutputs. Drops duplicated comments and redundant optional chaining in templateNameOf.
---------
Co-authored-by: Viacheslav Klimov <vklimov@thingsboard.io>
Co-authored-by: Vladyslav_Prykhodko <vprykhodko@thingsboard.io>
Nodes call JsonConverter.attributesFromMsg / telemetryFromMsg / sortedTelemetryFromMsg,
which read the type-cast-disabled keys from the message metadata. The key-set overloads
become private. NoCastKeys is renamed to TypeCastDisabledKeys, and the related metadata
key, UplinkData, DedicatedUplinkData and proto fields to *TypeCastDisabledKeys, matching
JsonConverter's isTypeCastEnabled.
The platform guessed the kept strings from the values (STRING_V that
parses as a number). The guess was wrong for a decoder decimal with more
than 16 fraction digits, which the proto parser keeps as a string: it was
saved as a number before and became a string.
The typed converter already has the exact sets. UplinkData now carries
telemetryNoCastKeys / attributesNoCastKeys, and DeviceUplinkDataProto /
AssetUplinkDataProto get them as new repeated fields 8 and 9, so embedded,
remote and executor integrations pass them on. The platform and the
integration executor put them into the "noCastKeys" metadata as given. An
older remote integration sends none and is parsed as before.
NoCastKeys.fromKvList is removed.
PROD-9057
Typed LoRaWAN converters keep identifiers the network server sends as
strings (devAddr, eui, joinEui, hardwareVersion, ...) as strings, but they
were still saved as numbers: the platform turns the converter output back
into JSON for the rule engine, and the save nodes parse that JSON again
with type cast on, so joinEui "0000000000000000" became 0 and
hardwareVersion "1.0" became 1.0.
When the platform builds the rule engine message from an integration
uplink (device and asset paths, and the integration executor), it now
puts the keys whose string values look like numbers into the metadata
key "noCastKeys" as a JSON array. The converter already cast every other
numeric-looking string, so these are exactly the strings it kept. The
save attributes, save time series, calculated fields, copy attributes to
entity view and device profile nodes leave those keys uncast. Messages
without the key are parsed as before.
JsonConverter gets convertToAttributes/convertToTelemetry/
convertToSortedTelemetry overloads with a set of no-cast keys; the
existing methods do not change. NoCastKeys in common/proto writes and
reads the metadata key.
PROD-9057
* Serve pre-compressed UI files from the monolith again
Spring Boot 2.4 renamed spring.resources.chain.* to spring.web.resources.chain.*,
and Spring Boot 2.6 stopped binding the old keys. Since ThingsBoard 3.4 the
monolith has silently ignored compressed: "true" and served every UI file
uncompressed, although ui-ngx still builds the .gz copies.
Use the current keys. The content version strategy is dropped rather than
renamed: if enabled it rewrites url() references inside CSS files, which the
UI never relied on (esbuild already hashes the file names).
* Mention brotli copies in the resource chain description
It was the last class of the CE code to use @PostConstruct and @PreDestroy of javax.annotation-api, which is licensed CDDL-1.0 or GPL-2.0 with the Classpath exception. Spring handles the jakarta.annotation ones the same way, as in the rest of the code.
The fork was adopted for the frequency and presence penalties of the Google GenAI models, which upstream 1.16.1 has. Of the fork's remaining changes, the modules ThingsBoard uses carry only three: AiServices features and an HTTP PATCH method that ThingsBoard does not reach, and a second setter for the content of Mistral AI messages. That setter conflicts with the one upstream added for the same purpose, so Jackson rejects every Mistral AI chat response with "Conflicting setter definitions for property content". Upstream parses both plain and reasoning responses.