Skip to content

Commit

Permalink
Update rtl433.class.php
Browse files Browse the repository at this point in the history
  • Loading branch information
directman66 committed Dec 13, 2018
1 parent 7ba7d54 commit 1598193
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions modules/rtl433/rtl433.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -378,13 +378,14 @@ function start() {
//вариант через файл и tail
//$cmd="$rtlpath/rtl_433 $parametrs -f 433920000 -s 250000 -F json -W ".ROOT."cms/cached/rtl433";
unlink(ROOT."cms/cached/rtl433");
$cmd="$rtlpath/rtl_433 $parametrs -f 433920000 -s 250000 -F json >".ROOT."cms/cached/rtl433";
//echo $cmd;
$cmd="sudo $rtlpath/rtl_433 $parametrs -f 433920000 -s 250000 -F json >".ROOT."cms/cached/rtl433";
//$cmd="rtl_433 $parametrs -f 433920000 -s 250000 -F json >".ROOT."cms/cached/rtl433";
echo $cmd;

//$cmd='rtl_433 -f 433920000 -s 250000 -F json|mosquitto_pub -h localhost -t /home/rtl_433 -l';
//$answ=shell_exec($cmd);
$answ=exec($cmd ." 2>&1 &");

echo $answ;
SQLexec("update rtl433_config set VALUE='$answ' where parametr='WORK'");
//echo $answ;

Expand Down Expand Up @@ -687,6 +688,9 @@ function dbInstall($data = '') {


//////////
$par1=SQLSelectOne ("select * from rtl433_devicelist where ID=1");

if (!$par1['ID']) {
$par1['ID'] = 1;
$par1['ENABLE'] = 1;
$par1['NAME'] = "Silvercrest Remote Control";
Expand Down Expand Up @@ -1239,7 +1243,7 @@ function dbInstall($data = '') {
SQLInsert('rtl433_devicelist', $par1);



}


}
Expand Down

0 comments on commit 1598193

Please sign in to comment.