iot-sim
Representational simulation of IoT devices.
About
This project creates simulated IoT devices and facilities. Realistic data is generated based on the type of device and time of day. IoT telemetry data can be handled by a custom user defined function.
Devices
- Energy Device
- Tank Device
- Wind Device
Device API
/** * Device * * @constructor * @param * @param * @param * @param * @param * @param */
Facility API
/** * Facility * * Models the composition of IoT objects into a single IoT "Facility" * * @constructor * @param * @param * @param * @param */
Usage
// Facility 1 // Tank Monitoring Deviceconst tank_iot_01 = dsn: "tank_iot_01" type: "tank" profile: null log: false handler: consolelog; // Wind Monitoring Deviceconst wind_iot_01 = dsn: "wind_iot_01" type: "wind" profile: "profile1" log: false handler: consolelog; // Energy Monitoring Deviceconst energy_iot_01 = dsn: "energy_iot_01" type: "energy" profile: "profile1" log: false handler: consolelog; const facility_01 = name: "facility_01" devices: energy_iot_01 wind_iot_01 tank_iot_01 geolocation: lat: 510447 lon: 1140719 frequency: 10000 ; facility_01;facility_01;
Output data
data: watts: '171.189' timestamp: 1586550588454 id: 'a855447a-b488-475b-bb2c-be80cabba8ca' _id: 'a855447a-b488-475b-bb2c-be80cabba8ca' dsn: 'energy_iot_01' geolocation: lat: 510447 lon: 1140719 facility: 'facility_01' type: 'energy' data: mph: '20.995' direction: 'S' timestamp: 1586550588459 id: '6042d595-b93f-4ff8-884a-38d860fa73c4' _id: '6042d595-b93f-4ff8-884a-38d860fa73c4' dsn: 'wind_iot_01' geolocation: lat: 510447 lon: 1140719 facility: 'facility_01' type: 'wind' data: liters: '98.404' pH: '6.079' timestamp: 1586550588460 id: 'd2befdfa-b2d9-4b9a-8970-523c486346b1' _id: 'd2befdfa-b2d9-4b9a-8970-523c486346b1' dsn: 'tank_iot_01' geolocation: lat: 510447 lon: 1140719 facility: 'facility_01' type: 'tank'
Author
- Andrew Moss - Creator - agmoss