Update multiple fields thingspeak
Moderators: grovkillen, Stuntteam, TD-er
Update multiple fields thingspeak
Hi all,
Is there a possibility to edit the link that espeasy generates to update a field, i would like that multiple fields get updated. So i can make a plot of all temperatures and a daily average.
Is there a possibility to edit the link that espeasy generates to update a field, i would like that multiple fields get updated. So i can make a plot of all temperatures and a daily average.
Re: Update multiple fields thingspeak
Do you have an example of the URL it now generates and how you would like to have it?
Re: Update multiple fields thingspeak
Sure!
I think, at the moment it is something like : and i would like to have a second one so i could display daily averages without the need of creating a new channel and writing and reading from it.
I think, at the moment it is something like :
Code: Select all
https://api.thingspeak.com/update?api_key=xxxxxxxx&field1=0
Code: Select all
https://api.thingspeak.com/update?api_key=xxxxxxxx&field1=0&field2=
Re: Update multiple fields thingspeak
You can for sure create any formatted URL you like when sending from the rules.
You can also try to use the Advanced HTTP controller as it does allow for more elaborate formatting.
The Generic HTTP controller only splits per value.
You can also try to use the Advanced HTTP controller as it does allow for more elaborate formatting.
The Generic HTTP controller only splits per value.
Re: Update multiple fields thingspeak
aha that can come in handy. in my espeasy setup, i don't see rules...
Will get the advance http, works better
Will get the advance http, works better
Re: Update multiple fields thingspeak
Rules can be enabled on the Tools/Advanced page.
/Ton (PayPal.me)
Re: Update multiple fields thingspeak
That, or maybe he considers anarchy, ignoring rules
Both can be a good reason for trying to use the Advanced HTTP controller
Both can be a good reason for trying to use the Advanced HTTP controller
Re: Update multiple fields thingspeak
I get values on my thingspeak channel, it works with a static value. What is the variable for the output of the ds18b20? or how can i get it
update?api_key=xxx&field1=%device1%&field2=%device1%
I need to get the correct piece for the device
update?api_key=xxx&field1=%device1%&field2=%device1%
I need to get the correct piece for the device
Re: Update multiple fields thingspeak
A task is given a name.
For example your dallas task is called "dallas"
Then the first temp sensor may be called "T1" (you can change it to whatever you want)
To access its value, you write [dallas#T1] which will be replaced by the current value of that task value.
See some examples here: https://espeasy.readthedocs.io/en/lates ... g-examples
For example your dallas task is called "dallas"
Then the first temp sensor may be called "T1" (you can change it to whatever you want)
To access its value, you write [dallas#T1] which will be replaced by the current value of that task value.
See some examples here: https://espeasy.readthedocs.io/en/lates ... g-examples
Re: Update multiple fields thingspeak
hmm that doesn't seem like somthing i can put in the http request.
I'm very new to this. i would like that thingspeak can just copy 1 field to another, but not possible
I'm very new to this. i would like that thingspeak can just copy 1 field to another, but not possible
Re: Update multiple fields thingspeak
Why not?
These references (and other variables, wrapped in % characters) will be replaced when they are encountered.
So if you create an URL in the rules, you can use these and when the line is parsed, those will be replaced.
These references (and other variables, wrapped in % characters) will be replaced when they are encountered.
So if you create an URL in the rules, you can use these and when the line is parsed, those will be replaced.
Re: Update multiple fields thingspeak
Yeah wrapped in the %. But what exactly is thé label i need to wrap in. At thé moment i only have one sensor, thé Dallas ds18b20
Re: Update multiple fields thingspeak
If you only have one, you can use the [taskname#varname] syntax. Isn't the most universal solution, but for a single sensor you can try it to get started.
So literally using the square brackets and the names you assigned yourself to the task.
So literally using the square brackets and the names you assigned yourself to the task.
Re: Update multiple fields thingspeak
Hi, thanks!
It isn't a Task at the moment, it's only a device.
It isn't a Task at the moment, it's only a device.
Re: Update multiple fields thingspeak
Yes, it worked!
Just needed to remove the '%' in my syntax.
/update?api_key=xxxx&field1=[zwijver#temperature]&field2=[zwijver#temperature] with zwijver being task and temperature the value.
Just needed to remove the '%' in my syntax.
/update?api_key=xxxx&field1=[zwijver#temperature]&field2=[zwijver#temperature] with zwijver being task and temperature the value.
Who is online
Users browsing this forum: Google [Bot] and 123 guests