milesight-em300th-api
v2025.8.28-1
Published
Milesight EM300TH API is an internal tool accessible on backend. The API allows retrieval of all the list of available EM300TH devices as well as setting the device uplink interval
Downloads
58
Readme
Milesight EM300TH Api
Description
The Milesight EM300TH API is an internal tool exclusively accessible to our backend team. It serves as a command hub for the Milesight EM300TH temperature+humidity sensor using lorawan downlink commands.
Requirements
- RabbitMQ 3.9.11
- Node 20.15.0
Installation
$ npm installConfiguration
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_EM300TH_API_PORT
- configurable host port and has a default of
9062
- configurable host port and has a default of
AMQP_HOST
- rabbitmq host
AMQP_USERNAME
- rabbitmq user
AMQP_PASSWORD
- rabbitmq password
AMQP_PORT
- rabbitmq port
Running the app
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prodTest
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:covREST API
Get lorawan em300th list
GET em300th/milesightmaxResult(optional) range from 1-255 (default is 25)
nextToken(optional) token for the succeeding page/request
Set device interval for the em300th
POST em300th/milesight/interval
Body: {
deviceEui: string;
serialNumber?: string;
interval: number;
}deviceEui(required) device eui of the milesight em300th
serialNumber(optional) serial number of the milesight em300th
interval(required) interval value in seconds
