Permalink
Browse files

Small fixes

  • Loading branch information...
thesoultaker48 committed Aug 30, 2018
1 parent 92bc9a8 commit 05f60b8d0a5734f20f5f43ebfac0194b90c0c831
Showing with 2 additions and 7 deletions.
  1. +2 −1 modules/bluetoothdevices/bluetoothdevices.class.php
  2. +0 −6 scripts/cycle_bluetoothdevices.php
@@ -382,6 +382,7 @@ function install($parent_name='') {
// Uninstall
function uninstall() {
setGlobal('cycle_bluetoothdevicesControl', 'stop');
SQLExec("DELETE FROM `pvalues` WHERE `PROPERTY_ID` IN (SELECT `ID` FROM `properties` WHERE `OBJECT_ID` IN (SELECT `ID` FROM `objects` WHERE `CLASS_ID` = (SELECT `ID` FROM `classes` WHERE `TITLE` = '".$this->classname."')))");
SQLExec("DELETE FROM `history` WHERE `OBJECT_ID` IN (SELECT `ID` FROM `objects` WHERE `CLASS_ID` = (SELECT `ID` FROM `classes` WHERE `TITLE` = '".$this->classname."'))");
SQLExec("DELETE FROM `properties` WHERE `OBJECT_ID` IN (SELECT `ID` FROM `objects` WHERE `CLASS_ID` = (SELECT `ID` FROM `classes` WHERE `TITLE` = '".$this->classname."'))");
@@ -448,7 +449,7 @@ function dbInstall($data) {
$this->getConfig();
$this->config['scanMethod'] = 'discovery';
$this->config['scanInterval'] = 60; // 1 min
$this->config['scanTimeout'] = 15*60; // 15 min
$this->config['scanTimeout'] = 5*60; // 5 min
$this->config['resetInterval'] = 2*60*60; // 2 hrs
$this->saveConfig();
@@ -23,12 +23,6 @@
$bluetoothdevices_module = new bluetoothdevices();
$bluetoothdevices_module->getConfig();
/*
if(!getObjectsByClass($bluetoothdevices_module->classname)) {
exit; // no devices added -- no need to run this cycle
}
*/
echo 'Running bluetooth scanner'.PHP_EOL;
$scan_time = 0;

0 comments on commit 05f60b8

Please sign in to comment.