AirGradient Forum

AG Server N/A showing up

Hello,
My indoor device has recently started displaying “AG Server N/A”. I connected a USB cable to my computer and dumped some logs.

Here are some snippets:

[365584][E][WiFiClientSecure.cpp:144] connect(): start_ssl_client: -1
[ApiClient] Info: POST: https://hw.airgradient.com/sensors/airgradient:744dbdc12368/measures
[ApiClient] Info: Return code: -1
[ApiClient] Error: Post response failed code: -1
Detected ONE_INDOOR
[OledDisplay] Info: begin
Firmware Version: 3.1.21
LED bar brightness: 100
Init SGP41 success
initializing PM sensor
cleared 0 byte(s)
setting active mode
7 byte(s) written
Set S8 AbcDays successful
[ApiClient] Info: Init apiRoot: https://hw.airgradient.com
[ApiClient] Info: begin
*wm:AutoConnect 
*wm:Connecting to SAVED AP: SmellNET
*wm:AutoConnect: SUCCESS 
*wm:STA IP Address:
[WifiConnector] Info: Wait for configure portal
[WifiConnector] Info: WiFi Connected: SmellNET IP: 0.0.0.0
[LocalServer] Info: Init: airgradient_744dbdc12368.local
MQTT is not configured, skipping initialization of MQTT client

---- PAYLOAD
 {"pm01":0,"pm02":0,"pm10":0,"pm01Standard":0,"pm02Standard":0,"pm10Standard":0,"pm003Count":0,"pm005Count":0,"pm01Count":0,"pm02Count":0,"atmp":0,"atmpCompensated":0,"rhum":0,"rhumCompensated":0,"pm02Compensated":0,"rco2":0,"tvocIndex":0,"tvocRaw":0,"noxIndex":0,"noxRaw":0,"boot":0,"bootCount":0,"wifi":-45,"ledMode":"pm","serialno":"744dbdc12368","firmware":"3.1.21","model":"I-9PSL"} 
-----
[ApiClient] Info: POST: https://hw.airgradient.com/sensors/airgradient:744dbdc12368/measures
[ApiClient] Info: Return code: -11
[ApiClient] Error: Post response failed code: -11

firmwareCheckForUpdate:
firmwareCheckForUpdate: Perform
checking for new OTA update @ https://hw.airgradient.com/sensors/airgradient:744dbdc12368/generic/os/firmware.bin?current_firmware=3.1.21
E (43230) TRANSPORT_BASE: Failed to open a new connection
E (43232) HTTP_CLIENT: Connection failed, sock < 0
Failed to open HTTP connection: ESP_ERR_HTTP_CONNECT
2
OTA message: 

[ApiClient] Warning: Ignore fetch server configuration
LED bar brightness: 100
Display brightness: 100
[OledDisplay] Info: Show status: AG Server N/A
[OledDisplay] Info: Show status: AG Server N/A
[ApiClient] Info: Init apiRoot: http://hw.airgradient.com
[ApiClient] Info: begin
*wm:AutoConnect 
*wm:Connecting to SAVED AP: SmellNET
*wm:[ERROR] wifi begin failed 
*wm:AutoConnect: SUCCESS 
*wm:STA IP Address: 10.0.0.136
[WifiConnector] Info: Wait for configure portal
[WifiConnector] Info: WiFi Connected: SmellNET IP: 10.0.0.136
[LocalServer] Info: Init: airgradient_744dbdc12368.local
MQTT is not configured, skipping initialization of MQTT client
[ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:744dbdc12368/measures
[ApiClient] Info: Return code: 200

firmwareCheckForUpdate:
firmwareCheckForUpdate: Perform
checking for new OTA update @ http://hw.airgradient.com/sensors/airgradient:744dbdc12368/generic/os/firmware.bin?current_firmware=3.1.13
Starting OTA update ...
Writing to partition subtype 17 at offset 0x1f0000
File size: 1408496 bytes
OTA message: 
OTA message: 0
OTA message: 0
OTA message: 0
OTA message: 100
Connection closed, all data received
# of bytes written: 10927
E (59894) esp_image: invalid segment length 0xffffffff
Error: esp_ota_end failed! err=0x5379. Image is invalid2
OTA message: 

[ApiClient] Warning: Ignore fetch server configuration
LED bar brightness: 100
Display brightness: 100
...
[ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:744dbdc12368/measures
[ApiClient] Info: Return code: -11
[ApiClient] Error: Post response failed code: -11

I thought I was failing to connect to the WiFi, but I can actually ping the device, so it seems WiFi is working. Anything I can try?

Thanks!

Using HA I disabled publishing to the AirGradient servers. The screen on the sensor now looks normal.
How do I disable the Offline Sensors Notification emails I’m getting from AirGradient? I don’t have any explicit offline alarms setup when I navigate to AirGradient.

go to Users & Permissions

Click on the three vertical dots under Actions for that email address
Select Edit
Untick Offline monitors notifications

I do find the menu system frustrating when I’m trying to find something!

Huzzah!! I would have never found that.

I really wish I knew why my sensors were failing to communicate with AG. But at least my inbox won’t get flooded anymore.

Thanks