request to set field options | 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
request to set field options
No permission to create posts
May 6, 2020
7:02 am
Avatar
silvia
New Member
Members
Forum Posts: 1
Member Since:
May 6, 2020
sp_UserOfflineSmall Offline

Hello,
I'm working on an IoT project and I need to create a channel on Thingspeak using HTTP or MQTT methods (Python). I managed to create the channel but I don't know how to set the charts with the options that I want.

import requests r = requests.post('https://api.thingspeak.com/channels.json', data = {"api_key":"XXXXXXX", "name":"Silvia", "field1":"1", "field2": "2"}) # I create the channel with 2 charts

r1 = requests.put('https://api.thingspeak.com/channels/1053983.json', data = {"api_key":XXXXXX", "field1":"fff", "field2": "stcc"}) # changing the name of the charts

1) How can I set chart 1 option "average" to daily?
2) How can I set the status of the channel to true? (The channel should show its status)

I really hope someone can help me, thanks in advance!

May 7, 2020
11:10 am
Avatar
cstapels
Moderator
Members


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

If you want to set the charts options on your channel view, use the pencil icon on the top of the figure.
You can see explanations of the options in the Create Chart documentations, since the parameters are similar.
https://www.mathworks.com/help/thingspeak/createchart.html
and
https://www.mathworks.com/help/thingspeak/rest-api.html

If you want to create a chart with a GET call, you can use the charts API described on that same page. There are parameters for averaging, line style, limits, etc.

You cannot change the standard field chart settings on your channel programatically but you can create custom charts with MATLAB code in the MATLAB visualizations app.

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

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:

briskpanda, Dejw0089, Yassine Ben Salah, anis, 43994554AKS, suda

Moderators: cstapels: 460

Administrators: Hans: 405, lee: 457