All my ThingSpeak Channels stopped receiving data on the same date. April 13th 2022 at around 10.00 EST. What changed?

Peter Hardman on 19 Apr 2022
Latest activity Reply by Pineapple_Ops on 22 Apr 2022

I have a personal account which I use for my home projects, along with a paid license which I use for monitoring a set of sensors in a remote building.

All my sensors went offline at about the same time, but I am only just noticing this now, because I have been focused on why the remote location went offline, thinking that it was an issue with the internet or WiFi at that location, rather than a problem with posting the data!

All my monitoring setups are using electricImp devices to post data to ThinkSpeak and have been in some cases, running for several years without any issues. All the devices are now returning a 400 - invalid constant string error.

See logs below.

|2022-04-19T13:30:07.017 +00:00	[Agent]	https://api.thingspeak.com/update?api_key=XXXXXXX&status=OK&created_at=2022-04-19 13:30:01 UTC&field4=0.00&field3=0.00&field6=0.00&field5=0.00&field2=14.65&field1=2022-04-19%2013%3A30%3A01%20UTC&status=OK&field8=0.6129&field7=0.00&created_at=2022-04-19%2013%3A30%3A01%20UTC
    2022-04-19T13:30:07.086 +00:00	[Agent]	PUSH: 400 - invalid constant string

I modified a device to not send the date in field 1 on one device because I thought that might be causing the problem, but it is not clear to me what changed. I have been sending data like this for a long time.

Any ideas appreciated.

Thanks

Pineapple_Ops
Pineapple_Ops on 22 Apr 2022
Same Issue here and not happy that something changed wherein we are losing data now.
Sometime between Feb 21 and April 22 2022, HTML updates to the Thingspeak channel that worked for over three years are failing.
Successful Updates without issue:
{"created_at":"2021-11-29T19:43:08Z","entry_id":171149,"field1":"1021.593","field2":"1021.545","field3":"15.7","field4":null,"field5":"1.1275","field6":"-24.820210084","field7":"584698747.1285881778","field8":"@179001@@"},
Previously Successful Updates such as the one below no longer work and fail to update using HTML to Thingspeak. I do not currently have access to the raw message being sent, as 3rd party developers were used.
{"created_at":"2021-11-29T19:43:18Z","entry_id":171150,"field1":"1021.592","field2":"1021.542","field3":"15.9","field4":"TEST 1 START,TEST 1 RUN","field5":"1.1275","field6":"-24.819230074","field7":"584698749.1285881775","field8":"@179001@170018@TEST1"},
The original update may be similar to this, but I can't tell for certain:
https://api.thingspeak.com/update.json?api_key=xxxxxxxxxxx&field1=1021.592&field2=1021.542&field3=15.9&field4=TEST 1 START,TEST 1 RUN&field5=1.1275&field6=-24.819230074&field7=584698749.1285881775&field8=@179001@170018@TEST1
Additionally, I cannot find any details in the release notes link below by Christopher that mentions a change in the "strictness" of Thingspeak headers, so this needs documentation ASAP on what changed and how to resolve or avoid in the future. Not everyone in the world uses proper URL encoding, as that equals extra data, and extra data leads to more bandwidth, more power required, and higher network costs, which goes against a remote IoT sensor. Thanks.
Vinod
Vinod on 19 Apr 2022 (Edited on 19 Apr 2022)

It appears some part of the string is not URL encoded. Some infrastructure updates on our end have made the parsing of the headers and query parameters more strict.

In the example you posted created_at has spaces instead of %20 and it appears some query parameters are being duplicated in the request. It should be something like this:

https://api.thingspeak.com/update?api_key=XXXXXXX&status=OK&created_at=2022-04-19%2013:30:01%20UTC&field4=0.00&field3=0.00&field6=0.00&field5=0.00&field2=14.65&field1=2022-04-19%2013%3A30%3A01%20UTC&field8=0.6129&field7=0.00

Peter Hardman
Peter Hardman on 19 Apr 2022

Oddly if I keep the created_at part as is, and eliminate field1 which contained the string with quotes the POST succeeds.

Is there a place where I can go to see when updates to the system happen, so if I run into this again I can see if it coincides with a change?

Thanks

Christopher Stapels
Christopher Stapels on 19 Apr 2022

This community site is the best place to find updated ThingSpeak information. We do have Release notes , where major announcements are made and also the Blog will have updates as well. In this case, an update in an underlying component led to this change, so we did not have the information to provide to users before the release.