# @carnegietech/ct-gateway-management

> Gateway Management service

Latest version **1.0.0** (published 2020-01-27) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @carnegietech/ct-gateway-management
pnpm add @carnegietech/ct-gateway-management
yarn add @carnegietech/ct-gateway-management
bun add @carnegietech/ct-gateway-management
```

Provides the command `ct-gateway-management`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2020-01-27 |
| First published | 2020-01-27 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | 12.x |
| Dependencies | 3 |
| Unpacked size | 24.9 KB |
| Known vulnerabilities | 0 (+5 in 1 direct dependencies) |
| Install scripts | no |
| Author | Carnegie Technologies |
| Maintainers | robert-ostensen, ahamstra-ctech, severnt, pravalanicholas |

## Links

- npm: https://www.npmjs.com/package/@carnegietech/ct-gateway-management
- npm.io page: https://npm.io/package/@carnegietech/ct-gateway-management

## Dependencies (3)

- [amqplib](https://npm.io/package/amqplib.md) ^0.5.5
- [convict](https://npm.io/package/convict.md) ^4.0.0
- [express](https://npm.io/package/express.md) ^4.15.2

## Recent versions

- 1.0.0 (latest) — 2020-01-27

## README

# Gateway Management Service

This service is used to provide configuration information for Carnegie Technologies' LoRa gateways.

The gateway requires this LoRa configuration information to function correctly and pass LoRa payloads
to/from the cloud. Please note that gateways also require additional on-device configuration to connect
to a cloud RabbitMQ and talk to this service.

This service listens for messages sent over RabbitMQ on the 'gw' exchange and responds with
Gateway Config messages when the gateway sends either a configuration get request or a status update.

The response messages are configurable via environment varirables.

## Usage

### Install from npm

With npm

```sh
npm install -g @carnegietech/ct-gateway-management
```

or with yarn

```sh
yarn global add @carnegietech/ct-gateway-management
```

After installing, ct-gateway-management can be run with

```sh
AMQP_URI=amqp://user:pass@localhost \
  GW_EUI=1234abcd56ef7890 \
  LORA_RF_PLAN=1 \
  LORA_REGION=US902 \
  LORA_CHANNEL_PLAN_ID=1 \
  ct-gateway-management
```

### Compile it yourself

Clone the repo and run

```sh
yarn install
yarn compile
```

After compiling, ct-gateway-management can be run with

```sh
yarn serve
```

## Configuration - Environment variables

* `AMQP_URI`: URI to access the RabbitMQ server e.g. amqp://user:pass@localhost

### Configuration of the Response
* `GW_EUI`: The EUI of the gateway e.g. 1234abcd56ef7890
* `LORA_RF_PLAN`: The LoRa RF plan to use. A number from 1-8, or use 0 to reject all requests
* `LORA_REGION`: Default value specifying the region the gateway is operating in e.g. US902
* `LORA_CHANNEL_PLAN_ID`: Default value specifying an ID for which set of channels to use. Use values 1 - 5

---
_Source: https://npm.io/package/@carnegietech/ct-gateway-management · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
