Update json file to new format
This commit is contained in:
@@ -1,53 +0,0 @@
|
||||
// Comments
|
||||
{
|
||||
"controller": [
|
||||
{
|
||||
"model": "get",
|
||||
"endpoint": ["/v1/capabilities"],
|
||||
"ubus": {
|
||||
"path": "domo.capabilities",
|
||||
"method": "get"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "get",
|
||||
"endpoint": ["/v1/capabilities/lights", "/v1/capabilities/lights/:id"],
|
||||
"ubus": {
|
||||
"path": "domo.capabilities.lights",
|
||||
"method": "get"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "get",
|
||||
"endpoint": ["/v1/capabilities/shutters", "/v1/capabilities/shutters/:id"],
|
||||
"ubus": {
|
||||
"path": "domo.capabilities.shutters",
|
||||
"method": "get"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "get",
|
||||
"endpoint": ["/v1/capabilities/sprinklers", "/v1/capabilities/sprinklers/:id"],
|
||||
"ubus": {
|
||||
"path": "domo.capabilities.sprinklers",
|
||||
"method": "get"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "put",
|
||||
"endpoint": ["/v1/capabilities/sprinklers/:id/open"],
|
||||
"ubus": {
|
||||
"path": "domo.capabilities.sprinklers.open",
|
||||
"method": "open"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "put",
|
||||
"endpoint": ["/v1/capabilities/sprinklers/:id/close"],
|
||||
"ubus": {
|
||||
"path": "domo.capabilities.sprinklers.close",
|
||||
"method": "close"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
45
bsp/board/domo/ovl/usr/local/configs/restd/v1-lights.json
Normal file
45
bsp/board/domo/ovl/usr/local/configs/restd/v1-lights.json
Normal file
@@ -0,0 +1,45 @@
|
||||
// Lights
|
||||
{
|
||||
"resources": [
|
||||
{
|
||||
"model": "post",
|
||||
"endpoint": "/v1/lights",
|
||||
"ubus": {
|
||||
"path": "domo.lights",
|
||||
"method": "create"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "get",
|
||||
"endpoint": "/v1/lights",
|
||||
"ubus": {
|
||||
"path": "domo.lights",
|
||||
"method": "list"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "get",
|
||||
"endpoint": "/v1/lights/:id",
|
||||
"ubus": {
|
||||
"path": "domo.lights",
|
||||
"method": "read"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "put",
|
||||
"endpoint": "/v1/lights/:id",
|
||||
"ubus": {
|
||||
"path": "domo.lights",
|
||||
"method": "update"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "delete",
|
||||
"endpoint": "/v1/lights/:id",
|
||||
"ubus": {
|
||||
"path": "domo.lights",
|
||||
"method": "delete"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
45
bsp/board/domo/ovl/usr/local/configs/restd/v1-sequences.json
Normal file
45
bsp/board/domo/ovl/usr/local/configs/restd/v1-sequences.json
Normal file
@@ -0,0 +1,45 @@
|
||||
// Sequences
|
||||
{
|
||||
"resources": [
|
||||
{
|
||||
"model": "post",
|
||||
"endpoint": "/v1/sequences",
|
||||
"ubus": {
|
||||
"path": "domo.sequences",
|
||||
"method": "create"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "get",
|
||||
"endpoint": "/v1/sequences",
|
||||
"ubus": {
|
||||
"path": "domo.sequences",
|
||||
"method": "list"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "get",
|
||||
"endpoint": "/v1/sequences/:id",
|
||||
"ubus": {
|
||||
"path": "domo.sequences",
|
||||
"method": "read"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "put",
|
||||
"endpoint": "/v1/sequences/:id",
|
||||
"ubus": {
|
||||
"path": "domo.sequences",
|
||||
"method": "update"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "delete",
|
||||
"endpoint": "/v1/sequences/:id",
|
||||
"ubus": {
|
||||
"path": "domo.sequences",
|
||||
"method": "delete"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
45
bsp/board/domo/ovl/usr/local/configs/restd/v1-shutters.json
Normal file
45
bsp/board/domo/ovl/usr/local/configs/restd/v1-shutters.json
Normal file
@@ -0,0 +1,45 @@
|
||||
// Shutters
|
||||
{
|
||||
"resources": [
|
||||
{
|
||||
"model": "post",
|
||||
"endpoint": "/v1/shutters",
|
||||
"ubus": {
|
||||
"path": "domo.shutters",
|
||||
"method": "create"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "get",
|
||||
"endpoint": "/v1/shutters",
|
||||
"ubus": {
|
||||
"path": "domo.shutters",
|
||||
"method": "list"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "get",
|
||||
"endpoint": "/v1/shutters/:id",
|
||||
"ubus": {
|
||||
"path": "domo.shutters",
|
||||
"method": "read"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "put",
|
||||
"endpoint": "/v1/shutters/:id",
|
||||
"ubus": {
|
||||
"path": "domo.shutters",
|
||||
"method": "update"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "delete",
|
||||
"endpoint": "/v1/shutters/:id",
|
||||
"ubus": {
|
||||
"path": "domo.shutters",
|
||||
"method": "delete"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
// Sprinklers
|
||||
{
|
||||
"resources": [
|
||||
{
|
||||
"model": "post",
|
||||
"endpoint": "/v1/sprinklers",
|
||||
"ubus": {
|
||||
"path": "domo.sprinklers",
|
||||
"method": "create"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "get",
|
||||
"endpoint": "/v1/sprinklers",
|
||||
"ubus": {
|
||||
"path": "domo.sprinklers",
|
||||
"method": "list"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "get",
|
||||
"endpoint": "/v1/sprinklers/:id",
|
||||
"ubus": {
|
||||
"path": "domo.sprinklers",
|
||||
"method": "read"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "put",
|
||||
"endpoint": "/v1/sprinklers/:id",
|
||||
"ubus": {
|
||||
"path": "domo.sprinklers",
|
||||
"method": "update"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "delete",
|
||||
"endpoint": "/v1/sprinklers/:id",
|
||||
"ubus": {
|
||||
"path": "domo.sprinklers",
|
||||
"method": "delete"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "put",
|
||||
"endpoint": "/v1/sprinklers/:id/open",
|
||||
"ubus": {
|
||||
"path": "domo.sprinklers.open",
|
||||
"method": "open"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "put",
|
||||
"endpoint": "/v1/sprinklers/:id/close",
|
||||
"ubus": {
|
||||
"path": "domo.sprinklers.close",
|
||||
"method": "close"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
13
bsp/board/domo/ovl/usr/local/configs/restd/v1.json
Normal file
13
bsp/board/domo/ovl/usr/local/configs/restd/v1.json
Normal file
@@ -0,0 +1,13 @@
|
||||
// Root
|
||||
{
|
||||
"resources": [
|
||||
{
|
||||
"model": "get",
|
||||
"endpoint": "/v1/device-capabilities",
|
||||
"ubus": {
|
||||
"path": "domo.devices.capabilities",
|
||||
"method": "list"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,7 +1,16 @@
|
||||
{
|
||||
"capabilities":[
|
||||
"lights",
|
||||
"shutters",
|
||||
"sprinklers"
|
||||
"capabilities": [
|
||||
{
|
||||
"name": "lights",
|
||||
"speach_name": "lumière"
|
||||
},
|
||||
{
|
||||
"name": "shutters",
|
||||
"speach_name": "volet"
|
||||
},
|
||||
{
|
||||
"name": "sprinklers",
|
||||
"speach_name": "station"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,74 +1,65 @@
|
||||
{
|
||||
"lights" : {
|
||||
"speach_name": "lumière",
|
||||
"devices": [
|
||||
{
|
||||
"id": 1,
|
||||
"name": "Bureau JB",
|
||||
"speach_name": "bureau",
|
||||
"zone": "",
|
||||
"state": true,
|
||||
"sender": 12797322,
|
||||
"interruptor": 0
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "Salon",
|
||||
"speach_name": "salon",
|
||||
"zone": "",
|
||||
"state": false,
|
||||
"sender": 12797322,
|
||||
"interruptor": 1
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"name": "Sapin",
|
||||
"speach_name": "sapin",
|
||||
"zone": "",
|
||||
"state": false,
|
||||
"sender": 12797322,
|
||||
"interruptor": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"shutters" : {
|
||||
"speach_name": "volet",
|
||||
"devices": [
|
||||
{
|
||||
"id": 1,
|
||||
"name": "Chambre de JB",
|
||||
"zone": "",
|
||||
"state": true,
|
||||
"sender": 14997046,
|
||||
"interruptor": 12,
|
||||
"speed_up": 20,
|
||||
"speed_down": 18
|
||||
}
|
||||
]
|
||||
},
|
||||
"sprinklers" : {
|
||||
"speach_name": "station",
|
||||
"devices": [
|
||||
{
|
||||
"id": 7,
|
||||
"name": "Zone A",
|
||||
"state": false
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"name": "Zone B",
|
||||
"state": false
|
||||
},
|
||||
{
|
||||
"id": 25,
|
||||
"name": "Zone C",
|
||||
"state": false
|
||||
},
|
||||
{
|
||||
"id": 24,
|
||||
"name": "Zone D",
|
||||
"state": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
"lights": [
|
||||
{
|
||||
"id": 1,
|
||||
"name": "Bureau JB",
|
||||
"speach_name": "bureau",
|
||||
"zone": "",
|
||||
"state": true,
|
||||
"sender": 12797322,
|
||||
"interruptor": 0
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "Salon",
|
||||
"speach_name": "salon",
|
||||
"zone": "",
|
||||
"state": false,
|
||||
"sender": 12797322,
|
||||
"interruptor": 1
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"name": "Sapin",
|
||||
"speach_name": "sapin",
|
||||
"zone": "",
|
||||
"state": false,
|
||||
"sender": 12797322,
|
||||
"interruptor": 2
|
||||
}
|
||||
],
|
||||
"shutters": [
|
||||
{
|
||||
"id": 1,
|
||||
"name": "Chambre de JB",
|
||||
"zone": "",
|
||||
"state": true,
|
||||
"sender": 14997046,
|
||||
"interruptor": 12,
|
||||
"speed_up": 20,
|
||||
"speed_down": 18
|
||||
}
|
||||
],
|
||||
"sprinklers": [
|
||||
{
|
||||
"id": 7,
|
||||
"name": "Zone A",
|
||||
"state": false
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"name": "Zone B",
|
||||
"state": false
|
||||
},
|
||||
{
|
||||
"id": 25,
|
||||
"name": "Zone C",
|
||||
"state": false
|
||||
},
|
||||
{
|
||||
"id": 24,
|
||||
"name": "Zone D",
|
||||
"state": false
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user