Commit Graph

241 Commits

Author SHA1 Message Date
Orne Brocaar
fe3d6d3fdf Re-generate API + update code. 2022-12-05 11:46:36 +00:00
Orne Brocaar
abee88712c Make metadata consistent in protobuf messages. 2022-12-05 11:45:58 +00:00
Orne Brocaar
cb3ab9466e Fix notification z-index. 2022-12-05 11:29:44 +00:00
Orne Brocaar
b130953e31 Update API docker files. 2022-12-05 10:44:46 +00:00
Orne Brocaar
d91e687484 Update to latest Rust and Alpine versions. 2022-12-05 10:00:21 +00:00
Orne Brocaar
364a4ac48c Rename to import_legacy_lorawan_devices_repository.
The lorawan-devices repository structure is going to change and the
latest revisions no longer contain a LICENSE file.

This does mean that the latest data can't be imported and we will be
missing newly added devices and potential bugfixes. However, it does
provide time to work on a better solution.

As requested, TTN and The Things Network is no longer used in the
naming and description.

Closes #61.
2022-11-30 10:17:53 +00:00
Orne Brocaar
dda9d3ffac Fix Redis pipelines for Redis Cluster.
redis::pipe() can't be used with the ClusterClient struct, instead we
must use cluster_pipe() to start the pipeline. This implements a wrapper
which constructs the pipeline based on the used Redis setup.
2022-11-30 08:50:49 +00:00
Orne Brocaar
c1c89d06f8 Bump version to 4.1.0-test.1 2022-11-28 15:17:53 +00:00
dependabot[bot]
2428390e32
Bump loader-utils from 2.0.0 to 2.0.4 in /ui (#66)
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 2.0.0 to 2.0.4.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v2.0.4/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v2.0.0...v2.0.4)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-28 12:18:46 +00:00
Orne Brocaar
ec09710b24 Log uplink frames without device match to DevEUI 0000000000000000.
It can be useful to handle uplinks that do not match a DevEUI in a
separate process. This includes DevAddr to DevEUI pointer does not
exist, or DevAddr points to one or multiple DevEUIs, but it does not
pass the MIC check.
2022-11-28 10:59:28 +00:00
Orne Brocaar
963842ef55 Implement api request logging to Redis Streams.
This makes it possible for external services to subscribe (through
Redis) for realtime events. E.g. a create, update or delete device event
could trigger an external synchronization.
2022-11-28 10:59:28 +00:00
Orne Brocaar
84dc8fd333 Bump version to 4.0.5 2022-11-28 10:23:54 +00:00
Orne Brocaar
948ed00b60 Add keep_alive_interval config for MQTT.
In case there is a loadbalancer between ChirpStack and the MQTT broker,
it is useful to have control over the keep-alive messages, to make sure
that the loadbalancer does not drop the connection if there is no
activity. In such a case you want to set the keep_alive_interval to a
lower interval than the loadbalancer timeout.
2022-11-25 12:51:35 +00:00
Orne Brocaar
3a6e359ce1 Fix leafletjs controls floating over header. 2022-11-25 09:22:45 +00:00
Orne Brocaar
e2bdef757c Send ThingsBoard telemetry (f_port, f_cnt, ...) even if object is None. 2022-11-21 09:18:52 +00:00
Orne Brocaar
d98518c5f9 Fix ThingsBoard location and status telemetry. 2022-11-18 11:24:21 +00:00
Orne Brocaar
9fe8ee2474 Fix incorrect splitting of multiple http integration endpoints.
Closes #62.
2022-11-17 13:00:17 +00:00
Orne Brocaar
bfcff17f34 Bump version to 4.0.4 2022-11-15 10:13:35 +00:00
Orne Brocaar
6973e91ade Remove unsetting of device_queue_item.
In case the queue-item does fit the first RX window, but not the second
one, it will be set to None. If this happens, then the
save_downlink_frame step will not add the queue-item ID to the
DownlinkFrame (internal).

Then on txack, ChirpStack is unable to dequeue the payload causing the
payload to stay in the queue.
2022-11-08 15:40:37 +00:00
Orne Brocaar
e2214f9485 Add coding_rate field to LoraDataRate (+ fix 2.4GHz coding-rate).
Per Regional Parameters Specification, the LoRa modulation always uses
coding-rate 4/5, however this is not the case for ISM2400 (which is
currently not covered by the reg. params) in which case coding-rate
4/8LI must be used.

Closes #51.
2022-11-08 15:19:45 +00:00
Orne Brocaar
0ac4ef51e2 Bump version to 4.0.3 2022-11-07 11:40:11 +00:00
Orne Brocaar
6b1cf4f8ba Fix metrics per day interval calculation.
This fixes the issue where after a from DST to non-DST, the timstamp was
not incremented by a full day. As the ts was then truncated to day
precision, this would create a never ending loop.

Example, incrementing 2022-10-30 00:00:00 by days(1) would result in
2022-10-30 23:00:00, trucated to day precision would result in
2022-10-30 00:00:00.

If the date (30) is the same after incrementing by days(1), we increment
by days(2), which in the above example results in 2022-10-31 23:00:00,
truncated to day precision results in 2022-10-31 00:00:00 which is the
desired result.
2022-11-07 11:23:02 +00:00
Orne Brocaar
42d6f62509 Simplify error return. 2022-11-04 14:30:55 +00:00
Orne Brocaar
347ac6fcfa Check if channel is closed. Fix blocking_send error.
In order to properly handle the SendError, we must return the original
error, instead of creating a new anyhow::Error.
2022-11-04 14:29:04 +00:00
Orne Brocaar
0b7ee05c6f Update properties > metadata in gateway API. 2022-11-04 12:03:01 +00:00
Orne Brocaar
a864bd2e5d Add gateway metadata tab and make naming consistent. 2022-11-04 11:51:24 +00:00
Orne Brocaar
8c557da076 Add Go example to read meta-data log. 2022-11-02 16:17:27 +00:00
Orne Brocaar
39a9455972 Add downlink meta-data logging. 2022-11-02 16:15:53 +00:00
Orne Brocaar
0d14bb1ac7 Add uplink meta-data logging. 2022-11-02 14:42:25 +00:00
Orne Brocaar
937f12d4e8 Add Redis config examples for username and password.
Closes #54.
2022-11-02 10:39:42 +00:00
Joseph Grech
ee38c88a7e
Fix java_outer_classname in tenant.proto. (#55) 2022-11-02 10:27:20 +00:00
Orne Brocaar
0a23c71641 Add option for auto-detect measurements.
In case the decoded payload contains random keys the auto-detect
measurements feature will add new measurements for each uplink. With
this option it is possible to turn auto-detection off to avoid
polluting the database with many measurements.

Closes #42.
2022-11-02 10:19:38 +00:00
Orne Brocaar
577a33ec9a Run yarn format. 2022-11-01 10:28:57 +00:00
Orne Brocaar
5b3b44bce4 Fix OIDC logout URL in UI. 2022-11-01 10:28:35 +00:00
Orne Brocaar
d6cc9d4fd6 Bump version to 4.0.3-test.1 2022-10-21 07:37:25 +01:00
Orne Brocaar
289d97f258 Implement dev_addr_prefixes configuration.
This makes it possible to configure one or multiple DevAddr sub-ranges
instead of using the whole DevAddr range provided by the configured
NetID.

Closes #49.
2022-10-19 12:53:34 +01:00
Orne Brocaar
6cc813aed1 Implement DevAddrPrefix type.
This type defines the (NetID derived) prefix that must be used when
generating device addresses. This can be retrieved from the NetID, but
it is also possible to define a prefix that defines a smaller address
range within the NetID.

See also #49.
2022-10-19 12:03:55 +01:00
Orne Brocaar
e04f991e76 Fix 'Cannot serialize NaN as google.protobuf.Value.number_value'.
In case the codec returns a NaN float, this is converted to None to
avoid Protobuf serialization error. This also fixes the eventlog such
that it does not break out of the loop (unless it is a channel error).
Messages that can't be processed will be ignored and an error is
printed.

Fixes https://github.com/chirpstack/chirpstack-v3-to-v4/issues/4.
2022-10-06 12:31:11 +01:00
Orne Brocaar
5f4d03f3e4 Add example for reading frame-logs from Redis Streams. 2022-10-04 15:50:20 +01:00
Orne Brocaar
94455ffe35 Fix typo (:: > :). 2022-10-04 15:50:20 +01:00
John Dyer
601d3f9aa1
Use trust_store instead of ca_path for mqtt integration. (#47) 2022-10-04 15:44:59 +01:00
Orne Brocaar
4282d3aedc Update clap to v4. 2022-10-03 15:11:53 +01:00
Orne Brocaar
a91fb1f73e Bump version to 4.0.2 2022-09-28 13:05:13 +01:00
Orne Brocaar
b19038e664 Update README. 2022-09-28 12:55:48 +01:00
Orne Brocaar
0940260541 Fix client_cert_lifetime value in configfile template. 2022-09-28 12:38:37 +01:00
Orne Brocaar
51b622e8e2 Fix terminating stream loop on client disconnect.
As the spawn_blocking thread is not terminated when the frame_log_future
is dropped, it would keep the Redis connection open. By closing the
redis_rx channel on client-disconnect, we can check if the channel has
been closed inside the spawn_blocking thread, and return if this is the
case.

Closes #40.
2022-09-28 12:25:33 +01:00
Orne Brocaar
ea0f84b93d Bump version to 4.0.1 2022-09-28 09:14:53 +01:00
Orne Brocaar
091e3b0f97 Remove bandwidth * 1000 as it is already in Hz.
This fixes the missing per DR stats in the gateway dashboard.
2022-09-27 15:56:04 +01:00
Orne Brocaar
4d000b92e9 Fix PositionSolution decoding from JSON.
Depending the algorithm type, some fields might or might not be present.
This change updates these fields to Option<T>.
2022-09-27 11:28:35 +01:00
Orne Brocaar
2abc85afa6 Revert "LoRa Cloud: use default if value is not present."
This reverts commit 1867140272.
2022-09-27 11:15:53 +01:00