ESP32 WiFi Module Not Uploading to ThingSpeak Despite "Good Connection"

Hello! I'm currently working on a project that aims to send tank-level sensor data to ThingSpeak using an ESP32 WiFi module. I have been testing the system using a simple counter code, and it works perfectly on the WiFi at my university, as well as my home WiFi.

Two days ago I went to check if the system works at the plant at which we will eventually construct our tank process. There, the ESP32 module was able to recognize the plant's WiFi network as well as connect to it. However, when it tried to upload counter value to ThingSpeak, it returned error -301 (failed to connect).

The site is a metal garage-like building. Our process will be set up outside the building, under an awning. I tried the WiFi system both at our process location as well as right beside the router; it worked in neither spot. I tried resetting the module as well, but it did nothing. The CEO of the plant informed us that reception is not the best at their site, and it IS mostly outside, so I figured it was just because the signal strength was not good enough and all could be solved by buying a WiFi booster. However, when I ran a WiFi scan with the module, it returned that the plant WiFi was stronger than my home WiFi (-45 as opposed to -57).

Could this possibly still be a signal strength issue, despite the WiFi scan contradicting this theory? If anyone has any suggestions, whether it's ideas on the root of the problem, possible solutions, more info on -301 ThingSpeak error, etc, it would be appreciated. Thanks.

thingspeak requires authentification through a write API-key did you check that this API-key is correct?

You cannot send data too often to thingSpeak how often are you sending data?

You may get closer to a solution by asking MathWorks.

Suggestions:

  1. be sure you are using the most up-to-date Arduino ESP32 core (currently 2.0.4)

  2. are you powering the ESP32 the same way at home, university, and at the plant?

  3. while near the plant's router and using the same access credentials, try manually posting to ThingSpeak using a browser on your phone, with...

https://api.thingspeak.com/update.json?api_key=xyz&field5=123

...replacing xyz with your API key and "field5=123" with something pertinent to your situation. Success may eliminate the router as a contributor to the problem. If it fails, then...who knows? Try rebooting the router?

jokequestion: "what is the most beloved action of each and every modern electronic device?"

Re-booting / Re-starting

What is the first most asked question on any support-hotline?
"Did you Re-boot your device?"

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.