Even with the messages being handled async (tokio::spawn(...)), during
high throughput or a burst of messages, the channel might still fill up
causing messages to be discarded without any error being printed.
This makes it possible to use a range of JoinEUIs per Join Server.
Use-cases are either Join Servers using a JoinEUI range or the
configuration of a "catch-all" Join Server prefix ("0000000000000000/0").
This improves the log output on the following points:
In case when .context(...) is used, the error printed in the logs would
only show the outer error. This has been improved to show the complete
chain of errors.
In many cases error! and warn! logs were used for logging related to
user input. This is very inconvenient when using log output for
monitoring as it can trigger alerts based on end-user mistakes. While
refactoring the logs, the following criteria has been used:
* error = Messages that need attention and that are within the domain
of the ChirpStack administrator.
* warn = Messages that should stand out of the other log messages, but
that might be end-user (or end-device) related. Depending on if you
have control of the full chain or not, you might or might not want to
be alerted based on these messages.
Tracing spans have been improved to make it easier to correlate between
log messages and events.
Note that the integration events will contain the application +
device-profile + device tags. Integration events will NOT contain the
tenant tags. Most likely tenant tags will be used to store information
about the tenant, data that is unrelated to the integration events.
Fixes#211.
Using sub-queries, the amount of potentially selected records is
reduced. As well the joins on api_key.tenant_id causes (or might
cause) seq scans, because api_key.tenant_id is nullable.
The gw_time defines the RX time by the gateway, the ns_time defines when
it was received by the NS. The latter could for example help to debug
latency between the GW <> NS.
The JSON encoding should only be used for debugging purposes! However
this change avoids showing errors in case there are unknown fields in the
JSON payload. This would happen when for example the MQTT Forwarder
and ChirpStack uses a different API version (which in case of Protobuf
would be fine, as long as the major version remains the same).
This removes the device lock that is stored in Redis to avoid Class-A
and Class-B / Class-C overlapping. Instead, it consistently sets the
scheduler_run_after timestamp, which indicates if the Class-B /
Class-C scheduler should consider scheduling downlinks for a particular
device.
This also updates the get_with_class_b_c_queue_items function to make
sure that multiple ChirpStack instances can execute the same query at
the same time, without getting the same set of data (as the device
records are locked for update and then updated with a
scheduler_run_after timestamp in the future).
This crate can be used to build external ChirpStack integrations.
The plan is to move all non-HTTP based integrations to external
repositories. The reason is that these integrations usually require
quite some external dependencies as these rely on their own SDKs.
Historically, the tx power was defined as ERP. The Semtech UDP Packet
Forwarder protocol was never explicit if the "powe" field was in ERP or
EIRP. However, as the antenna gain in the Semtech UDP Packet Forwarder
is documented as dBi and is deducted from the "powe" field, this means
that "powe" is in EIRP.
This commit corrects all values to EIRP, to make sure that if the
antenna gain is properly configured (which should be), that the correct
rf_power is used by the gateway.
This can be useful when using multiple NetIDs (e.g. after a merge of two
networks, or when using multiple NetIDs). Previously, any other NetID
than the configured net_id would be considered roaming.
This provides more flexibility to custom ADR algorithm implementations.
E.g. the device variables can be used to store per-device variables that
might overwrite normal ADR logic.
This implements end-to-end encryption between the end-device and
end-application. The encrypted AppSKey or SessionKeyID is forwarded to
the end-application which should be able to decrypt or request the
AppSKey to decrypt the uplink payload. As well the end-application will
be able to enqueue encrypted application payloads.
Using this mechanism, ChirpStack will never have access to the uplink
and downlink application-payloads.