An open API service indexing awesome lists of open source software.

https://github.com/getlarge/node-red-device

Node-red running locally, used as a base to create a device using Aloes Light protocol
https://github.com/getlarge/node-red-device

Last synced: 5 months ago
JSON representation

Node-red running locally, used as a base to create a device using Aloes Light protocol

Awesome Lists containing this project

README

          

# node-red-device

Node-RED project running in local mode, acting as [Aloes-light](https://framagit.org/aloes/aloes-light-handlers) device and served by Express

## Settings

NODE_RED_USERNAME : used for dashboard HTTP basic auth ( optional )
NODE_RED_USERPASS : used for dashboard HTTP basic auth ( optional )
NODE_RED_HTTP_AUTH : false/true, used to activate dashboard HTTP basic auth
NODE_RED_CREDENTIAL_SECRET : used to save node-red flow credentials ( optional )
NODE_RED_SESSION_SECRET : used for express session
NODE_RED_STORE_TYPE : used to select default storage method ( can be "memoryOnly" or "file" )
ALOES_HTTP_HOST : Aloes HTTP server host
ALOES_HTTP_PORT : Aloes HTTP server port
ALOES_HTTP_SECURE : empty or true Aloes HTTP/HTTPS
ALOES_MQTT_HOST : Aloes MQTT / WS server host
ALOES_MQTT_PORT : Aloes MQTT / WS server port
ALOES_MQTT_SECURE : empty or true Aloes MQTT/MQTTS
ALOES_USER_EMAIL : username to log on Node-red admin interface
ALOES_USER_PASSWORD : password to log on Node-red admin interface
DEVICE_DEVEUI : Device EUI used for registration
DEVICE_ID : Device id generated by Aloes
DEVICE_APPKEY : Device API key generated by Aloes
DEVICE_TYPE : Device type used for registration ( optional )
DEVICE_NAME: Device name used for registration
DEVICE_IN_PREFIX=-in
DEVICE_OUT_PREFIX=-out
DEVICE_IN_TOPIC : Used to receive aloes events ${DEVICE_DEVEUI}${DEVICE_IN_PREFIX}/#

## Usage

```
git clone https://github.com/getlarge/node-red-device.git
npm install
npm start
```

When running multiple instances in parallel, you can specify a port:

```
npm start -- -p 1885
```

To run a specific flow file:

```
npm start -- testFlow.json
```

To run via Express ( create .env file first ):

```
npm run start:dev
```

## Starting with PM2

```
npm install -g pm2
```

Edit ecosystem.config.js, then

```
npm run deploy:local
```

If you want autorestart

```
pm2 startup
pm2 save
```