forked from staromeste/homebridge-http-advanced-accessory
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsample-config.json
87 lines (86 loc) · 2.48 KB
/
sample-config.json
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
{
"bridge": {
"name": "Homebridge",
"username": "C1:38:5A:AC:39:40",
"port": 51826,
"pin": "000-00-000"
},
"description": "This is an example configuration for the Everything Homebridge plugin",
"accessories": [
{
"accessory": "HttpAdvancedAccessory",
"service": "ContactSensor",
"name": "Terrace Sensor",
"forceRefreshDelay": 5,
"username": "admin",
"password": "admin",
"debug" : false,
"urls":{
"getContactSensorState": {
"url" : "http://localhost/xml/zones/zonesStatus48IP.xml",
"mappers" : [
{
"type": "xpath",
"parameters": {
"xpath": "//status[1]/text()"
}
},
{
"type": "static",
"parameters": {
"mapping": {
"ALARM": "1",
"NORMAL":"0"
}
}
}
]
}
}
},
{
"accessory": "HttpAdvancedAccessory",
"service": "HeaterCooler",
"name": "Condizionatore Soggiorno",
"forceRefreshDelay": 5,
"debug" : false,
"urls":{
"getCurrentHeaterCoolerState": {
"url" : "http://192.168.201.16/aircon/get_control_info",
"mappers" : [
{"type": "regex", "parameters": {"regexp": "(pow=0)","capture": "1"} },
{"type": "regex", "parameters": { "regexp": "mode=(\\d)", "capture": "1"} },
{"type": "static", "parameters": { "mapping": { "pow=0": "0", "3":"3", "4":"2"} } }
]
},
"getTargetHeaterCoolerState":{
"url" : "http://192.168.201.16/aircon/get_control_info",
"mappers" : [
{"type": "regex", "parameters": {"regexp": "(pow=0)","capture": "1"} },
{"type": "regex", "parameters": { "regexp": "mode=(\\d)", "capture": "1"} },
{"type": "static", "parameters": { "mapping": { "pow=0": "0", "3":"3", "4":"2"} } }
]
},
"setTargetHeaterCoolerState":{
"url" : "http://192.168.201.16/aircon/set_control_info/{value}&pow=${state.getActive}&",
"mappers" : [
{"type": "static", "parameters": { "mapping": { "0": "?mode=0", "1":"?mode=4", "2":"?mode=3"} } }
]
},
"getActive":{
"url" : "http://192.168.201.16/aircon/get_control_info",
"mappers" : [
{"type": "regex", "parameters": {"regexp": "pow=(\\d)","capture": "1"} }
]
},
"setActive":{
"url" : "http://192.168.201.16/aircon/set_control_info/{value}",
"mappers" : [
{"type": "static", "parameters": { "mapping": { "0": "?pow=0", "1":"?pow=1"} } }
]
}
}
}
],
"platforms": []
}