Create object
Parameters | ||
---|---|---|
siteId | - |
when the `type` value is `light`
Headers | |
---|---|
Content-Type | application/json |
Accept | application/json |
Authorization | Bearer `Your Access Token` |
{
"id": "575eb822-26ab-4318-b611-afe0703d419f",
"roomId": "f9efe159-54ae-4dc7-88e9-fa6a3e64d5d8",
"type": "light",
"capabilities": [],
"name": "Light #1"
}
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"enum": [
"light",
"switch",
"motionSensor",
"doorSensor"
]
},
"roomId": {
"type": "string"
},
"materials": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"amount": {
"type": "string"
}
}
}
]
}
},
"bleScanner": {
"type": "boolean"
},
"attachedResources": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string"
}
]
}
},
"capabilities": {
"type": "array",
"items": {
"anyOf": [
{
"const": "dimmable"
}
]
}
}
},
"required": [
"type",
"roomId"
]
}
when the `type` value is `motionSensor`
Headers | |
---|---|
Content-Type | application/json |
Accept | application/json |
Authorization | Bearer `Your Access Token` |
{
"id":"514f6aaa-842b-4cf7-8980-140384127fbf",
"roomId":"f9efe159-54ae-4dc7-88e9-fa6a3e64d5d8",
"type":"motionSensor",
"name":"",
"configuration": {
"motion": {
"action":"lightOn",
"roomId":"f9efe159-54ae-4dc7-88e9-fa6a3e64d5d8"
},
"absence": {
"action":"lightOff",
"roomId":"f9efe159-54ae-4dc7-88e9-fa6a3e64d5d8",
"offDelay":1800000
},
},
}
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"enum": [
"light",
"switch",
"motionSensor",
"doorSensor"
]
},
"roomId": {
"type": "string"
},
"materials": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"amount": {
"type": "string"
}
}
}
]
}
},
"bleScanner": {
"type": "boolean"
},
"attachedResources": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string"
}
]
}
},
"configuration": {
"type": "object",
"properties": {
"motion": {
"type": "object",
"properties": {
"action": {
"enum": [
"lightOn",
"lightOff",
"sceneOn"
]
},
"objectIds": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string"
}
]
}
},
"roomId": {
"type": "string"
},
"spaceId": {
"type": "string"
},
"sceneId": {
"type": "string"
}
},
"required": [
"action"
]
},
"absence": {
"type": "object",
"properties": {
"action": {
"enum": [
"lightOn",
"lightOff",
"sceneOn"
]
},
"offDelay": {
"type": "number"
},
"objectIds": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string"
}
]
}
},
"roomId": {
"type": "string"
},
"spaceId": {
"type": "string"
},
"sceneId": {
"type": "string"
}
}
}
},
"required": [
"motion",
"absence"
]
}
},
"required": [
"type",
"roomId"
]
}
when the `type` value is `doorSensor`
Headers | |
---|---|
Content-Type | application/json |
Accept | application/json |
Authorization | Bearer `Your Access Token` |
{
"id":"3c5617df-46c0-48fb-84db-356195aeb351",
"roomId":"f9efe159-54ae-4dc7-88e9-fa6a3e64d5d8",
"type":"doorSensor",
"name":"",
"configuration": {
"open": {
"action":"lightOn",
"roomId":"f9efe159-54ae-4dc7-88e9-fa6a3e64d5d8"
},
"close": {
"action":"lightOff",
"objectIds":[]
},
},
}
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"enum": [
"light",
"switch",
"motionSensor",
"doorSensor"
]
},
"roomId": {
"type": "string"
},
"materials": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"amount": {
"type": "string"
}
}
}
]
}
},
"bleScanner": {
"type": "boolean"
},
"attachedResources": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string"
}
]
}
},
"configuration": {
"type": "object",
"properties": {
"open": {
"type": "object",
"properties": {
"action": {
"enum": [
"lightOn",
"lightOff"
]
},
"objectIds": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string"
}
]
}
},
"roomId": {
"type": "string"
},
"spaceId": {
"type": "string"
}
},
"required": [
"action"
]
},
"close": {
"type": "object",
"properties": {
"action": {
"enum": [
"lightOn",
"lightOff"
]
},
"objectIds": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string"
}
]
}
},
"roomId": {
"type": "string"
},
"spaceId": {
"type": "string"
}
}
}
},
"required": [
"open",
"close"
]
}
},
"required": [
"type",
"roomId"
]
}
when the `type` value is `switch`
Headers | |
---|---|
Content-Type | application/json |
Accept | application/json |
Authorization | Bearer `Your Access Token` |
{
"id":"74714fb6-3910-41ab-b746-305c1159f6cf",
"roomId":"f9efe159-54ae-4dc7-88e9-fa6a3e64d5d8",
"type":"switch",
"variant":"1-key",
"name":"",
"configuration": {
"left": {
"action":"lightPushDim",
"objectIds":[]
},
"double": {},
"right": {
"action":"lightPushDim",
"roomId":"f9efe159-54ae-4dc7-88e9-fa6a3e64d5d8"
},
},
}
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"enum": [
"light",
"switch",
"motionSensor",
"doorSensor"
]
},
"roomId": {
"type": "string"
},
"materials": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"amount": {
"type": "string"
}
}
}
]
}
},
"bleScanner": {
"type": "boolean"
},
"attachedResources": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string"
}
]
}
},
"variant": {
"enum": [
"1-key",
"2-key"
]
},
"configuration": {
"type": "object",
"properties": {
"left": {
"type": "object",
"properties": {
"action": {
"enum": [
"lightPushDim",
"lightOnOff"
]
},
"objectIds": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string"
}
]
}
},
"roomId": {
"type": "string"
},
"spaceId": {
"type": "string"
},
"top": {
"type": "object",
"properties": {
"action": {
"enum": [
"lightSet",
"sceneOn"
]
},
"spaceId": {
"type": "string"
},
"roomId": {
"type": "string"
},
"state": {
"type": "object",
"properties": {
"on": {
"type": "boolean"
},
"bri": {
"type": "number"
}
}
},
"sceneId": {
"type": "string"
}
}
},
"bottom": {
"type": "object",
"properties": {
"action": {
"enum": [
"lightSet",
"sceneOn"
]
},
"spaceId": {
"type": "string"
},
"roomId": {
"type": "string"
},
"state": {
"type": "object",
"properties": {
"on": {
"type": "boolean"
},
"bri": {
"type": "number"
}
}
},
"sceneId": {
"type": "string"
}
}
}
},
"required": [
"top",
"bottom"
]
},
"double": {
"type": "object",
"properties": {
"action": {
"enum": [
"lightPushDim",
"lightOnOff"
]
},
"objectIds": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string"
}
]
}
},
"roomId": {
"type": "string"
},
"spaceId": {
"type": "string"
},
"top": {
"type": "object",
"properties": {
"action": {
"enum": [
"lightSet",
"sceneOn"
]
},
"spaceId": {
"type": "string"
},
"roomId": {
"type": "string"
},
"state": {
"type": "object",
"properties": {
"on": {
"type": "boolean"
},
"bri": {
"type": "number"
}
}
},
"sceneId": {
"type": "string"
}
}
},
"bottom": {
"type": "object",
"properties": {
"action": {
"enum": [
"lightSet",
"sceneOn"
]
},
"spaceId": {
"type": "string"
},
"roomId": {
"type": "string"
},
"state": {
"type": "object",
"properties": {
"on": {
"type": "boolean"
},
"bri": {
"type": "number"
}
}
},
"sceneId": {
"type": "string"
}
}
}
},
"required": [
"top",
"bottom"
]
},
"right": {
"type": "object",
"properties": {
"action": {
"enum": [
"lightPushDim",
"lightOnOff"
]
},
"objectIds": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string"
}
]
}
},
"roomId": {
"type": "string"
},
"spaceId": {
"type": "string"
},
"top": {
"type": "object",
"properties": {
"action": {
"enum": [
"lightSet",
"sceneOn"
]
},
"spaceId": {
"type": "string"
},
"roomId": {
"type": "string"
},
"state": {
"type": "object",
"properties": {
"on": {
"type": "boolean"
},
"bri": {
"type": "number"
}
}
},
"sceneId": {
"type": "string"
}
}
},
"bottom": {
"type": "object",
"properties": {
"action": {
"enum": [
"lightSet",
"sceneOn"
]
},
"spaceId": {
"type": "string"
},
"roomId": {
"type": "string"
},
"state": {
"type": "object",
"properties": {
"on": {
"type": "boolean"
},
"bri": {
"type": "number"
}
}
},
"sceneId": {
"type": "string"
}
}
}
},
"required": [
"top",
"bottom"
]
}
},
"required": [
"left",
"double",
"right"
]
}
},
"required": [
"type",
"roomId",
"variant",
"configuration"
]
}