-
Notifications
You must be signed in to change notification settings - Fork 0
API Notes
Nils Griswold-Steiner edited this page Mar 20, 2018
·
1 revision
Requires a mapping from devices to clients, i.e. map[deviceId]*Client
.
- isAuthed
- permissions
- subsriptions
{
"subsription": "string",
"operation": "ADD/REMOVE/UPDATE"
}
Make sure to update the front-end before doing server logic (to avoid situations where the front-end hasn't been setup to handle temp/alarm updates for a specific device). But then the server would have to remove the new device if something goes wrong.
- deviceId
- deviceId
Allow for nil
values
- temp
- deviceId
- temp
- time
Many of these should send updates to certain WebSockets
For creating users
For managing a user's devices.
Get all devices (for setup).
- Adding a device to a user.
- Requires a WebSocket push to
/user/device
subscribers.
- Delete a device.
- Requires a WebSocket push to
/user/device
subscribers.
- For adding devices to the database.
- For updating the name in the database.
{
"name": "string"
}
- Allow for
nil
values. - Requires a WebSocket push to
/device/alarm
subscribers.
- deviceId
This endpoint gets all history for a single device
- Requires a WebSocket push to
/device/history
subscribers.