1
0
moha/config/properties2log.php
2022-05-29 01:55:22 +02:00

43 lines
1.1 KiB
PHP

<?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(
"availability" => null,
"action" => null,
"state" =>null,
"contact" => null,
"temperature" => 0.5,
"local_temperature" => 0.5,
"state_l1" => null,
"state_l2" => null,
"humidity" => 0.9,
"current_heating_setpoint" => null,
"position" => null,
"pressure" => 10,
"occupancy" => null,
"illuminance_lux" => function($value) {$r = ($value < 500?50:$value*10/100); return $r;},
// "illuminance" => 8,
"requested_brightness_level" => function($value) {$r = ($value < 500?50:$value*10/100);return $r;},
"tempc" => 0.5,
"humidity" => 1,
"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
);