lorawan-stack icon indicating copy to clipboard operation
lorawan-stack copied to clipboard

Add new event types to application server

Open vlasebian opened this issue 1 year ago • 0 comments

Summary

References #4227 (tti issue).

Changes

Add events that can be associated with event types propagated by webhooks.

Testing

Steps
  1. Have a local instance of the stack up and running with an app and a device
  2. Simulate uplinks for each type of message that triggers a specific event, e.g.
APP=$1
DEV=$2

curl -i "http://localhost:1885/api/v3/as/applications/$APP/devices/$DEV/up/simulate" \
  -H "Authorization: $TTS_AUTH_TOKEN" \
  -d '{
  "downlink_ack": {
    "session_key_id": "string",
    "f_port": 0,
    "f_cnt": 0,
    "frm_payload": "string",
    "decoded_payload": {},
    "decoded_payload_warnings": [
      "string"
    ],
    "confirmed": true,
    "class_b_c": {
      "gateways": [
        {
          "gateway_ids": {
            "gateway_id": "string",
            "eui": "70B3D57ED000ABCD"
          },
          "antenna_index": 0,
          "group_index": 0
        }
      ],
      "absolute_time": "2024-08-27T08:50:56.236Z"
    },
    "priority": "LOWEST",
    "correlation_ids": [
      "string"
    ],
    "confirmed_retry": {
      "attempt": 1,
      "max_attempts": 100
    }
  }
}'
  1. Check the live data tab in the console
Results
Screenshot 2024-08-27 at 15 55 35
Regressions

None.

Notes for Reviewers

None.

Checklist

  • [x] Scope: The referenced issue is addressed, there are no unrelated changes.
  • [x] Compatibility: The changes are backwards compatible with existing API, storage, configuration and CLI, according to the compatibility commitments in README.md for the chosen target branch.
  • [x] Documentation: Relevant documentation is added or updated.
  • [x] Testing: The steps/process to test this feature are clearly explained including testing for regressions.
  • [x] Infrastructure: If infrastructural changes (e.g., new RPC, configuration) are needed, a separate issue is created in the infrastructural repositories.
  • [x] Changelog: Significant features, behavior changes, deprecations and fixes are added to CHANGELOG.md.
  • [x] Commits: Commit messages follow guidelines in CONTRIBUTING.md, there are no fixup commits left.

vlasebian avatar Aug 27 '24 11:08 vlasebian