Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CS Integration: Configuring Gateway Profiles #23

Open
lthiery opened this issue Jul 28, 2021 · 0 comments
Open

CS Integration: Configuring Gateway Profiles #23

lthiery opened this issue Jul 28, 2021 · 0 comments

Comments

@lthiery
Copy link
Contributor

lthiery commented Jul 28, 2021

We want to load an env variable (eg: REGION_CONFIG = #{ "IN865" => {"networkServerID", "organizationID"}) and get existing gateway profiles:

GET /api/gateway-profiles

{
  "result": [
    {
      "createdAt": "2021-07-28T14:42:01.239Z",
      "id": "string",
      "name": "string",
      "networkServerID": "string",
      "networkServerName": "string",
      "updatedAt": "2021-07-28T14:42:01.239Z"
    }
  ],
  "totalCount": "string"
}

If we get a hit, we need to store the "id" as GatewayProfileId for later.

If we do not get a match for the REGION_CONFIG (eg: "name" does not match "IN865" and network server does not match "networkServerID"), we want to create the gateway profile using the following endpoint:

POST /api/gateway-profiles

Expected Response

{
  "id": "string"
}

Parameters

{
  "gatewayProfile": {
    "channels": [
      0
    ],
    "extraChannels": [
      {
        "bandwidth": 0,
        "bitrate": 0,
        "frequency": 0,
        "modulation": "LORA",
        "spreadingFactors": [
          0
        ]
      }
    ],
    "id": "string",
    "name": "string",
    "networkServerID": "string"
  }
}

We will want to be capable of posting all Helium profiles in the future (I believe these may be written as chain-vars soon?), but right now, we can hard-code the IN865 entry:

                      'IN865' => [865.0625, 865.4025, 865.985],

We should set the "name" to IN865 and so our POST looks like this:

{
  "gatewayProfile": {
    "channels": [
      865062500, 865402500, 865985000
    ],
    "extraChannels": [],
    "id": random?,
    "name": "IN865",
    "networkServerID":  "networkServerID_from_env"
  }
}

We will need to store the response.id as GatewayProfileId for later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant