2019-08-23 11:39:42 +00:00
|
|
|
<?php
|
2020-07-28 09:33:32 +00:00
|
|
|
//Database Conections
|
2019-08-23 11:39:42 +00:00
|
|
|
define('DBHOST','');
|
|
|
|
define('DBNAME','');
|
|
|
|
define('DBUSER','');
|
|
|
|
define('DBPASS','');
|
|
|
|
define('BASEDIR','');
|
2020-07-28 09:33:32 +00:00
|
|
|
define('BASEURL','');
|
2019-08-23 11:39:42 +00:00
|
|
|
|
|
|
|
//Leade record newer than XX days
|
2020-07-28 09:33:32 +00:00
|
|
|
define('RECORDTIMOUT', 1);
|
|
|
|
|
|
|
|
//Log Setting
|
|
|
|
define('DEBUGMOD', 1); //show debug codes
|
|
|
|
define('API_DEBUGMOD', 1); //show debug codes in api
|
|
|
|
define('LOGTIMOUT', 5); //Deleate logfiles older than XX days
|
|
|
|
/*
|
|
|
|
LogRecordTypes::ERROR
|
|
|
|
LogRecordTypes::WARNING
|
|
|
|
LogRecordTypes::INFO
|
|
|
|
*/
|
2020-07-29 06:35:00 +00:00
|
|
|
define('LOGLEVEL', LogRecordTypes::INFO);
|
2019-08-23 11:39:42 +00:00
|
|
|
|
|
|
|
//Restrict acess to API
|
2020-07-28 09:33:32 +00:00
|
|
|
$allowerdIp = [
|
|
|
|
'', //IP Domácí sítě
|
|
|
|
];
|
|
|
|
define('HOMEIP', $allowerdIp);
|
2019-08-23 11:39:42 +00:00
|
|
|
|
|
|
|
//Randomizet Security Keys
|
|
|
|
define('FIRSTKEY','');
|
|
|
|
define('SECONDKEY','');
|
|
|
|
|
2020-07-28 09:33:32 +00:00
|
|
|
//DEFAULT CONECT INTERVALS in seconds
|
|
|
|
define('DEVICECONNECTINTERVAL', 60);
|
|
|
|
|
|
|
|
//time format
|
|
|
|
define('DATEFORMAT','d. m. Y H:i');
|
|
|
|
define('TIMEFORMAT','H:i');
|
2019-08-23 11:39:42 +00:00
|
|
|
|
|
|
|
/** Unit Definition **/
|
|
|
|
const UNITS = [
|
|
|
|
''=> '',
|
|
|
|
'temp' => "°C",
|
2020-07-28 09:33:32 +00:00
|
|
|
'temp_cont' => "°C",
|
2019-08-23 11:39:42 +00:00
|
|
|
'humi' => "%",
|
|
|
|
'light' => "",
|
2020-07-28 09:33:32 +00:00
|
|
|
'on/off' => "",
|
|
|
|
'doot' => "",
|
|
|
|
'battery' => "V",
|
|
|
|
'water' => "",
|
|
|
|
'wifi' => "Bpm",
|
|
|
|
'media_state' => "",
|
|
|
|
'media_cont' => "",
|
|
|
|
'vol_cont' => "",
|
|
|
|
'media_apps' => "",
|
|
|
|
'media_input' => "",
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
//Notifications
|
|
|
|
define('SERVERKEY','');
|
|
|
|
define('SERVERVAIPKEY','');
|
|
|
|
|
|
|
|
//TODO: Po registraci vzít výchozí hodnoty
|
|
|
|
//Default network Setting
|
|
|
|
const NETWORK = [
|
|
|
|
'subnet' => '',
|
|
|
|
'gateway' => '',
|
|
|
|
'dns' => '',
|
2019-08-23 11:39:42 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
//Graph Setting
|
|
|
|
const RANGES = [
|
|
|
|
'' => [
|
|
|
|
'min' => 0,
|
|
|
|
'max' => 100,
|
2020-07-28 09:33:32 +00:00
|
|
|
'scale' => 20,
|
|
|
|
'graph' => 'line',
|
2019-08-23 11:39:42 +00:00
|
|
|
],
|
|
|
|
'temp' => [
|
|
|
|
'min' => 10,
|
|
|
|
'max' => 45,
|
|
|
|
'scale' =>20,
|
2020-07-28 09:33:32 +00:00
|
|
|
'graph' => 'line',
|
2019-08-23 11:39:42 +00:00
|
|
|
],
|
|
|
|
'humi' => [
|
|
|
|
'min' => 0,
|
|
|
|
'max' => 100,
|
|
|
|
'scale' =>20,
|
2020-07-28 09:33:32 +00:00
|
|
|
'graph' => 'line',
|
2019-08-23 11:39:42 +00:00
|
|
|
],
|
|
|
|
'light' => [
|
|
|
|
'min' => 0,
|
|
|
|
'max' => 1,
|
|
|
|
'scale' =>1,
|
2020-07-28 09:33:32 +00:00
|
|
|
'graph' => 'bar',
|
2019-08-23 11:39:42 +00:00
|
|
|
],
|
|
|
|
'on/off' => [
|
|
|
|
'min' => 0,
|
|
|
|
'max' => 1,
|
|
|
|
'scale' =>1,
|
2020-07-28 09:33:32 +00:00
|
|
|
'graph' => 'bar',
|
|
|
|
],
|
|
|
|
'door' => [
|
|
|
|
'min' => 0,
|
|
|
|
'max' => 1,
|
|
|
|
'scale' =>1,
|
|
|
|
'graph' => 'bar',
|
|
|
|
'fallBack' => 1,
|
|
|
|
'fallBackTime' => 2, //in Minutes
|
|
|
|
],
|
|
|
|
'battery' => [
|
|
|
|
'min' => 0,
|
|
|
|
'max' => 4.7,
|
|
|
|
'scale' =>0,
|
|
|
|
'graph' => 'line',
|
|
|
|
],
|
|
|
|
'temp_cont' => [
|
|
|
|
'min' => 0,
|
|
|
|
'max' => 30,
|
|
|
|
'scale' => 0,5,
|
|
|
|
'graph' => 'line',
|
|
|
|
],
|
|
|
|
'wifi' => [
|
|
|
|
'min' => 0,
|
|
|
|
'max' => 30,
|
|
|
|
'scale' => 0,5,
|
|
|
|
'graph' => 'line',
|
2019-08-23 11:39:42 +00:00
|
|
|
],
|
|
|
|
];
|
2020-07-28 09:33:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2019-08-23 11:39:42 +00:00
|
|
|
?>
|