IoT Hub: the default TTN/TTI converter takes decoded_payload as it is, with the model from tbVersionIds and attributes listed in the integration metadata
The key is removed whenever the decoded payload has it, and it names a model only when it is an object, so
tbVersionIds: null or a list gives the same telemetry in JS and TBEL. The test of a tbVersionIds that is not an
object covers a text, null and a list. The test of the renamed profile lists temperature, which is in the history
record and in the latest values, so it fails if a listed key leaves a history record.
attributes.<brand_id>-<model_id> in the integration metadata (comma-separated, written by the device package's
INTEGRATION step, like profile.*) lists the keys of decoded_payload that are device information and settings: they
become attributes, the rest stays telemetry. No list, everything stays telemetry. The model comes from version_ids,
else from tbVersionIds, which now also gives the brandId and modelId attributes, as version_ids does through the
integration. Tests: the listed keys of a formatter device, the list of a Repository device by its model with a renamed
profile (history records stay telemetry), the list of another model changes nothing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Lansitec devices are decoded by our payload formatter in The Things Stack (Custom Javascript formatter on the end device),
so the Lansitec block leaves the TBEL and JS converters, with its test and uplinks. A device that is not in the LoRaWAN
Device Repository has no version_ids: its formatter can add tbVersionIds { brand_id, model_id } to decoded_payload, the
converter takes the profile <brand_id>-<model_id> from it (or the name in the integration metadata), and drops the field
from the telemetry. version_ids come first.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- TBEL Instant Report of the contact tracing badge: (count + 1) / 2 as an int, so an even count gets timeOffset
- SocketSync UUID: prefix ...AD4657 for tails 0x00-0x1E (Plug Bluetooth Gateway 1.5, Table 7)
- beacons in the order of their numbers, gaps included (Container Tracker 5.7 Offline Cache)
- time1..time8 of the container Offline Cache without the codec's 8 hours, as gnssTime1..
- badge tracker Heartbeat without the SNR field (before firmware 0x0501) decided by the length
- helmet pressure / 10 (Helmet Tracker 6.3, unit 0.1 Pa)
- gateway firmware V1.08 from VER, as in Bluetooth Gateway 4.4.2
- shared helpers for the charge state, Register, Heartbeat and Acknowledgment; one MODES/BANDS table
- the test keeps the default TTN/TTI converters under 30000 characters; 4 more uplinks in the fixture
Brings PR #16534 (typed LoRaWAN uplink converters keep string identifiers
as strings) ahead of its merge into lts-4.4.
Conflicts resolved:
- DedicatedConverterUtil: the metadata telemetry still joins the script's
array element at the uplink ts, and now records the no-cast keys too;
the decoder's keys are collected before the metadata is added and are
cast as before.
- ThingsStackConverterUnwrapper: keeps "channel" and the 64-bit keys.
Proto3 JSON writes 64-bit integers as strings, so The Things Stack sends
uplink_message.settings.frequency (TxSettings.frequency, uint64) as
"868100000". The unwrapper parses the mapped 64-bit integer fields back
to numbers, so frequency stays a number while identifiers stay strings.
PROD-9057
Co-Authored-By: Claude <noreply@anthropic.com>
"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>
Values that the network server sends as JSON strings and that the typed
converter adds from the unwrapped event (devAddr, eui, joinEui, netId,
hardwareVersion, ...) skip the numeric type cast, so devAddr "01020304"
stays "01020304". Numbers from the event (fCnt, rssi, snr, ...) and the
decoder output are cast as before.
JsonConverter gets convertToTelemetryProto/convertToAttributesProto
overloads with a set of no-cast keys; the existing methods do not change.
PROD-9057
Co-Authored-By: Claude <noreply@anthropic.com>
Nashorn passes the payload as characters, so decoding it again as UTF-8 failed on a
unit like ℃ and the uplink was lost. Tested with simulated TTN uplinks of the
Lansitec datasheet examples, TBEL and JS give the same values.
The Lansitec codecs wrap everything in bytes, give numbers as strings with units and
get some fields wrong. The default converter unwraps them, names the keys as the
Lansitec datasheets do, decodes the wrong fields from the raw bytes, and writes the
Register message as attributes. The JS default reads the payload as UTF-8.
- 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.