-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.json.example
More file actions
118 lines (118 loc) · 3.26 KB
/
config.json.example
File metadata and controls
118 lines (118 loc) · 3.26 KB
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
{
"endpoint": {
"address": "0.0.0.0",
"port": "5683",
"logDir": "logs"
},
"resources": [
{
"name": "Example Resource 1",
"path": "example/res1",
"value": "12345",
"observable": true,
"maxage": 240,
"logfile": "res1.log",
"methods": {
"GET": {
"format": "STRING",
"print": true
},
"PUT": {
"format": "STRING",
"print": true,
"log": true,
"store": true
},
"PUSH": {
"format": "HEX",
"print": true,
"log": true
}
}
},
{
"name": "Example Resource 2",
"path": "example/res2",
"logfile": "res2.log",
"methods": {
"PUT": {
"format": "HEX",
"print": true,
"log": true
},
"POST": {
"format": ["BASE64","HEX"],
"print": true,
"log": true
}
}
},
{
"name": "Dynamic resource",
"dynamic": true,
"path": "dyn/(.*)/val([0-9]*)",
"logfile": "dynamic/$1/value-$2.log",
"methods": {
"PUT": {
"format": "STRING",
"print": true,
"log": true
},
"GET": {
"format": "STRING",
"print": true
}
}
},
{
"name": "Example Command",
"path": "notify",
"logfile": "notify.log",
"methods": {
"PUT": {
"format": "STRING",
"print": true,
"log": true,
"cmd": "sh -c \"notify-send $COAPSERVER_RESOURCE::$COAPSERVER_METHOD $COAPSERVER_PAYLOAD\"",
"cmdstdin": false,
"cmdtimeout": 250,
"cmdloginput": true
}
}
}
],
"templates": [
{
"name": "Exmaple Template",
"ident": "example",
"resources": [
{
"name": "$1 Resource",
"path": "device/$2",
"logfile": "$1.log",
"methods": {
"POST": {
"format": "$3",
"print": true,
"log": true
}
}
}
],
"args": [
"Common Name",
"Device ID"
]
}
],
"template-instances": [
{
"template": "example",
"template-args": [ "test_device_1", "12345", "BASE64" ]
},
{
"template": "example",
"template-args": [ "test_device_2", "76543", "HEX" ]
}
]
}