10:31 am

November 4, 2018

Hello,
I am new to Thingspeak I am using it to log temperature and humidity for a project.
I am usin Arduino Mega with ESP8266
I would like to know if there is a way to set Thingspeak fields to be filled on the web page and have the Arduino device read the parameters in order to configure Arduino settings over online interface.
If this is not viable via Thingspeak could you suggest any other free web service that can be used to set Arduino variables online?
If possible using the Arduino as a client rather than as a server.
Thanks in advance for your help.
4:06 pm


Moderators
March 7, 2017

Welcome to ThingSpeak!
Can you clarify what you mean by "set Thingspeak fields to be filled on the web page"?
You can use the Metadata field to provide parameters to your device.
You can read the metadata using a REST call to read data ( see https://www.mathworks.com/help/thingspeak/readdata.html)
Here are a few examples using the metadata:
https://blogs.mathworks.com/iot/2014/07/11/thingspeak-data-channels-now-with-more-metadata/
https://github.com/dmawrey/thingspeak-metadata
You can write to metadata from your device or from the web interface.
I would recommend writing the metadata as a JSON object and then using the Arduino JSON parser library to extract the parameters you need. That will allow you to reuse the code for other purposes. Please consider sharing your code if you get a good working example.
11:09 pm

November 4, 2018

Hello,
Thanks for your feedback.
What i meant is for example have a textbox called pH on a field, so that I can define a minimum or maximum ph level, and have the arduino consult this field, every certain time.
I am not sure your metadata approach is suitable for my project as this need to be done in a way that is easy for the final user, and entering on the channel configuration to change metadata in a JSON object doesn't sounds easy for the average Joe.
I reaaly appreciate your welcoming into the forum
11:10 am


Moderators
March 7, 2017

Yeah, I overshot that one, sorry.
Right now we do not have an option for text entry to a channel from the channel view.
You can have the user update a field with a REST call, its still hairy but not as bad as the metadata.
https://api.thingspeak.com/update?api_key=XXXXXXXXXXXXXXXX&field8=(yourPH value)
Then the arduino can read that field for the value when it is doing its configuration.
If you wanted to make it easier on the user, you could create a webpage with a button and a text box on it, and give the web page to the user to run locally.
I can help you with the javascript for such a page if you want to go that route. I wrote such a page to control the color of the lights in my office.
Most Users Ever Online: 166
Currently Online:
22 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:
estebanmateo93, mikewrite, onlinebusiness, winzy99, Zark_zeugan, StefanWiModerators: cstapels: 460
Administrators: Hans: 405, lee: 457