Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Device auto registration #15

Open
goliatone opened this issue Feb 16, 2016 · 2 comments
Open

Device auto registration #15

goliatone opened this issue Feb 16, 2016 · 2 comments
Assignees

Comments

@goliatone
Copy link
Owner

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"
    }
}
@goliatone goliatone self-assigned this Feb 16, 2016
@goliatone
Copy link
Owner Author

Devices should register their status on boot as "booted" and then provide an endpoint to which we can schedule a health_check job that will update the status to either "online" or "offline".

The health check should be in a separated process, independent of menagerie.

The health check should only need a device's uuid and a way to update the DDBB directly to update instance status.

@goliatone
Copy link
Owner Author

Above all, we want a consistent way to id devices. Some devices already have a form of unique identification, say RPi serial number or ESP8266 chip id. It would be more logical to use that as an identifier. We should be able to specify what attribute we use in order to figure out if we do an update vs a create- currently we assume uuid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant