/
config.php
302 lines (226 loc) · 13.8 KB
/
config.php
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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
<?php
// phpMyDomo main config File
// http://www.phpmydomo.org
// ##############################################################################
// Minimal Configuration #######################################################
// ##############################################################################
//api to use : 'domoticz' | 'domogik' | 'domotiga' | 'openhab' . ALPHAS : 'pilight' | 'freedomotic'
$conf['app']['api'] ="openhab";
// Personalize the name of your Home
$conf['app']['home_name'] ="Home Sweet Home";
// language file to use : (name of the folder in /www/inc/lang/)
$conf['app']['lang'] ="en"; // en | de | fr | it | nl | uk
//choose a photoframe method : directory | iphoto
$conf['app']['photoframe'] ="directory";
// Skin : Uncomment to use another skin (defaults to the 'default' skin, if not set)
//$conf['app']['skin'] ="black"; // default | black | metal
// SubDirectory: Uncomment ONLY if you want to install phpMydomo in a sub directory of your web server root (not recommended at this time)
//$conf['app']['dir'] ="/my_directory";
//Locale: uncomment to override the locale defined in the language file
//$conf['app']['locale'] ="en_US.utf8";
// If your server doesnt generate sunrise and sunset times, uncomment and enter your location here in the format : "City, Country"
// PMD will automatically Query Google, to get your location, and calculate Sunset and Sunrise from the latitude and longitude returned by Google
//$conf['app']['location'] ="Paris, France";
// The home page automatically reload after xx seconds, to refresh the buttons or sensor states.
$conf['app']['reload_time'] ="120"; // time in seconds
// ScreenSaver mode : is set, instead of refreshing the home windows, PMD automatically jump to one of the selected destination
$conf['app']['screensaver_mode'] ="clock"; // ''|'clock'|'photoframe' => No ScreenSaver | jump to Clock page | jump to album selected in 'screensaver_fp_album'
//$conf['app']['screensaver_pf_album']="Landscapes"; // (required) album ID to launch only when ScreenSaver mode is set to 'photoframe';
// Show or hide sensors names in home groups: 0=hide, 1=show , x= show and truncate after x characters
$conf['app']['groups_sensors_names'] ="1";
// When using actions, this is the default debounce period (in seconds) : It prevents the same action to be triggered multiple times, if the same action is called within this period.
$conf['app']['actions_debounce'] ="3";
// Urls #####################################################################
// Change these, if your domotic server is NOT on the same server than phpMyDomo, or if you are not using default server ports.
// Remote API Server. ---------------------------------------------------
// Format : http://hostname_or_ip:port
$conf['urls']['server_openhab'] ="http://demo.openhab.org:8080";
//$conf['urls']['server_domoticz'] ="http://10.1.100.151:8080";
//$conf['urls']['server_domogik'] ="http://10.1.100.152:40405";
//$conf['urls']['server_domotiga'] ="http://10.1.100.153:9090";
//$conf['urls']['server_pilight'] ="http://10.1.100.153:5000";
//$conf['urls']['server_freedomotic'] ="http://admin:admin@93.186.254.203:9111";
// Server Website, the normal GUI of your domotic server -----------------
// Format : http://hostname_or_ip:port(/subdir)
$conf['urls']['www_openhab'] ="http://demo.openhab.org:8080/openhab.app?sitemap=demo";
//$conf['urls']['www_domoticz'] ="http://10.1.100.151:8080";
//$conf['urls']['www_domogik'] ="http://10.1.100.152:40404";
//$conf['urls']['www_domotiga'] ="http://10.1.100.153:9090";
//$conf['urls']['www_pilight'] ="http://10.1.100.153:5000";
//$conf['urls']['www_freedomotic'] ="http://93.186.254.203:8090";
// ##############################################################################
// Sensors Types Units ##########################################################
// ##############################################################################
// Personalize your local units, according to your server settings
$conf['units']['temp'] ="°C";
$conf['units']['hum'] ="%";
$conf['units']['wind'] ="m/s";
$conf['units']['rain'] ="mm";
$conf['units']['baro'] ="hPa";
$conf['units']['hygro'] ="%";
$conf['units']['wind_speed'] ="m/s";
$conf['units']['wind_gust'] ="m/s";
$conf['units']['wind_temp'] ="°C";
$conf['units']['wind_chill'] ="°C";
// ##############################################################################
// Groups #######################################################################
// ##############################################################################
/*
Define Groups shown on the home page.
Groups are displayed in the order they are created below.
Definitions:
- GROUP_KEY: a key to identify the group (use a-z 0-1 _ or - chars) , ie "living", "room_1", "external", etc...
- DEVICE_IDs: Unique Id of the Device (tips: grab it from the phpMyDomo Devices page)
- GROUP_NAME: Group Name Displayed, ie: "Living Room"
- 'command' for switches shown in the group
- 'sensor' for sensors displayed in the Group Title
Example 1:
$conf['groups_names']['GROUP_KEY'] ="GROUP_NAME";
$conf['groups']['GROUP_KEY']['command'][] ="DEVICE_ID_1";
$conf['groups']['GROUP_KEY']['command'][] ="DEVICE_ID_2";
$conf['groups']['GROUP_KEY']['sensor'][] ="DEVICE_ID_3";
will create a group named "GROUP_NAME" (with ID "GROUP_KEY") displaying switches for DEVICE_ID_1 and DEVICE_ID_2, and showing DEVICE_ID_3 sensor values in the group title.
Example 2: (working with openHab demo API)
// Groups Names ----------------------------------------------------
$conf['groups_names']['living'] ="Living Room";
$conf['groups_names']['outside'] ="OutDoor";
$conf['groups_names']['heating'] ="Heating";
// Groups (unique ids) ----------------------------------------------
$conf['groups']['outside']['command'][] ="command_switch_light_outdoor_terrace";
$conf['groups']['outside']['command'][] ="command_switch_light_outdoor_frontdoor";
$conf['groups']['outside']['command'][] ="command_switch_light_outdoor_garage";
$conf['groups']['outside']['sensor'][] ="sensor_temp_weather_temperature";
$conf['groups']['living']['command'][] ="scene_group_gf_living";
$conf['groups']['living']['command'][] ="command_switch_heating_gf_living";
$conf['groups']['living']['command'][] ="command_shutter_shutter_gf_living";
$conf['groups']['living']['command'][] ="command_dimmer_light_gf_living_table";
$conf['groups']['living']['sensor'][] ="sensor_bool_window_gf_living";
$conf['groups']['living']['sensor'][] ="sensor_temp_temperature_gf_living";
$conf['groups']['heating']['command'][] ="scene_group_heating";
$conf['groups']['heating']['command'][] ="command_switch_heating_gf_toilet";
$conf['groups']['heating']['command'][] ="command_switch_heating_gf_living";
$conf['groups']['heating']['command'][] ="command_switch_heating_gf_kitchen";
$conf['groups']['heating']['command'][] ="command_switch_heating_gf_corridor";
$conf['groups']['heating']['command'][] ="command_switch_heating_ff_office";
$conf['groups']['heating']['command'][] ="command_switch_heating_ff_child";
$conf['groups']['heating']['command'][] ="command_switch_heating_ff_bed";
$conf['groups']['heating']['command'][] ="command_switch_heating_ff_bath";
*/
// ##############################################################################
// Devices Icons ################################################################
// ##############################################################################
/*
Define a different icons per devices: Normally icons are defined, depending on the device type (from /static/global/img/types/), but you can choose to override them, with your own device icon, for each device
Format:
$conf['devices_icons']['DEVICE_ID']['LOCATION'] ="ICON_NAME";
Definitions:
- DEVICE_ID: Unique Id of the Device (tips: grab it from the phpMyDomo Devices page)
- LOCATION: Location of the Icon ; devices|types|custom
- "devices" : Icon is choosen from the /static/global/img/devices/ folder
- "types" : Icon is choosen from the /static/global/img/types/ folder
- "custom" : Icon is choosen from the /static/custom/devices/ folder. This is the RIGHT place to add your OWN custom icons
-ICON_NAME : the name of the icon files , ie "alarm1" whill select : "icon48_alarm1_on.png" or "icon48_alarm1_off.png" depending on the device's state
Examples:
$conf['devices_icons']['scene_group_gf_living']['devices'] ="switch1";
*/
// ##############################################################################
// Devices Warnings #############################################################
// ##############################################################################
/*
Compare device value/state with your own value(s) to highlight (in red) the sensor in the main home page.
Format:
$conf['devices_warnings']['DEVICE_ID'][] ="Oxxx";
Definitions:
- DEVICE_ID: Unique Id of the Device (tips: grab it from the phpMyDomo Devices page)
- Oxxx: is the Operator + the value to compare to the current device value
- "O" : Operator to use :
- "<" lower than
- ">" greater than
- "=" equal to
- "~" NOT equal to
- "xxx" : the value to compare to
You can set multiple warning per sensors
Example 1:
$conf['devices_warnings']['sensor_bool_window_gf_living'][] ="=off";
This would highlight the 'sensor_bool_window_gf_living' sensor whenever it is open (equals to 'off' state).
Example 2:
$conf['devices_warnings']['sensor_temp_temperature_gf_living'][] =">40";
$conf['devices_warnings']['sensor_temp_temperature_gf_living'][] ="<4";
This would highlight the 'sensor_temp_temperature_gf_living' sensor whenever the temperature is greater than 40° OR lower than 4°.
*/
// ##############################################################################
// Blocks #######################################################################
// ##############################################################################
/*
Blocks are shown in the right column of the Home Page.
Format:
$conf['blocks']['NAME'][]="DEVICE_ID";
Definitions:
- NAME : Block's Name (if you set "weather" or "sensors" the block's title name and icons will be pre-set)
- DEVICE_ID : Unique Id of the Device (tips: grab it from the phpMyDomo Devices page)
Example 1:
$conf['blocks']['weather'][]="DEVICE_ID_4";
$conf['blocks']['weather'][]="DEVICE_ID_5";
$conf['blocks']['sensors'][]="DEVICE_ID_7";
$conf['blocks']['sensors'][]="DEVICE_ID_8";
will show DEVICE_ID_4 and DEVICE_ID_5 in the 'weather' block, and DEVICE_ID_4 and DEVICE_ID_5 in the 'sensors' block
Example 2: (working with openHab demo API)
// weather Block (unique ids) ---------------------------------------
$conf['blocks']['weather'][]="sensor_temp_weather_temperature";
// Sensor Block (unique ids) ---------------------------------------
$conf['blocks']['sensors'][]="sensor_temp_temperature_setpoint";
$conf['blocks']['sensors'][]="sensor_temp_temperature_gf_living";
$conf['blocks']['sensors'][]="sensor_temp_temperature_gf_toilet";
$conf['blocks']['sensors'][]="sensor_temp_temperature_gf_corridor";
$conf['blocks']['sensors'][]="sensor_temp_temperature_ff_office";
$conf['blocks']['sensors'][]="sensor_temp_temperature_ff_child";
$conf['blocks']['sensors'][]="sensor_temp_temperature_ff_bed";
$conf['blocks']['sensors'][]="sensor_temp_temperature_ff_bath";
*/
// ##############################################################################
// Links Block ##################################################################
// ##############################################################################
/*
The Links Block allow you to create a block , with custom links to various websites
Example:
$conf['blocks']['links'][]=array(
'url' =>'http://www.phpmydomo.com', // (required) url to link to
'name' =>'PMD WebSite', // (required) button name
'blank' =>'1', // 0 (default) | 1 : launch in a new window or not
'icon' =>'external-link', // icon name (default to 'bookmark' if not set) refer to http://fontawesome.io/icons/
);
$conf['blocks']['links'][]=array(
'url' =>'https://github.com/phpMyDomo/phpMyDomo/issues', // (required) url to link to
'name' =>'PMD issues', // (required) button name
'blank' =>'1', // 0 (default) | 1 : launch in a new window or not
'icon' =>'github', // icon name (default to 'bookmark' if not set) refer to http://fontawesome.io/icons/
);
*/
// ##############################################################################
// Cameras (if not already defined in the server devices) #######################
// ##############################################################################
/*
Define IP camera streams to be displayed in the Camera Page. if cameras_sizes is not defined, it defaults to 320x240
Example:
$conf['cameras_names']['room1'] ="Room 1";
$conf['cameras_urls']['room1'] ="http://user:pass@10.0.0.1/videostream.cgi";
$conf['cameras_sizes']['room1'] ="640x480";
$conf['cameras_names']['room2'] ="Room 2";
$conf['cameras_urls']['room2'] ="http://user:pass@10.0.0.2/videostream.cgi";
*/
// ##############################################################################
// Menus To Show ################################################################
// ##############################################################################
/*
Defines menus displayed on the header or footer of the page.
If not set, all menus are shown.
*/
$conf['menu_head']=array('home','clock','squeeze','cameras','photos','devices');
//$conf['menu_foot']=array('home','clock','squeeze','cameras','photos','commands','sensors','devices');
// ##############################################################################
// DEBUG : you don't need to change this #########################################
// ##############################################################################
$conf['debug']['allow']=1; //allow debug from url (add ?debug in the url)
$conf['debug']['force']=0; //always show debug
$conf['debug']['level']=E_ALL ^E_NOTICE; //php error level reporting
?>