-
Notifications
You must be signed in to change notification settings - Fork 0
/
eedomus_plugin.json
205 lines (197 loc) · 8.21 KB
/
eedomus_plugin.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
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
{
"plugin_id": "pluviozrain",
"name_fr": "Pluviometrie ZRain",
"name_en": "ZRain Rain Gauge",
"icon": "pluginzrain.png",
"version": "1.21",
"creation_date": "2019-01-10",
"modification_date": "2019-01-30",
"author": "Germam",
"description_fr": "Calcul des cumuls de pluie journaliers et mensuels pour capteur ZRain Popp",
"description_en": "Compute days and monthes rain falls volumes for ZRain Popp sensor device" ,
"parameters":
[
{
"parameter": "configuration",
"description": "--------- Configuration ----------",
"xtype": "textfield",
"field": "allowBlank: true, width: 0, style: 'visibility:hidden;'"
},
{
"parameter": "id_cumul_zrain",
"description": "Id du cumul annuel du périphérique ZRain",
"xtype": "combo",
"field": "store : getCombo('/json/list_all.php'), displayField: 'label', valueField: 'id',forceSelection: true, triggerAction: 'all',selectOnFocus: true, editable: false, shadow : true, mode: 'local', width: 250, listWidth: 300, allowBlank: false"
},
{
"parameter": "choix_canaux_vide",
"description": "",
"xtype": "textfield",
"field": "allowBlank: true, width: 0, style: 'visibility:hidden;'"
},
{
"parameter": "choix_canaux",
"description": "--------- Choix des canaux ----------",
"xtype": "textfield",
"field": "allowBlank: true, width: 0, style: 'visibility:hidden;'"
},
{
"parameter": "box_id_controle_arrosage",
"description": "Conseil Arrosage et alerte pluie intense :",
"xtype": "checkbox",
"field": "style: 'margin-top: 6px;', checked: true"
}
],
"scripts":
[
{
"name": "zrain.php"
}
],
"devices":
[
{
"device_id": "id_cumul_jour",
"module_id": "11",
"type": "http",
"name_fr": "Cumul pluie jour",
"icon": "pluviojour.png",
"utilisation_id": "7",
"create" : "1",
"value_unit": "mm/j",
"parameters":
{
"value_type": "float",
"default_value" : "0",
"RAW_URL": "",
"RAW_XPATH": ""
}
},
{
"device_id": "id_cumul_mois",
"module_id": "11",
"parent_id": "id_cumul_jour",
"type": "http",
"name_fr": "Cumul pluie mois",
"icon": "pluviomois.png",
"utilisation_id": "7",
"create" : "1",
"value_unit": "mm/mois",
"parameters":
{
"value_type": "float",
"default_value" : "0",
"RAW_URL": "",
"RAW_XPATH": ""
}
},
{
"device_id": "id_controle_arrosage",
"module_id": "11",
"parent_id": "id_cumul_jour",
"type": "http",
"name_fr": "Arrosage",
"icon": "arrosage.png",
"utilisation_id": "7",
"create" : "box_id_controle_arrosage",
"parameters":
{
"value_type": "list",
"RAW_URL": "",
"RAW_XPATH": ""
},
"values":
[
{ "value": "0", "icon": "arrosage.png", "description": "arrosage conseille"},
{ "value": "1", "icon": "arrosagedeconseille.png", "description": "arrosage inutile"}
]
},
{
"device_id": "id_pluie_intense",
"module_id": "11",
"parent_id": "id_cumul_jour",
"type": "http",
"name_fr": "Pluie Intense",
"icon": "zrain.png",
"utilisation_id": "7",
"create" : "box_id_controle_arrosage",
"parameters":
{
"value_type": "list",
"RAW_URL": "",
"RAW_XPATH": ""
},
"values":
[
{ "value": "0", "icon": "pasdepluie.png", "description": "pas de pluie intense"},
{ "value": "1", "icon": "pluieintense.png", "description": "pluie intense"}
],
"macros":
[
{
"macro_id" : "id_set_alerte_5_mn",
"name": "Extinction Alerte",
"dynamic_value": 10,
"hidden" : 0,
"actions":
[
{ "wait": 0, "wait_unit": "min", "action_type": "a", "value": 1 },
{ "wait": 5, "dynamic": false, "wait_unit": "min", "action_type": "a", "value": 0 }
]
}
]
},
{
"device_id": "id_controle_pluie",
"module_id": "41",
"type": "http",
"name_fr": "Controle Pluviometrie",
"icon": "pluvio.png",
"utilisation_id": "43",
"create" : "1",
"parameters":
{
"VAR1": "plugin.parameters.id_cumul_zrain",
"VAR2": "plugin.devices.id_cumul_mois,plugin.devices.id_cumul_jour",
"VAR3": "plugin.devices.id_controle_arrosage,plugin.devices.id_pluie_intense,plugin.macros.id_set_alerte_5_mn",
"value_type": "list",
"ignore_errors": 3,
"RAW_URL": "http://localhost/script/?exec=zrain.php&id_cumul_zrain=[VAR1]&id_cumuls=[VAR2]&id_arrosage=[VAR3]&action=updateconso",
"RAW_XPATH": "",
"POLLING": "0"
},
"values":
[
{ "value": "maj", "description": "maj", "icon": "majpluvio.png", "http_url": "http://localhost/script/?exec=zrain.php&id_cumul_zrain=[VAR1]&id_cumuls=[VAR2]&id_arrosage=[VAR3]&action=updateconso" },
{ "value": "raz", "description": "raz", "icon": "razpluvio.png", "http_url": "http://localhost/script/?exec=zrain.php&id_cumul_zrain=[VAR1]&id_cumuls=[VAR2]&id_arrosage=[VAR3]&action=raz" },
{ "value": "test arrosage", "description": "test arrosage", "icon": "arrosage.png", "http_url": "http://localhost/script/?exec=zrain.php&id_cumul_zrain=[VAR1]&id_cumuls=[VAR2]&id_arrosage=[VAR3]&&action=arrosage" },
{ "value": "test pluie intense", "description": "test pluie intense", "icon": "pluieintense.png", "http_url": "http://localhost/script/?exec=zrain.php&id_cumul_zrain=[VAR1]&id_cumuls=[VAR2]&id_arrosage=[VAR3]&action=pluieintense" }
]
}
],
"rules":
[
{
"name_fr": "Maj Cumul Pluie",
"criterias":
[
{ "device_id": "plugin.parameters.id_cumul_zrain", "type": "c" }
],
"actions":
[
{ "device_id": "plugin.devices.id_controle_pluie", "type" : "direct", "action": "maj" }
]
},
{
"name_fr": "Maj journaliere",
"cron":
[
{ "day_of_week": "-1", "hour": "0", "minute": "1" }
],
"actions":
[
{ "device_id": "plugin.devices.id_controle_pluie", "type" : "direct", "action": "maj" }
]
}
]
}