-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPRECONFIGURED_SCRIPT
More file actions
1 lines (1 loc) · 1.17 KB
/
Copy pathPRECONFIGURED_SCRIPT
File metadata and controls
1 lines (1 loc) · 1.17 KB
1
>D\ncv=0\nfm=0\nfh=-1\nfd=-1\npi=1\nm:ma=0 60\nm:ha=0 24\np:sc=0\np:lp=0\n>B\ncv=sc+(lp*0.001*pc[1])\n>S\ncv=sc+(lp*0.001*pc[1])\nif upsecs%60==0\nthen\n if ma[0]==0\n then pi=60\n else pi=ma[0]\n endif\n fm=(cv-ma[pi])*1000 \n if ma[pi]==0\n then fm=-1\n endif\n pi=ma[0]+1\n if pi>60\n then pi=1\n endif\n if ma[pi]==0\n then fh=-1\n else\n fh=(cv-ma[pi])*1000\n endif\n ma=cv\n print cv:%cv% ma[%0(ma[0]+1)%]:%0ma[ma[0]+1]% fm:%fm% fh:%fh% fd:%fd%\nendif\nif upsecs%3600==0\nthen\n pi=ha[0]+1\n if pi>24\n then pi=1\n endif\n if ha[pi]==0\n then fd=-1\n else\n fd=(cv-ha[pi])*1000\n endif\n ha=cv\nendif\nif chg[cv]>0\nor chg[fm]>0\nor chg[fh]>0\nor chg[fd]>0\nthen\n =>publish /%prefix3%/%topic%/SENSOR {\"reed\":{\"total\":%3cv%,\"flow60s\":%0fm%,\"flow60m\":%0fh%,\"flow24h\":%0fd%}}\nendif\n>E\n;cv=sc+(lp*0.001*pc[1])\n;print set:%cv%\n>W\n@<h2>Intitialwerte</h2>\nso(1)\nnm(0 100000 1 sc \"Zählerstand (m³) {m}\" 110 3)\nnm(1 20 1 lp \"Liter/Impuls \" 50 0)\n-----------------\n<h1><center>%3cv% m³</center></h1>\n-----------------\n<h2>Verbrauch</h2>\n60sec {m} %0fm% l/min\n60min {m} %0fh% l/h\n24hrs {m} %0fd% l/24h\n-----------------