The Milesight Powermeter API is an internal tool exclusively accessible to our backend team. It serves as a command hub for the Milesight CT10x powermeter using lorawan downlink commands.
- RabbitMQ 3.9.11
- Node 20.15.0
$ npm install
-
AWS_ACCESS_KEY_ID
- AWS Access Key ID
-
AWS_SECRET_ACCESS_KEY
- AWS Secret Key
-
NODE_ENV
- Node environment
-
LOG_LEVEL
- value can be debug, info, error and verbose.
-
MILESIGHT_POWERMETER_API_PORT
- configurable host port and has a default of
9059
- configurable host port and has a default of
-
AMQP_HOST
- rabbitmq host
-
AMQP_USERNAME
- rabbitmq user
-
AMQP_PASSWORD
- rabbitmq password
-
AMQP_PORT
- rabbitmq port
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov
GET powermeter/milesight
maxResult
(optional) range from 1-255 (default is 25)
nextToken
(optional) token for the succeeding page/request
POST powermeter/milesight/reboot
Body: {
deviceEui: string;
serialNumber?: string;
}
deviceEui
(required) device eui of the milesight powermeter
serialNumber
(optional) serial number of the milesight powermeter
POST powermeter/milesight/interval
Body: {
deviceEui: string;
serialNumber?: string;
interval: number;
}
deviceEui
(required) device eui of the milesight powermeter
serialNumber
(optional) serial number of the milesight powermeter
interval
(required) interval value in minutes (1-1440)