422 Error Unprocessable Entity with talkback json | ThingSpeak API | Forum

Avatar

Please consider registering
Guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —






— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed sp_TopicIcon
422 Error Unprocessable Entity with talkback json
No permission to create posts
October 9, 2019
8:24 pm
Avatar
teatree
New Member
Members
Forum Posts: 4
Member Since:
October 9, 2019
sp_UserOfflineSmall Offline

I've been using a JSON POST to add talkback commands for last 9-months. Since yesterday I'm getting 422 Error - Unprocessable Entity.

Scheduling commands with LUA script, excerpt below:

local http = net.HTTPClient()
http:request("https://api.thingspeak.com/talkbacks/TALKBACK_ID/commands.json?apikey= YOUR_TALKBACK_API_KEY&command_string=" .. control, {
options = { method = 'POST', headers = {}, data = '{}'},

control is defined variable.

Anybody else seeing this?

October 10, 2019
7:15 am
Avatar
Hombre666
New Member
Members
Forum Posts: 3
Member Since:
October 10, 2019
sp_UserOfflineSmall Offline

Hey, I have the same problem - http response code 422, after posting fetch talkback command from queue. I am using the code from the example how to turn on the light.

Regards

October 10, 2019
10:14 am
Avatar
Vinod

MathWorks
Members
Forum Posts: 332
Member Since:
May 1, 2016
sp_UserOfflineSmall Offline

Can you post the complete details of your command string? I suspect it is not properly encoded and it has '%' character in it without the proper escaping.

October 10, 2019
12:49 pm
Avatar
Hombre666
New Member
Members
Forum Posts: 3
Member Since:
October 10, 2019
sp_UserOfflineSmall Offline

Even if everything worked until couple days ago? I only noticed the problem after trying to turn on a relay and commands kept pilling up in the web gui. I copied the code from this example:

https://www.mathworks.com/help/thingspeak/control-a-light-with-talkback-and-arduino.html

October 10, 2019
1:11 pm
Avatar
Monica
New Member
Members
Forum Posts: 2
Member Since:
October 10, 2019
sp_UserOfflineSmall Offline

Hombre666 said

Hey, I have the same problem - http response code 422, after posting fetch talkback command from queue. I am using the code from the example how to turn on the light.

Regards  

I have the exact same problem. I am using the same code (https://www.mathworks.com/help/thingspeak/control-a-light-with-talkback-and-esp32.html) and it was working fine. I noticed the problem today. Please, somebody help!

October 10, 2019
2:52 pm
Avatar
cstapels
Moderator
Members


Moderators
Forum Posts: 792
Member Since:
March 7, 2017
sp_UserOfflineSmall Offline

Can you please try using the parameter 'api_key' instead of 'apikey', and let us know if that works? The doc example has incorrectly specified the parameter. We will update that as soon as possible.

October 10, 2019
3:19 pm
Avatar
Hombre666
New Member
Members
Forum Posts: 3
Member Since:
October 10, 2019
sp_UserOfflineSmall Offline

Yep..that did it..it works..
Big thanks 😉

Regards

October 10, 2019
3:23 pm
Avatar
Monica
New Member
Members
Forum Posts: 2
Member Since:
October 10, 2019
sp_UserOfflineSmall Offline

cstapels said

Can you please try using the parameter 'api_key' instead of 'apikey', and let us know if that works? The doc example has incorrectly specified the parameter. We will update that as soon as possible.  

Thank you very much!!!!!! I was kind of desparate here! It is working fine now!!!

October 10, 2019
5:43 pm
Avatar
teatree
New Member
Members
Forum Posts: 4
Member Since:
October 9, 2019
sp_UserOfflineSmall Offline

cstapels said

Can you please try using the parameter 'api_key' instead of 'apikey', and let us know if that works? The doc example has incorrectly specified the parameter. We will update that as soon as possible.  

Thanks for quick response!

'apikey' was working until Oct 9...

October 11, 2019
8:47 am
Avatar
cstapels
Moderator
Members


Moderators
Forum Posts: 792
Member Since:
March 7, 2017
sp_UserOfflineSmall Offline

@teatree You are correct, we recently introduced a change that made the requirements for the parameters more strict. The reference documentation has api_key, the the example inadvertently introduced the possibility of apikey.
https://www.mathworks.com/help/thingspeak/addtalkbackcommand.html

@monica, @Hombre666, @teatree,
I am glad to hear you are all using TalkBack. We are always interested in new applications for ThingSpeak. If you have a moment, can you please share a description of your project and how you are using Talkback? And thanks for confirming that it works now!

I think we can keep this discussion here, but for future discussions, MATLAB Answers is now the preferred location for online help regarding ThingSpeak topics.

https://www.mathworks.com/matlabcentral/answers/?product_base_code

October 12, 2019
2:40 am
Avatar
teatree
New Member
Members
Forum Posts: 4
Member Since:
October 9, 2019
sp_UserOfflineSmall Offline

@cstapels using talkback to control a pump and a few valves via a Rpi on my hobby farm.

Have it integrated with home control setup and app. Makes for an easy and safe connection, rather than setting up a remote server, fixed ip etc.

Forum Timezone: America/New_York

Most Users Ever Online: 166

Currently Online:
21 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 272

Vinod: 240

piajola: 95

turgo: 70

vespapierre: 63

Adarsh_Murthy: 62

Member Stats:

Guest Posters: 1

Members: 8665

Moderators: 1

Admins: 2

Forum Stats:

Groups: 3

Forums: 14

Topics: 1600

Posts: 5760

Newest Members:

titan83, Svetoslav, abubakar, shindepavan551@gmail.com, fet61-fakohse, Mario Marquez

Moderators: cstapels: 460

Administrators: Hans: 405, lee: 457