Coder Social home page Coder Social logo

menagerie's Introduction

menagerie

Menagerie is a prototype of a Device Management System for IoT devices.

With Menagerie you keep an inventory of your (hardware) devices, as well as help you in keeping track of their location and status over time as well as having a centralized repository for their configurations.

It can be used with it's companion iOs scanner application to simplify the workflow by scanning the QR that Menagerie generates for Locations and Devices.

Documentation

You can read the documentation for Menagerie here

menagerie's People

Contributors

goliatone avatar jkachmar avatar

Watchers

 avatar  avatar

Forkers

jscottmorse

menagerie's Issues

Missing images in DOCUMENTATION.md

The images location-device-map-place.png and location-device-map-placed.png do not exist in the repository; these images are broken in the documentation as a result.

DeviceType: create slug field

If we are using DeviceType name to find on autoregister endpoint, we should create slug. Or, we should remove typeName from URL.

Device: Review status enum values

We should review status enum values.

Currently we have:

  • unknown
  • not_inuse
  • inuse
  • online
  • offline
  • unavailable
  • operative

Status should reflect the different states at which we can find a device.

Provisioning process and labeling

Think about provisioning process and how to tie to labels. If you are using a 3rd party service to generate labels, then want to know the UUIDs beforehand.

One way to go about it would be to batch create instances using a predefined assetTag or alias.

Alias might work best in cases where you have your devices uniquely named so then we can update a record. i.e. we have to query DB by either UUID or name.

Differentiate between Device and DeviceType

A DeviceType is a general entity that describes duh... a device type. I.E.; Arduino, Raspberry Pi, NodeMCU, CHIP, etc.

A Device is a concrete instance of a device type. I.E.; wee-1, wee-2, etc.

To reflect this, we should move the manufacturer and model attributes from Device to DeviceType.

Device: add aliasLabel attribute

In the Device model, the alias attribute can hold a different value based on the device type, i.e. an RPi has a unique serial number, an ESP8266 has a chip id. aliasLabel should capture the name of the alias.

Device: uuid needs to be unique

Fix Device.uuid definition.
Currently:

uuid: {
    type: 'string',
    // primaryKey: true,
    required: true
},

Needs to be:

uuid: {
    uuidv4: true,        
    unique: true,
    index: true,
    defaultsTo: function(){ return BaseModel._uuidGenerator().toUpperCase();},
    required: true
},

Also, we need to figure out #19 and see if we can make it the primary key.

Implement session store

We are currently using MemoryStore to handle sessions.

Warning: connect.session() MemoryStore is not
designed for a production environment, as it will leak
memory, and will not scale past a single process.

Entity finder endpoint

Make endpoint to retrieve information related to a UUID:

  • GET /thing/find/:uuid => ThingController.find

api/controllers/ThingController.js:

find: function(req, res){

}

It should return either a location, or a device instance. Basically anything that has a QR label associated to it and could be found in the wild.

Device auto registration

Implement endpoint for devices to auto-register.

  • Provide endpoint
  • First time, if device instance not present create one. Device Type should already exists.
  • If payload provides UUID and device exists:
    • update status to online by deafault
    • if status provided, use that value

Endpoint:

  • POST /devices/register/{deviceType}
{
    "uuid":"C00A59EA-D031-4BDC-8B2F-B77FA3BF975F",
    "name": "wee-5",
    "metadata": {
        "wlan0": "10.31.200.172"
    }
}

Service should return any configuration that we have for such device instance:

{
    "configuration":{
        "interval": 5000,
        "endpoint": "http://gateway.io/big-data/sensors",
        "keyid": "ABA0908543POADIFADSF"
    }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.