hi,
i have the same problem.
I'm reading pressure and looking for shock waves. the sensor definitely picks some of them up but its not reflected in the graphs, not 1H, not 1Day, and not even when using a custom time frame around the specific event.
after getting the pressure i set 3 float read only THING variables to that value. Then check if the value is above a certain thresh hold. If it is i change a String Thing variable to reflect an alarm and the pressure value itself.
the 3 variables are set up in the advanced chart wiget to show Min, Max and Avg accordingly. the graphs are "Line" types, I'v also tried other types without success.
I've tried updating the variables "On change" and "Periodically" every 10 seconds.
i get pressure alarms via the String variable that don't show up on the graph.
Strangely they are not in the downloaded historic data as well.
I'm at UTC+2 and the data is in UTC so the 7.50 alarm at 6:58 AM is supposed to be at 4:58AM, but its not, there is actually no 7.5 in the whole file.
My code is here:
void loop() {
ArduinoCloud.update();
water_pressure = I2CWP.Get_WP();
kapush_wp_A = water_pressure;
kapush_wp_H = water_pressure;
kapush_wp_L = water_pressure;
check_pressure(water_pressure)
}
void check_pressure(float water_pressure){
if (water_pressure>H_Pressure_Alarm_Val){
H_Pressure_Alarm_Count++;
if(pressure_alarm==false){
H_Pressure_Alarm_time = millis();
conf = "******Pressure Alarm********\nPressure: " + String(water_pressure) +"\nAlarm at: "+String(H_Pressure_Alarm_Val);
}
pressure_alarm=true;
}
else if(pressure_alarm==true){
H_Pressure_Alarm_time = millis() - H_Pressure_Alarm_time;
pressure_alarm=false;
conf = "-----Pressure Alarm Resolved-----\nAlarm Count: "+ String(H_Pressure_Alarm_Count) +"\nAlarm Time: "+ getuptimestring(H_Pressure_Alarm_time) + "\nPressure: " + String(water_pressure) +"\nAlarm at: "+String(H_Pressure_Alarm_Val);
H_Pressure_Alarm_Count = 0;
}
check_pressure_log(water_pressure);
}
and the relevant THING properties are:
String conf;
float kapush_wp_A;
float kapush_wp_H;
float kapush_wp_L;
ArduinoCloud.addProperty(conf, READWRITE, ON_CHANGE, onConfChange);
ArduinoCloud.addProperty(kapush_wp_A, READ, 10 * SECONDS, NULL);
ArduinoCloud.addProperty(kapush_wp_H, READ, 10 * SECONDS, NULL);
ArduinoCloud.addProperty(kapush_wp_L, READ, 10 * SECONDS, NULL);
Any help will be apreciated
thanks