Storing negative values with API call | ThingSpeak API | Forum

The ThingSpeak community site has been upgraded to a new site. This site is currently in read-only mode. You can ask questions or post and read discussions on the new site.
Avatar

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
Storing negative values with API call
No permission to create posts
December 6, 2020
11:31 am
Avatar
deadwing
New Member
Members
Forum Posts: 2
Member Since:
December 6, 2020
sp_UserOfflineSmall Offline

Hi all

I've been using ThinkgSpeak for long time now, with shell scripts and curl to store values, and all has been working fine.

I'm now in the situation where I need to store potentially negative values, how do I do that? Somehow it stores values without the -?

$ground=-12
I use https://api.thingspeak.com/update?api_key=XXX&field1=$ground and it shows as 12?

December 6, 2020
1:53 pm
Avatar
deadwing
New Member
Members
Forum Posts: 2
Member Since:
December 6, 2020
sp_UserOfflineSmall Offline

Replying to myself, problem was not in sending the value but incorrect trimming of the - sign in the script. Once solved it all works.

December 15, 2020
7:25 am
Avatar
cstapels
Moderator
Members


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

FYI, MATLAB answers is the preferred location for ThingSpeak Community support.

Thanks for posting the answer though. Glad you solved the problem.

Forum Timezone: America/New_York

Most Users Ever Online: 166

Currently Online:
25 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:

kusmumichael, petersmith99, Rambant, blakeharriss09, optisol, Niyonzima Fils

Moderators: cstapels: 460

Administrators: Hans: 405, lee: 457