Browse Source

Upload files to ''

master
cse47242 4 years ago
parent
commit
6dfcc849cb
  1. 26
      README.md

26
README.md

@ -35,11 +35,15 @@ node index.js
Open browser to Open browser to
http://localhost:8086 http://localhost:8888
or if it does not work find the IP from net tools (ifconfig), usually some form of 172.0.... or if it does not work find the IP from net tools (ifconfig), usually some form of 172.0....
and use Chronograf UI to visualize generated data. and use Chronograf UI to visualize generated data.
In Chronograf go to the influx DB Admin tab and create a database named "dummy-data" so that the data created by the fake devices have a database to be stored
after creating the database just go to the "explore" tab and select the type of data you want to see and from which device they derive from (for example select the "airforce" data type and select the device id you want to track, lastly select "value" on the right for the data to be displayed)
## Usage ## Usage
const FakeDeviceManager = require('./src/fake-device-manager') const FakeDeviceManager = require('./src/fake-device-manager')
@ -48,14 +52,15 @@ and use Chronograf UI to visualize generated data.
const connection = FakeDeviceConnection() const connection = FakeDeviceConnection()
const deviceManager = FakeDeviceManager({ const deviceManager = FakeDeviceManager({
deviceCount: 100, deviceCount: 10,
metricsInterval: 30, metricsInterval: 30000,
connection: FakeDeviceConnection, connection: FakeDeviceConnection,
onUpdateStats: updateStats, onUpdateStats: updateStats,
measurements: { measurements: {
usage: {type: 'integer', min: 0, max: 100}, temperature: {type: 'integer', min: -20, max: 60},
voltage: {type: 'integer', min: 0, max: 15}, air_humidity: {type: 'integer', min: 20, max: 100},
temperature: {type: 'integer', min: -20, max: 60} ground_humidity: {type: 'integer', min: 20, max: 100},
airforce: {type: 'integer', min: 0, max: 10}
} }
}) })
deviceManager.start() deviceManager.start()
@ -105,12 +110,3 @@ Methods
* `stop`: Stop all spawned instances * `stop`: Stop all spawned instances
* `send`: Send data to data store * `send`: Send data to data store
* `getData`: Get data buffer * `getData`: Get data buffer
## Todos
- Write Todo list :)
License
----
MIT

Loading…
Cancel
Save