Data ingestion through HTTP API fails

Dear community

Since more than a year i’m sending temperature values to ubidots. Since 30. Dec 2022 sending values through the HTTP API isnt possible anymore. Establishing a connection to industrial.api.ubidots.com fails after several attempts.
I tried it even with the sample code from the following page:
Connect a NodeMCU ESP8266 to Ubidots over HTTP | Ubidots Help Center

But no luck.
What is wrong? Did Ubidots change something?

Thanks in advance for your help.
Marco

Hello @marcojakob

Thanks for reaching out,

Regarding the data ingestion in general, nothing has changed at our end, you can test this by making a post request to industrial.api.ubidots.com and our data ingestion endpoint /api/v1.6/devices/<device_label>/ just like indicated in our documentation here using any HTTP client of your choice for instance Postman. Notice that I get a 201 response code which indicated the data was stored.

Having this in mind I suggest you check first the connectivity of your device to the internet or any changes on your network that may prevent the connection, also try to connect to a different server and see if that also fails, if all that is good, then try sending any random data to Ubidots perhaps by using the examples we have with regards to the use of our library and check the results and response codes.

Also in order to help if the problem persists we would need more details like the version of your NodeMCU and the Serial monitor output when running one of our code examples.

Regards,

-Santiago

I have exactly the same problem on several Lolin Wemos devices that had been working for 18 months; when I turn on serial debug, I get
…WiFi connected
IP address:
192.168.1.108
Sending data…
Trying to connect to industrial.api.ubidots.com , attempt number: 0
Attempt finished
Trying to connect to industrial.api.ubidots.com , attempt number: 1
Attempt finished
Trying to connect to industrial.api.ubidots.com , attempt number: 2
Attempt finished
Trying to connect to industrial.api.ubidots.com , attempt number: 3
Attempt finished
Trying to connect to industrial.api.ubidots.com , attempt number: 4
Attempt finished
[ERROR] Could not connect to the server.

I have a STEM account (I teach Electronics)- might that be the problem that the library defaults to Industrial?

Nothing has changed on my network, and Wifi connection works fine. all devices just stopped uploading (well below ingestion limit)

This got worse when I tried updating the Arduino IDE and my libraries, but I now can’t compile a sketch at all to upload to UBIDOTS- there are lots of outdated examples about.

Where to start? pls could someone link me to consistent ESP8266 standalone resources? I have tried both the libraries linked from UBIDOTS help pages, and another from GitHub- even the examples won’t compile!

Peter

So in despair I uninstalled all trace of the Arduino IDEs- I had both 1.x and 2.x installed.
I then installed just the library referenced at https://help.ubidots.com/en/articles/1439097-connect-a-wemos-d1-to-ubidots-over-http

my code now compiles and uploads.

Weird…

Greetings @pjhum, hope you are doing great.
Some users have experienced issues related to the ESP8266 WiFi Library for Arduino version in which the Ubidots library is based on.
I’m glad to hear that you’ve already solved the problem, however if that happens again, please reach back to us again.
For the moment, I’ll try to reproduce the error using different versions of said library. On the other hand, as a recommendation, please keep both libraries’ version updated.

Best regards.

Thanks. I have now recompiled and uploaded my (unchanged) code to all devices and and they’re working as they should.

One of the ESP 8266 devices also posts an IFTTT webhook- which was still working- so I think the problem was closely linked to the ubidots library- though I realise it could still be a protocol specific issue from the WiFi library showing up.

Peter