-
Notifications
You must be signed in to change notification settings - Fork 0
Accessories
Alexis Leon edited this page Jul 15, 2017
·
1 revision
Accessories allow you to trigger actions on electronic components connected to your board or use with OEM accessories such as Belkin's WeMo, Phillips Hue Lights and many more.
Property | Type | Description | Required |
---|---|---|---|
name | string |
Accessory name | required |
description | string |
Accessory description | optional |
accessory | object |
[[Accessory | Accessory]] props |
component | object |
Accessory component | required |
To use with electronic components, you must configure accessory[category]
and set the component props in Accessory[component]
. See Supported Components
To use accessories you create an Accessory
object.
Definition
POST http://localhost:8080/accessories
Example Request
curl http://localhost:8080/accessories \
-d name="Lights" \
-d description="Living room lights" \
-d accessory[category]="LIGHTBULB", \
-d component[type]="relay" \
-d component[pin]= 10
Example Response
{
"_id": "5955dca65104904e7e2a70c8"
"name": "Lights",
"description": "Living room lights",
"accessory": {
"category": "LIGHTBULB",
},
"component": {
"type": "relay",
"pin": "10",
},
}