1
0

added templates

This commit is contained in:
Daniel Tartavel 2022-09-10 14:58:55 +02:00
parent 2360419e50
commit 87577f6d71
9 changed files with 123 additions and 0 deletions

View File

@ -9,3 +9,8 @@ You must configure sudoers to allow usr domotique to execute nmap and systemctl
Cmnd_Alias DOM = /usr/bin/nmap, /usr/bin/systemctl restart presenceD.service
domotique ALL=(ALL) NOPASSWD: DOM
php-mosquitto:
https://mosquitto-php.readthedocs.io/en/latest/overview.html#installation

View File

@ -0,0 +1,7 @@
<?php
$aliases = array(
//"<friendlyName" => "<alias>",
)
?>

View File

@ -0,0 +1,12 @@
<?php
$notificationLevel = ALERT;
$logLevel = DEBUG | INFO | NOTICE | WARNING | ERROR | ALERT;
// le premier utilisateur est l'utilisateur par défaut
$defaultUser = array(
//"<friendlyName>" => "<userName>",
// example: "rdc" => "Daniel",
);
?>

View File

@ -0,0 +1,13 @@
<?php
// $dashboards["<dashboardName>"] =array(
//array(<device constant>, "<property>")
//);
/* example:
$dashboards["default"] = array(
array(RDC_SALON_ECLAIRAGE_PANNEAU, "state"),
array(RDC_SDB_WC_ECLAIRAGE, "state_l1"),
);
*/
?>

View File

@ -0,0 +1,7 @@
<?php
// configuration of mysql server
$mysqlServer = "<server address>"; // Your production server
$username = "";
$passwd = "";
$database = "";
?>

View File

@ -0,0 +1,19 @@
<?php
/************************************************************************************/
/*edit this file for defining constants of devices */
/*e.g. */
/* $deviceTable = array( <ieeeAddress of device> => <name of the constant>, ...); */
/************************************************************************************/
$deviceTable = array(
//example: "0x00124b0022ebac5c" => "RDC_SALON_MVMT2",
);
foreach($deviceTable as $device => $name)
{
define($name, $device);
}
?>

View File

@ -0,0 +1,10 @@
<?php
// Liste of mac Addresses of persons
$macAddresses = array(
//example: "E8:78:29:C2:79:22" => "Daniel",
);
?>

View File

@ -0,0 +1,41 @@
<?php
// list of properties to log in database
// key is property name => value is % of difference with stocked value. if new value is stored if
// superior or inferior at value +/- x%
$properties2log = array(
"action" => null,
"state" =>null,
"contact" => null,
"temperature" => 0.5,
"local_temperature" => 0.5,
"state_l1" => null,
"state_l2" => null,
"current_heating_setpoint" => null,
"position" => null,
"pressure" => 10,
"occupancy" => null,
"illuminance_lux" => function($value) {$r = ($value < 500?50:$value*10/100); return $r;},
"requested_brightness_level" => function($value) {$r = ($value < 500?50:$value*10/100);return $r;},
"tempc" => 0.5,
"humidity" => 2,
"dewptc" => 0.5,
"windchillc" => 0.5,
"winddir" => 40,
"windspeedkmh" => 5,
"windgustkmh" => 5,
"rainin" => 0.5,
//"dailyrainin" => null,
//"weeklyrainin" => null,
//"monthlyrainin" => null,
//"yearlyrainin" => null,
"solarradiation" => 10,
"UV" => null,
"indoortempc" => 0.5,
"indoorhumidity" => 0.5,
"baromin" => 10,
"presence" => null,
"vibration" => null
);

View File

@ -0,0 +1,9 @@
<?php
$users = array(
//example: "Daniel",
)
?>