jomjol 4 лет назад
Родитель
Сommit
7ae08e572a

+ 28 - 0
Changelog.md

@@ -2,6 +2,34 @@
 
 
 
 
 
 
+
+
+##### 7.1.2 MQTT-Update - (2021-06-17)
+
+* NEW: 7.1.2: bug fix setting hostname, Flash-LED not off during rebootNEW: 7.1.1: bug fix wlan password with "="  (again)
+
+* MQTT error message: changes "no error", send retain flag
+
+* Update wlan handling to esp-idf 4.1
+
+* Upgrade digital CNN to v8.7.0  (added new images)
+
+* Bug fix: MQTT, WLAN, LED-Controll, GPIO usage, fixed IP, calculation flow rate
+
+  
+
+##### 7.0.1 MQTT-Update - (2021-05-13)
+
+* NEW: 7.0.1: bug fix wlan password with "=" 
+
+* Upgrade digital CNN to v8.5.0  (added new images)
+
+* New MQTT topics: flow rate (units/minute), time stamp (last correct read readout)
+
+* Update MQTT/Error topic to " " in case no error (instead of empty string)
+
+* Portrait or landscape image orientation in rotated image (avoid cropping)
+
 ##### 6.7.2 Image Processing in Memory - (2021-05-01)
 ##### 6.7.2 Image Processing in Memory - (2021-05-01)
 
 
 * NEW 6.7.2: Updated html for setup modus - remove reboot on edit configuration)
 * NEW 6.7.2: Updated html for setup modus - remove reboot on edit configuration)

+ 10 - 31
README.md

@@ -47,6 +47,12 @@ In other cases you can contact the developer via email: <img src="https://raw.gi
 
 
 
 
 
 
+##### 8.2.0 - Multi Meter Support (2021-08-24)
+
+* Improve server responsiveness
+* Flow status and prevalue status in overview
+* Improved prevalue handling 
+
 ##### 8.1.0 - Multi Meter Support (2021-08-12)
 ##### 8.1.0 - Multi Meter Support (2021-08-12)
 
 
 * GPIO: using the general mqtt main topic for GPIO
 * GPIO: using the general mqtt main topic for GPIO
@@ -71,32 +77,6 @@ In other cases you can contact the developer via email: <img src="https://raw.gi
 <span style="color: red;">**ATTENTION: the configuration and prevalue files are modified automatically and will not be backward compatible!**</span> 
 <span style="color: red;">**ATTENTION: the configuration and prevalue files are modified automatically and will not be backward compatible!**</span> 
 
 
 
 
-
-##### 7.1.2 MQTT-Update - (2021-06-17)
-
-* NEW: 7.1.2: bug fix setting hostname, Flash-LED not off during rebootNEW: 7.1.1: bug fix wlan password with "="  (again)
-* MQTT error message: changes "no error", send retain flag
-* Update wlan handling to esp-idf 4.1
-* Upgrade digital CNN to v8.7.0  (added new images)
-* Bug fix: MQTT, WLAN, LED-Controll, GPIO usage, fixed IP, calculation flow rate
-
-  
-
-##### 7.0.1 MQTT-Update - (2021-05-13)
-
-* NEW: 7.0.1: bug fix wlan password with "=" 
-
-* Upgrade digital CNN to v8.5.0  (added new images)
-
-* New MQTT topics: flow rate (units/minute), time stamp (last correct read readout)
-
-* Update MQTT/Error topic to " " in case no error (instead of empty string)
-
-* Portrait or landscape image orientation in rotated image (avoid cropping)
-
-  
-
-
 ## Additional ideas
 ## Additional ideas
 
 
 There are some ideas and feature request, which are not followed currently - mainly due to capacity reasons on side of the developer. They are collected here: [FeatureRequest.md](FeatureRequest.md)
 There are some ideas and feature request, which are not followed currently - mainly due to capacity reasons on side of the developer. They are collected here: [FeatureRequest.md](FeatureRequest.md)
@@ -107,6 +87,10 @@ There are some ideas and feature request, which are not followed currently - mai
 
 
 ## History
 ## History
 
 
+##### 7.1.2 MQTT-Update - (2021-06-17)
+
+**7.0.1 MQTT-Update - (2021-05-13)**
+
 ##### 6.7.2 Image Processing in Memory - (2021-05-01)
 ##### 6.7.2 Image Processing in Memory - (2021-05-01)
 
 
 ##### 5.0.0 Setup Modus - (2020-12-06)
 ##### 5.0.0 Setup Modus - (2020-12-06)
@@ -129,8 +113,3 @@ There are some ideas and feature request, which are not followed currently - mai
 
 
 #### [Full Changelog](Changelog.md)
 #### [Full Changelog](Changelog.md)
 
 
-
-
-## Solved topics
-
-* n.a.

+ 55 - 24
code/components/jomjol_flowcontroll/ClassFlowControll.cpp

@@ -12,6 +12,9 @@
 #include "Helper.h"
 #include "Helper.h"
 #include "server_ota.h"
 #include "server_ota.h"
 
 
+
+//#include "CImg.h"
+
 #include "server_help.h"
 #include "server_help.h"
 
 
 //#define DEBUG_DETAIL_ON  
 //#define DEBUG_DETAIL_ON  
@@ -51,6 +54,25 @@ std::string ClassFlowControll::doSingleStep(std::string _stepname, std::string _
     return result;
     return result;
 }
 }
 
 
+std::string ClassFlowControll::TranslateAktstatus(std::string _input)
+{
+    if (_input.compare("ClassFlowMakeImage") == 0)
+        return ("Take Image");
+    if (_input.compare("ClassFlowAlignment") == 0)
+        return ("Aligning");
+    if (_input.compare("ClassFlowAnalog") == 0)
+        return ("Analog ROIs");
+    if (_input.compare("ClassFlowDigit") == 0)
+        return ("Digital ROIs");
+    if (_input.compare("ClassFlowMQTT") == 0)
+        return ("Sending MQTT");
+    if (_input.compare("ClassFlowPostProcessing") == 0)
+        return ("Processing");
+
+    return "Unkown Status";
+}
+
+
 std::vector<HTMLInfo*> ClassFlowControll::GetAllDigital()
 std::vector<HTMLInfo*> ClassFlowControll::GetAllDigital()
 {
 {
     for (int i = 0; i < FlowControll.size(); ++i)
     for (int i = 0; i < FlowControll.size(); ++i)
@@ -95,7 +117,7 @@ void ClassFlowControll::SetInitialParameter(void)
     flowpostprocessing = NULL;
     flowpostprocessing = NULL;
     disabled = false;
     disabled = false;
     aktRunNr = 0;
     aktRunNr = 0;
-    aktstatus = "Startup";
+    aktstatus = "Booting ...";
 
 
 }
 }
 
 
@@ -209,9 +231,9 @@ void ClassFlowControll::doFlowMakeImageOnly(string time){
     for (int i = 0; i < FlowControll.size(); ++i)
     for (int i = 0; i < FlowControll.size(); ++i)
     {
     {
         if (FlowControll[i]->name() == "ClassFlowMakeImage") {
         if (FlowControll[i]->name() == "ClassFlowMakeImage") {
-            zw_time = gettimestring("%Y%m%d-%H%M%S");
-            aktstatus = zw_time + ": " + FlowControll[i]->name();
-            string zw = "FlowControll.doFlowMakeImageOnly - " + FlowControll[i]->name();
+//            zw_time = gettimestring("%Y%m%d-%H%M%S");
+            zw_time = gettimestring("%H:%M:%S");
+            aktstatus = TranslateAktstatus(FlowControll[i]->name()) + " (" + zw_time + ")";
             FlowControll[i]->doFlow(time);
             FlowControll[i]->doFlow(time);
         }
         }
     }
     }
@@ -231,8 +253,11 @@ bool ClassFlowControll::doFlow(string time)
 
 
     for (int i = 0; i < FlowControll.size(); ++i)
     for (int i = 0; i < FlowControll.size(); ++i)
     {
     {
-        zw_time = gettimestring("%Y%m%d-%H%M%S");
-        aktstatus = zw_time + ": " + FlowControll[i]->name();
+        zw_time = gettimestring("%H:%M:%S");
+        aktstatus = TranslateAktstatus(FlowControll[i]->name()) + "(" + zw_time + ")";
+
+//        zw_time = gettimestring("%Y%m%d-%H%M%S");
+//        aktstatus = zw_time + ": " + FlowControll[i]->name();
         
         
        
        
         string zw = "FlowControll.doFlow - " + FlowControll[i]->name();
         string zw = "FlowControll.doFlow - " + FlowControll[i]->name();
@@ -259,25 +284,11 @@ bool ClassFlowControll::doFlow(string time)
 #endif
 #endif
 
 
     }
     }
-    zw_time = gettimestring("%Y%m%d-%H%M%S");    
-    aktstatus = zw_time + ": Flow is done";
+    zw_time = gettimestring("%H:%M:%S");
+    aktstatus = "Flow finished (" + zw_time + ")";
     return result;
     return result;
 }
 }
 
 
-void ClassFlowControll::UpdateAktStatus(std::string _flow)
-{
-    aktstatus = gettimestring("%Y%m%d-%H%M%S");
-    aktstatus = aktstatus + "\t" + std::to_string(aktRunNr) + "\t";
-    
-    if (_flow == "ClassFlowMakeImage")
-        aktstatus = aktstatus + "Taking Raw Image";
-    else
-        if (_flow == "ClassFlowAlignment")
-            aktstatus = aktstatus + "Aligning Image";
-
-
-}
-
 
 
 string ClassFlowControll::getReadoutAll(int _type)
 string ClassFlowControll::getReadoutAll(int _type)
 {
 {
@@ -289,10 +300,18 @@ string ClassFlowControll::getReadoutAll(int _type)
         out = out + numbers[i]->name + "\t";
         out = out + numbers[i]->name + "\t";
         switch (_type) {
         switch (_type) {
             case READOUT_TYPE_VALUE:
             case READOUT_TYPE_VALUE:
-                out = out + numbers[i]->ReturnValue;
+                out = out + numbers[i]->ReturnValueNoError;
                 break;
                 break;
             case READOUT_TYPE_PREVALUE:
             case READOUT_TYPE_PREVALUE:
-                out = out + numbers[i]->ReturnPreValue;
+                if (flowpostprocessing->PreValueUse)
+                {
+                    if (numbers[i]->PreValueOkay)
+                        out = out + numbers[i]->ReturnPreValue;
+                    else
+                        out = out + "PreValue too old";                
+                }
+                else
+                    out = out + "PreValue deactivated";
                 break;
                 break;
             case READOUT_TYPE_RAWVALUE:
             case READOUT_TYPE_RAWVALUE:
                 out = out + numbers[i]->ReturnRawValue;
                 out = out + numbers[i]->ReturnRawValue;
@@ -523,6 +542,18 @@ esp_err_t ClassFlowControll::GetJPGStream(std::string _fn, httpd_req_t *req)
         flowalignment->DrawRef(_imgzw);
         flowalignment->DrawRef(_imgzw);
         if (flowdigit) flowdigit->DrawROI(_imgzw);
         if (flowdigit) flowdigit->DrawROI(_imgzw);
         if (flowanalog) flowanalog->DrawROI(_imgzw);
         if (flowanalog) flowanalog->DrawROI(_imgzw);
+
+/*/////////////////////////////////////        
+        cimg_library::CImg<unsigned char> cimg(_imgzw->rgb_image, _imgzw->bpp, _imgzw->width, _imgzw->height, 1);
+    
+        //Convert cimg type
+//        cimg.permute_axes("yzcx");
+        cimg.draw_text(300, 300, "Dies ist ein Test", "black");
+
+        
+        //Convert back to stb type to save
+//        cimg.permute_axes("cxyz");
+*////////////////////////////////////
         _send = _imgzw;
         _send = _imgzw;
         Dodelete = true;
         Dodelete = true;
     }
     }

+ 2 - 2
code/components/jomjol_flowcontroll/ClassFlowControll.h

@@ -36,8 +36,6 @@ protected:
 	std::string aktstatus;
 	std::string aktstatus;
 	int aktRunNr;
 	int aktRunNr;
 
 
-	void UpdateAktStatus(std::string _flow);
-
 public:
 public:
 	void InitFlow(std::string config);
 	void InitFlow(std::string config);
 	bool doFlow(string time);
 	bool doFlow(string time);
@@ -49,6 +47,8 @@ public:
 	string GetPrevalue(std::string _number = "");	
 	string GetPrevalue(std::string _number = "");	
 	bool ReadParameter(FILE* pfile, string& aktparamgraph);	
 	bool ReadParameter(FILE* pfile, string& aktparamgraph);	
 
 
+	string TranslateAktstatus(std::string _input);
+
 	string GetMQTTMainTopic();
 	string GetMQTTMainTopic();
 
 
 	esp_err_t GetJPGStream(std::string _fn, httpd_req_t *req);
 	esp_err_t GetJPGStream(std::string _fn, httpd_req_t *req);

+ 19 - 1
code/components/jomjol_flowcontroll/ClassFlowDigit.cpp

@@ -28,6 +28,7 @@ void ClassFlowDigit::SetInitialParameter(void)
     disabled = false;
     disabled = false;
     DecimalShift = 0;
     DecimalShift = 0;
     DecimalShiftEnabled = false;
     DecimalShiftEnabled = false;
+    isLogImageSelect = false;
 }    
 }    
 
 
 ClassFlowDigit::ClassFlowDigit() : ClassFlowImage(TAG)
 ClassFlowDigit::ClassFlowDigit() : ClassFlowImage(TAG)
@@ -119,6 +120,13 @@ bool ClassFlowDigit::ReadParameter(FILE* pfile, string& aktparamgraph)
             LogImageLocation = "/sdcard" + zerlegt[1];
             LogImageLocation = "/sdcard" + zerlegt[1];
             isLogImage = true;            
             isLogImage = true;            
         }
         }
+
+        if ((zerlegt[0] == "LogImageSelect") && (zerlegt.size() > 1))
+        {
+            LogImageSelect = zerlegt[1];
+            isLogImageSelect = true;            
+        }
+
         if ((zerlegt[0] == "Model") && (zerlegt.size() > 1))
         if ((zerlegt[0] == "Model") && (zerlegt.size() > 1))
         {
         {
             cnnmodelfile = zerlegt[1];
             cnnmodelfile = zerlegt[1];
@@ -328,7 +336,17 @@ bool ClassFlowDigit::doNeuralNetwork(string time)
 
 
             if (isLogImage)
             if (isLogImage)
             {
             {
-                LogImage(logPath, DIGIT[_dig]->ROI[i]->name, NULL, &DIGIT[_dig]->ROI[i]->resultklasse, time, DIGIT[_dig]->ROI[i]->image_org);
+                if (isLogImageSelect)
+                {
+                    if (LogImageSelect.find(DIGIT[_dig]->ROI[i]->name) != std::string::npos)
+                    {
+                        LogImage(logPath, DIGIT[_dig]->ROI[i]->name, NULL, &DIGIT[_dig]->ROI[i]->resultklasse, time, DIGIT[_dig]->ROI[i]->image_org);
+                    }
+                }
+                else
+                {
+                    LogImage(logPath, DIGIT[_dig]->ROI[i]->name, NULL, &DIGIT[_dig]->ROI[i]->resultklasse, time, DIGIT[_dig]->ROI[i]->image_org);
+                }
             }
             }
         }
         }
 #ifndef OHNETFLITE
 #ifndef OHNETFLITE

+ 3 - 0
code/components/jomjol_flowcontroll/ClassFlowDigit.h

@@ -33,6 +33,9 @@ protected:
     int DecimalShift;
     int DecimalShift;
     bool DecimalShiftEnabled;
     bool DecimalShiftEnabled;
 
 
+    bool isLogImageSelect;
+    string LogImageSelect;
+
 
 
     ClassFlowAlignment* flowpostalignment;
     ClassFlowAlignment* flowpostalignment;
  
  

+ 2 - 1
code/components/jomjol_flowcontroll/ClassFlowPostProcessing.h

@@ -51,7 +51,6 @@ protected:
     std::vector<NumberPost*> NUMBERS;
     std::vector<NumberPost*> NUMBERS;
     bool UpdatePreValueINI;
     bool UpdatePreValueINI;
 
 
-    bool PreValueUse;
     int PreValueAgeStartup; 
     int PreValueAgeStartup; 
     bool ErrorMessage;
     bool ErrorMessage;
 
 
@@ -77,6 +76,8 @@ protected:
 
 
 
 
 public:
 public:
+    bool PreValueUse;
+
     ClassFlowPostProcessing(std::vector<ClassFlow*>* lfc);
     ClassFlowPostProcessing(std::vector<ClassFlow*>* lfc);
     bool ReadParameter(FILE* pfile, string& aktparamgraph);
     bool ReadParameter(FILE* pfile, string& aktparamgraph);
     bool doFlow(string time);
     bool doFlow(string time);

+ 1 - 0
code/components/jomjol_tfliteclass/CTfLiteClass.cpp

@@ -17,6 +17,7 @@ float CTfLiteClass::GetOutputValue(int nr)
     return output2->data.f[nr];
     return output2->data.f[nr];
 }
 }
 
 
+
 int CTfLiteClass::GetClassFromImageBasis(CImageBasis *rs)
 int CTfLiteClass::GetClassFromImageBasis(CImageBasis *rs)
 {
 {
     if (!LoadInputImageBasis(rs))
     if (!LoadInputImageBasis(rs))

+ 1 - 0
code/components/jomjol_tfliteclass/CTfLiteClass.h

@@ -64,6 +64,7 @@ class CTfLiteClass
         void GetOutPut();
         void GetOutPut();
         int GetOutClassification();
         int GetOutClassification();
         int GetClassFromImageBasis(CImageBasis *rs);
         int GetClassFromImageBasis(CImageBasis *rs);
+        std::string GetStatusFlow();
 
 
         float GetOutputValue(int nr);
         float GetOutputValue(int nr);
         void GetInputDimension(bool silent);
         void GetInputDimension(bool silent);

+ 34 - 0
code/components/jomjol_tfliteclass/server_tflite.cpp

@@ -530,6 +530,36 @@ esp_err_t handler_editflow(httpd_req_t *req)
 };
 };
 
 
 
 
+esp_err_t handler_statusflow(httpd_req_t *req)
+{
+#ifdef DEBUG_DETAIL_ON       
+    LogFile.WriteHeapInfo("handler_prevalue - Start");       
+#endif
+
+    const char* resp_str;
+    string zw;
+
+#ifdef DEBUG_DETAIL_ON       
+    printf("handler_prevalue:\n"); printf(req->uri); printf("\n");
+#endif
+
+    zw = tfliteflow.getActStatus();
+    
+    resp_str = zw.c_str();
+
+    httpd_resp_set_hdr(req, "Access-Control-Allow-Origin", "*");
+    httpd_resp_send(req, resp_str, strlen(resp_str));   
+    /* Respond with an empty chunk to signal HTTP response completion */
+    httpd_resp_send_chunk(req, NULL, 0);      
+
+#ifdef DEBUG_DETAIL_ON       
+    LogFile.WriteHeapInfo("handler_prevalue - Start");       
+#endif
+
+    return ESP_OK;
+};
+
+
 esp_err_t handler_prevalue(httpd_req_t *req)
 esp_err_t handler_prevalue(httpd_req_t *req)
 {
 {
 #ifdef DEBUG_DETAIL_ON       
 #ifdef DEBUG_DETAIL_ON       
@@ -684,6 +714,10 @@ void register_server_tflite_uri(httpd_handle_t server)
     camuri.user_ctx  = (void*) "Light Off"; 
     camuri.user_ctx  = (void*) "Light Off"; 
     httpd_register_uri_handler(server, &camuri);  
     httpd_register_uri_handler(server, &camuri);  
 
 
+    camuri.uri       = "/statusflow.html";
+    camuri.handler   = handler_statusflow;
+    camuri.user_ctx  = (void*) "Light Off"; 
+    httpd_register_uri_handler(server, &camuri);  
     
     
     camuri.uri       = "/editflow.html";
     camuri.uri       = "/editflow.html";
     camuri.handler   = handler_editflow;
     camuri.handler   = handler_editflow;

+ 11 - 1
code/main/server_main.cpp

@@ -131,6 +131,16 @@ esp_err_t info_get_handler(httpd_req_t *req)
         return ESP_OK;        
         return ESP_OK;        
     }
     }
 
 
+    if (_task.compare("FlowStatus") == 0)
+    {
+        std::string zw;
+        zw = std::string("FlowStatus");
+        httpd_resp_sendstr_chunk(req, zw.c_str());
+        httpd_resp_sendstr_chunk(req, NULL);  
+        return ESP_OK;        
+    }
+
+
 #ifdef DEBUG_DETAIL_ON      
 #ifdef DEBUG_DETAIL_ON      
     LogFile.WriteHeapInfo("info_get_handler - Done"); 
     LogFile.WriteHeapInfo("info_get_handler - Done"); 
 #endif   
 #endif   
@@ -398,7 +408,7 @@ httpd_handle_t start_webserver(void)
     config.max_uri_handlers   = 24;                       
     config.max_uri_handlers   = 24;                       
     config.max_resp_headers   = 8;                        
     config.max_resp_headers   = 8;                        
     config.backlog_conn       = 5;                        
     config.backlog_conn       = 5;                        
-    config.lru_purge_enable   = false;                    
+    config.lru_purge_enable   = true;       // dadurch werden alter Verbindungen gekappt, falls neue benögt werden.               
     config.recv_wait_timeout  = 30;         // default: 5                       
     config.recv_wait_timeout  = 30;         // default: 5                       
     config.send_wait_timeout  = 30;         // default: 5                        
     config.send_wait_timeout  = 30;         // default: 5                        
     config.global_user_ctx = NULL;                        
     config.global_user_ctx = NULL;                        

+ 3 - 3
code/main/version.cpp

@@ -1,4 +1,4 @@
-const char* GIT_REV="f6b1a41";
+const char* GIT_REV="0dac0e8";
 const char* GIT_TAG="";
 const char* GIT_TAG="";
-const char* GIT_BRANCH="master";
-const char* BUILD_TIME="2021-08-12 07:22";
+const char* GIT_BRANCH="rolling";
+const char* BUILD_TIME="2021-08-24 08:31";

+ 1 - 1
code/main/version.h

@@ -13,7 +13,7 @@ extern "C"
 #include "Helper.h"
 #include "Helper.h"
 #include <fstream>
 #include <fstream>
 
 
-const char* GIT_BASE_BRANCH = "master - v8.1.0 - 2021-08-12";
+const char* GIT_BASE_BRANCH = "master - v8.2.0 - 2021-08-24";
 
 
 
 
 const char* git_base_branch(void)
 const char* git_base_branch(void)

+ 3 - 3
code/version.cpp

@@ -1,4 +1,4 @@
-const char* GIT_REV="f6b1a41";
+const char* GIT_REV="0dac0e8";
 const char* GIT_TAG="";
 const char* GIT_TAG="";
-const char* GIT_BRANCH="master";
-const char* BUILD_TIME="2021-08-12 07:22";
+const char* GIT_BRANCH="rolling";
+const char* BUILD_TIME="2021-08-24 08:31";

BIN
firmware/bootloader.bin


BIN
firmware/firmware.bin


BIN
firmware/html.zip


+ 1 - 1
sd-card/html/gethost.js

@@ -9,7 +9,7 @@ function getbasepath(){
     {
     {
 //        host = "http://192.168.2.219";          // jomjol interner test
 //        host = "http://192.168.2.219";          // jomjol interner test
 //        host = "http://192.168.178.46";          // jomjol interner test
 //        host = "http://192.168.178.46";          // jomjol interner test
-        host = "http://192.168.178.22";          // jomjol interner Real
+        host = "http://192.168.178.64";          // jomjol interner Real
 //        host = "http://192.168.43.191";
 //        host = "http://192.168.43.191";
 //        host = ".";                           // jomjol interner localhost   
 //        host = ".";                           // jomjol interner localhost   
 
 

+ 1 - 1
sd-card/html/version.txt

@@ -1 +1 @@
-9.6.0
+9.7.0

+ 21 - 3
sd-card/html/wasserzaehler_roi.html

@@ -55,12 +55,11 @@
   <tr>	
   <tr>	
     <td class="tg-3">
     <td class="tg-3">
 	<div id="timestamp" ></div>	
 	<div id="timestamp" ></div>	
+	<div id="statusflow" ></div>	
 	</td>	
 	</td>	
   </tr>    
   </tr>    
 </table>
 </table>
 
 
-</body>
-</html>
 
 
 <script src="/jquery-3.6.0.min.js"></script>
 <script src="/jquery-3.6.0.min.js"></script>
 <script type="text/javascript" src="./gethost.js"></script> 
 <script type="text/javascript" src="./gethost.js"></script> 
@@ -82,10 +81,11 @@ function addZero(i) {
 
 
 	$('#img').html('<img src="/img_tmp/alg_roi.jpg" style="max-height:555px; display:block; margin-left:auto;  margin-right:auto;"></img>');
 	$('#img').html('<img src="/img_tmp/alg_roi.jpg" style="max-height:555px; display:block; margin-left:auto;  margin-right:auto;"></img>');
 	$('#timestamp').html("Last Page Refresh:" + (h + ":" + m + ":" + s));
 	$('#timestamp').html("Last Page Refresh:" + (h + ":" + m + ":" + s));
+	loadStatus();
 	refresh();
 	refresh();
 	});
 	});
 
 
-	function refresh() {
+function refresh() {
 	setTimeout (function() {
 	setTimeout (function() {
 	var time = new Date();
 	var time = new Date();
 	var timestamp = new Date().getTime();
 	var timestamp = new Date().getTime();
@@ -96,6 +96,7 @@ function addZero(i) {
 	// reassign the url to be like alg_roi.jpg?timestamp=456784512 based on timestamp
 	// reassign the url to be like alg_roi.jpg?timestamp=456784512 based on timestamp
 	$('#img').html('<img src="/img_tmp/alg_roi.jpg?timestamp='+ timestamp +'"max-height:555px; display:block; margin-left:auto;  margin-right:auto;"></img>');
 	$('#img').html('<img src="/img_tmp/alg_roi.jpg?timestamp='+ timestamp +'"max-height:555px; display:block; margin-left:auto;  margin-right:auto;"></img>');
 	$('#timestamp').html("Last Page Refresh:" + (h + ":" + m + ":" + s));
 	$('#timestamp').html("Last Page Refresh:" + (h + ":" + m + ":" + s));
+	loadStatus();
 	init();
 	init();
 	  refresh();
 	  refresh();
 	}, 300000);
 	}, 300000);
@@ -104,6 +105,20 @@ function addZero(i) {
 
 
 	var basepath = "http://192.168.178.22"; 
 	var basepath = "http://192.168.178.22"; 
 
 
+	function loadStatus() {
+		url = basepath + '/statusflow.html';     
+		var xhttp = new XMLHttpRequest();
+		xhttp.onreadystatechange = function() {
+			if (this.readyState == 4 && this.status == 200) {
+				var _rsp = xhttp.responseText;
+				_rsp = "Status: " + _rsp;
+				$('#statusflow').html(_rsp);
+			}
+		}
+		xhttp.open("GET", url, true);
+		xhttp.send();		
+	}
+
 	function loadValue(_type, _div, _style) {
 	function loadValue(_type, _div, _style) {
 		url = basepath + '/wasserzaehler.html?all=true&type=' + _type;     
 		url = basepath + '/wasserzaehler.html?all=true&type=' + _type;     
 		var xhttp = new XMLHttpRequest();
 		var xhttp = new XMLHttpRequest();
@@ -150,8 +165,11 @@ function addZero(i) {
 		loadValue("raw", "raw");
 		loadValue("raw", "raw");
 		loadValue("prevalue", "prevalue");
 		loadValue("prevalue", "prevalue");
 		loadValue("error", "error", "font-size:8px");
 		loadValue("error", "error", "font-size:8px");
+		loadStatus();
 	}
 	}
 
 
 	init();
 	init();
 
 
 </script>
 </script>
+</body>
+</html>