-
Notifications
You must be signed in to change notification settings - Fork 3
/
ecar.td.jsonld
86 lines (86 loc) · 2.6 KB
/
ecar.td.jsonld
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
{
"@context": "https://www.w3.org/2019/wot/td/v1",
"@type": "Thing",
"security": ["nosec_sc"],
"securityDefinitions": {
"nosec_sc": { "scheme": "nosec" }
},
"title": "eCar",
"description": "eCarThing",
"base": "http://127.0.0.1:8080",
"properties": {
"soc": {
"type": "number",
"description": "Current chargingStatus in % (0 ... 100%)",
"readOnly": true,
"minimum": 0,
"maximum": 100,
"unit": "%",
"forms": [{
"href": "/ecar/properties/soc",
"contentType": "application/json",
"op": ["readproperty"]
}]
},
"driving": {
"type": "boolean",
"description": "Is car driving around",
"observable": true,
"readOnly": true,
"forms": [{
"href": "/ecar/properties/driving",
"contentType": "application/json",
"op": ["readproperty"]
}]
},
"status": {
"type": "string",
"description": "Current car status (readyToCharge, charging, stopCharging)",
"readOnly": true,
"enum": [
"readyToCharge",
"charging",
"stopCharging"
],
"forms": [{
"href": "/ecar/properties/status",
"contentType": "application/json",
"op": ["readproperty"]
}]
}
},
"actions": {
"startDriving": {
"description": "Starting to drive",
"forms": [{
"href": "/ecar/actions/startDriving",
"contentType": "application/json",
"op": ["invokeaction"]
}]
},
"stopDriving": {
"description": "Stopping to drive",
"forms": [{
"href": "/ecar/actions/stopDriving",
"contentType": "application/json",
"op": ["invokeaction"]
}]
},
"startCharging": {
"description": "Starting to charge",
"forms": [{
"href": "/ecar/actions/startCharging",
"contentType": "application/json",
"op": ["invokeaction"]
}]
},
"stopCharging": {
"description": "Stopping to charge",
"forms": [{
"href": "/ecar/actions/stopCharging",
"contentType": "application/json",
"op": ["invokeaction"]
}]
}
}
}