Académique Documents
Professionnel Documents
Culture Documents
2 THINGSPEAK:
ThingSpeak is a free web service that lets you collect and store sensor data in the cloud
and develop Internet of Things applications. The ThingSpeak web service provides apps that let
you analyze and visualize your data in MATLAB, and then act on the data. Sensor data can be
sent to ThingSpeak from Arduino, Raspberry Pi, Beagle Bone Black, and other hardware.
5.2.1 KEYWORDS:
Here are some keywords that are used in the API. An understanding of the terms will
make the API documentation easier to understand.
Channel – The name for where data can be inserted or retrieved within
ThingSpeak API, identified by a numerical Channel ID
Field – One of eight specific locations for data inside of a channel, identified by a
number between 1 to 8 – A field can store numeric data from sensors or
alphanumeric strings from serial devices or RFID readers
Status – A short status message to augment the data stored in a channel
Location – The latitude, longitude, and elevation of where data is being sent from
Feed – The collective name for the data stored inside a channel, which may be
any combination of field data, status updates, and location info
Write API Key – A 16 digit code that allows an application to write data to a
channel
Read API Key – A 16 digit code that allows an application to read the data stored
in a channel
IP Address: [cce]https://184.106.153.149[/cce]
In order to update a channel, you need to know your write API key. If your write API key
gets compromised you can generate a new key.
Select Channels
Select the Channel to update
Select Manage API keys
Select Channels
Select the Channel to update
Select Manage API keys
Select Generate New Read API keys
5.2.8 CACHING:
Caching is implemented on JSON and XML formats on feeds. Feeds that return more
than 100 entries are cached for 5 minutes. This will allow great performance for popular that you
can produce real-time applications. The last API call and feeds that specify “results=100” or less
are not cached, so that can produce real-time applications.
Required Parameter:
field1=[Field 1 Data]
field2=[Field 2 Data]
field3=[Field 3 Data]
field4=[Field 4 Data]
field5=[Field 5 Data]
field6=[Field 6 Data]
field7=[Field 7 Data]
field8=[Field 8 Data]
status=[Status Update]
Reply: If the update is successful, the API will respond with the entry_id of the update. If the
response is “0” then the update failed.
5.2.10 RETRIEVING:
1. Retrieving Channel Feeds:
Method: GET
Feed URL:
[cce]https://api.thingspeak.com.channels/(channel_id)/feed.(format)[/cce]
Optional Parameters:
Examples:
http://api.thingspeak.com/channels/9/feed.json
http://api.thingspeak.com/channels/9/feed.json?median=10
http://api.thingspeak.com/channels/9/feed.json?start=2011-11-
11%2010:10:10&end=2011-11-11%2011:11:11
Method: GET
Feed URL:
[cce]http://api.thingspeak.com/channels/(channel_id)/feed/last.(format)[/cce]
Optional Parameters:
Method: GET
Feed URL:
[cce]http://api.thingspeak.com/channels/(channel_id)/feed/(field_id).(format)[/cce]
Optional Parameters:
Method: GET
Feed URL:
[cce]http://api.thingspeak.com/channels/(channel_id)/feed/(field_id).(format)[/cce]
Optional Parameters:
txt
Method: GET
Feed URL:
[cce]http://api.thingspeak.com/channels/(channel_id)/status.(format)[/cce]
Optional Parameters:
5.2.11 LISITING:
1. Listing Public Channels:
Method: GET
[cce]http://api.thingspeak.com/channels/public.(format)[/cce]
Optional Parameters:
Examples:
http://api.thingspeak.com/channels/public.json
http://api.thingspeak.com/channels/public.xml
http://api.thingspeak.com/channels/public.json?page=5
http://api.thingspeak.com/channels/public.json?tag=temperature
2. Listing User Information
Method: GET
[cce]http://api.thingspeak.com/users/(username).(format)[/cce]
Optional Parameters:
If a user’s API key is provided, private information such as their email address will be provided.
Examples:
http://api.thingspeak.com/users/hans.json
Method: GET
[cce]http://api.thingspeak.com/users/(username)/channels.(format)[/cce]
Optional Parameters:
Examples:
http://api.thingspeak.com/users/hans/channels.json