master
IoTcat 5 years ago
parent 62b6e28546
commit 01c0b114d2
  1. 2
      dist/server/Ls2.txt
  2. 1
      dist/server/Ls3.txt
  3. 1
      dist/server/R1.txt
  4. 1
      dist/server/R10.txt
  5. 1
      dist/server/R11.txt
  6. 1
      dist/server/R12.txt
  7. 1
      dist/server/R13.txt
  8. 1
      dist/server/R14.txt
  9. 1
      dist/server/R15.txt
  10. 1
      dist/server/R16.txt
  11. 1
      dist/server/R17.txt
  12. 1
      dist/server/R18.txt
  13. 1
      dist/server/R19.txt
  14. 1
      dist/server/R2.txt
  15. 1
      dist/server/R20.txt
  16. 1
      dist/server/R3.txt
  17. 1
      dist/server/R5.txt
  18. 1
      dist/server/R6.txt
  19. 1
      dist/server/R7.txt
  20. 1
      dist/server/R8.txt
  21. 1
      dist/server/R9.txt
  22. 2
      dist/server/Tp1.txt
  23. 2
      dist/server/cnt_dinnerRmNoPeople.txt
  24. 2
      dist/server/cnt_livingRmNoPeople.txt
  25. 2
      dist/server/data.php
  26. 11
      dist/server/getData.js
  27. 2
      dist/server/isLight.txt
  28. 2
      dist/server/lightVal.txt
  29. 2
      dist/server/on_w2.txt
  30. 2
      dist/server/pdata.txt
  31. 2
      dist/server/waterFlow2.txt

@ -1 +1 @@
410
330

@ -0,0 +1 @@
209

@ -0,0 +1 @@
0

@ -0,0 +1 @@
0

@ -0,0 +1 @@
1

@ -0,0 +1 @@
0

@ -0,0 +1 @@
0

@ -0,0 +1 @@
0

@ -0,0 +1 @@
0

@ -0,0 +1 @@
0

@ -0,0 +1 @@
0

@ -0,0 +1 @@
0

@ -0,0 +1 @@
0

@ -0,0 +1 @@
0

@ -0,0 +1 @@
0

@ -0,0 +1 @@
0

@ -0,0 +1 @@
0

@ -0,0 +1 @@
0

@ -0,0 +1 @@
0

@ -0,0 +1 @@
1

@ -0,0 +1 @@
0

@ -1 +1 @@
475
411

@ -64,4 +64,4 @@ $R18=file_get_contents('./R18.txt');
$R19=file_get_contents('./R19.txt');
$R20=file_get_contents('./R20.txt');
echo json_encode( array(dl=>$learn_count/100,temp=>substr(-file_get_contents('./Tp1.txt')*0.3+175,0,4),Ls2=>$Ls2,Ls3=>$Ls3,R1=>$R1,R2=>$R2,R3=>$R3,R4=>$R4,R5=>$R5,R6=>$R6,R7=>$R7,R8=>$R8,R9=>$R9,R10=>$R10,R11=>$R11,R12=>$R12,R13=>$R13,R14=>$R14,R15=>$R15,R16=>$R16,R17=>$R17,R18=>$R18,R19=>$R19,R20=>$R20,tW=>(file_get_contents('./is_add_water.txt')==0)?substr((file_get_contents('./waterFlow2.txt')-file_get_contents('./topW_start.txt')),0,5):substr((file_get_contents('./topW_end.txt')-file_get_contents('./topW_start.txt')),0,5),wF1=>file_get_contents('./waterFlow1.txt'),wF2=>file_get_contents('./waterFlow2.txt'),wS=>$wS,lS=>$lS,hP=>substr($pdata,0,1),dP=>substr($pdata,1,1),lP=>substr($pdata,2,1),kP=>substr($pdata,3,1)));
echo json_encode( array(dl=>$learn_count/100,temp=>substr(-file_get_contents('./Tp1.txt')*0.3+175,0,4),Ls2=>$Ls2,Ls3=>$Ls3,R1=>$R1,R2=>$R2,R3=>$R3,R4=>$R4,R5=>$R5,R6=>$R6,R7=>$R7,R8=>$R8,R9=>$R9,R10=>$R10,R11=>$R11,R12=>$R12,R13=>$R13,R14=>$R14,R15=>$R15,R16=>$R16,R17=>$R17,R18=>$R18,R19=>$R19,R20=>$R20,tW=>(file_get_contents('./is_add_water.txt')==0)?substr((file_get_contents('./waterFlow2.txt')-file_get_contents('./topW_start.txt')),0,5):substr((file_get_contents('./topW_end.txt')-file_get_contents('./topW_start.txt')),0,5),wF1=>file_get_contents('./node/data/w1InsFlow.txt'),wF2=>file_get_contents('./node/data/w2InsFlow.txt'),wS=>$wS,lS=>$lS,hP=>substr($pdata,0,1),dP=>substr($pdata,1,1),lP=>substr($pdata,2,1),kP=>substr($pdata,3,1)));

@ -97,8 +97,9 @@ function hallCtlData(){
};
if(on_hall)
var socket_hall = new WebSocket('ws://192.168.3.102:81');
else var socket_hall = new WebSocket('ws://192.168.3.1:81');
/* hall ctl */
@ -543,8 +544,8 @@ function log()
fs.closeSync(fd_l);
}
if(parseInt(fs.readFileSync('alert.txt'))) socket_lc.send('{"w-alert":1}');
else socket_lc.send('{"w-alert":0}');
//if(parseInt(fs.readFileSync('alert.txt'))) socket_lc.send('{"w-alert":1}');
//else socket_lc.send('{"w-alert":0}');
let fd_Tp1 = fs.openSync('Tp1.txt','w');
@ -665,7 +666,7 @@ function isLight()
if(d.getHours()==1) lightVal=0;
if(d.getHours()==1&&d.getMinutes()==1&&d.getSeconds()<10) {if(socket_hall)socket_hall.send('{"w-light":0}');if(socket_dc)socket_dc.send('{"w-light":0}');if(socket_lc)socket_lc.send('{"w-light":0}');if(socket_kc)socket_kc.send('{"w-light":0}');}
if(d.getHours()==8&&d.getMinutes()==1&&d.getSeconds()<10) {if(socket_hall)socket_hall.send('{"w-light":0}');if(socket_dc)socket_dc.send('{"w-light":0}');if(socket_lc)socket_lc.send('{"w-light":0}');if(socket_kc)socket_kc.send('{"w-light":0}');}
if(d.getHours()==5) lightVal=1;
//if(d.getHours()==5) lightVal=1;
let fd = fs.openSync('lightVal.txt','w');
@ -673,7 +674,7 @@ function isLight()
fs.closeSync(fd);
if(d.getHours()<1||(d.getHours()>5&&d.getHours()<7)||d.getHours()>17||lightVal==1) return 1;
if(d.getHours()<1/*||(d.getHours()>5&&d.getHours()<6)*/||d.getHours()>19||lightVal==1) return 1;
else return 0;
}

@ -1 +1 @@
1
0

@ -1 +1 @@
0111
0000

@ -1 +1 @@
1294.08
1294.33
Loading…
Cancel
Save