finish rename ligths as outlets

This commit is contained in:
jbnadal
2018-05-07 11:43:07 +02:00
parent 7d8b653d08
commit 10bfa7ac93
6 changed files with 47 additions and 42 deletions

View File

@@ -13,28 +13,28 @@
{
"capabilities": [
{
"name": "lights",
"speach_name": "lumière"
"name": "outlets",
"speech_name": "lumière"
},
{
"name": "shutters",
"speach_name": "volet"
"speech_name": "volet"
},
{
"name": "sprinklers",
"speach_name": "station"
"speech_name": "station"
}
]
}
```
## domo.lights
## domo.outlets
### create
```
./usr/bin/ubus call domo.lights create
./usr/bin/ubus call domo.outlets create "{\"name\":\"test\", \"sender\": 12797322, \"switch\": 4}"
```
TODO
@@ -42,38 +42,38 @@ TODO
### list
```
./usr/bin/ubus call domo.lights list
./usr/bin/ubus call domo.outlets list
```
```json
{
"lights": [
"outlets": [
{
"id": 1,
"name": "Bureau JB",
"speach_name": "bureau",
"speech_name": "bureau",
"zone": "",
"state": true,
"sender": 12797322,
"interruptor": 0
"switch": 0
},
{
"id": 2,
"name": "Salon",
"speach_name": "salon",
"speech_name": "salon",
"zone": "",
"state": false,
"sender": 12797322,
"interruptor": 1
"switch": 1
},
{
"id": 3,
"name": "Sapin",
"speach_name": "sapin",
"speech_name": "sapin",
"zone": "",
"state": false,
"sender": 12797322,
"interruptor": 2
"switch": 2
}
]
}
@@ -82,25 +82,25 @@ TODO
### read
```
./usr/bin/ubus call domo.lights read "{\"id\":2}"
./usr/bin/ubus call domo.outlets read "{\"id\":2}"
```
```json
{
"id": 2,
"name": "Salon",
"speach_name": "salon",
"speech_name": "salon",
"state": false,
"zone": "",
"sender": 12797322,
"interruptor": 1
"switch": 1
}
```
### update
```
./usr/bin/ubus call domo.lights update
./usr/bin/ubus call domo.outlets update
```
TODO
@@ -108,7 +108,7 @@ TODO
### delete
```
./usr/bin/ubus call domo.lights delete
./usr/bin/ubus call domo.outlets delete
```
TODO