airgradienthq / arduino

Other
199 stars 106 forks source link

Timeout handling #192

Open airgradienthq opened 2 months ago

airgradienthq commented 2 months ago

@pnt325 How does the current firmware handle a time out after a post request to the AirGradient server? Do you show any error message / LED? If so immediately or after a number of fails?

pnt325 commented 1 month ago

@airgradienthq Currently there are no indicate if post failed.

airgradienthq commented 1 month ago

We have irregular cases where the monitor is showing an error but it recovers very quickly. How often do you retry the request before showing an error?

pnt325 commented 1 month ago

@airgradienthq The sensor S8 and PMS5003 has check number of failed times to set sensor failed(invalid value). The server post failed without any count before show status on display, it's update as the display update period 2500ms.

Could you please details what is the error?

airgradienthq commented 3 weeks ago

@pnt325 I do not understand your comment. Please rephrase or use translation software.

pnt325 commented 3 weeks ago

We have irregular cases where the monitor is showing an error but it recovers very quickly. How often do you retry the request before showing an error?

S8 and PMS5003/PMS5003T has check number of failed time before response the invalid value storage on Measurements. The value sync to cloud or screen is get from Measurements

S8 sensor

https://github.com/airgradienthq/arduino/blob/6c1c9147164459bae8e1a4ffd3ea63de6d46ae04/examples/OneOpenAir/OneOpenAir.ino#L318-L331

PMS5003 sensor

https://github.com/airgradienthq/arduino/blob/6c1c9147164459bae8e1a4ffd3ea63de6d46ae04/examples/OneOpenAir/OneOpenAir.ino#L1007-L1028