Hi All,
Im VERY new to ESPeasy so please excuse any stupid questions. I have a current prototype unit that consists of a PIC controller that is connected to an ESP 12E via the serial port. The PIC has a few sensors connected to it and sends this data to Thingspeak. Currently I use AT commands to accomplish placing the data on Thingspeak using an http GET request. I would like to use the ESP firmware because of it’s configuration functionality so my questions are………….
1. Can I use the serial port to send multiple channel values from the PIC to the ESP then to Thingspeak?
2. Are there any examples of how I would set ESPeasy up and an example of the string I would send to the serial port?
Thanks
Ray
serial port send data to Thingspeak
Moderators: grovkillen, Stuntteam, TD-er
-
- Normal user
- Posts: 144
- Joined: 12 Oct 2017, 12:53
- Location: Philippines
-
- Normal user
- Posts: 587
- Joined: 18 Jun 2017, 11:02
- Location: Békéscsaba, Hungary
Re: serial port send data to Thingspeak
It depends on the mode and complexity of the serial communication, that you want to use.rayE wrote: ↑12 Oct 2017, 13:22 Hi All,
Im VERY new to ESPeasy so please excuse any stupid questions. I have a current prototype unit that consists of a PIC controller that is connected to an ESP 12E via the serial port. The PIC has a few sensors connected to it and sends this data to Thingspeak. Currently I use AT commands to accomplish placing the data on Thingspeak using an http GET request. I would like to use the ESP firmware because of it’s configuration functionality so my questions are………….
1. Can I use the serial port to send multiple channel values from the PIC to the ESP then to Thingspeak?
2. Are there any examples of how I would set ESPeasy up and an example of the string I would send to the serial port?
Thanks
Ray
There are a simple Ser2Net plugin, which can be used with rules, as needed:
http://www.letscontrolit.com/forum/view ... net#p19201
If it is not enough, i am afraid you have to create your own plugin.
-
- Normal user
- Posts: 144
- Joined: 12 Oct 2017, 12:53
- Location: Philippines
Re: serial port send data to Thingspeak
Hi,
Thanks for the quick reply. I can tailor the protocol to whatever ser2net wants so that is not a problem. I will look at the ser2net plugin and hopefully get something up and running.
Thanks for the pointer.
Ray
Thanks for the quick reply. I can tailor the protocol to whatever ser2net wants so that is not a problem. I will look at the ser2net plugin and hopefully get something up and running.
Thanks for the pointer.
Ray
-
- Normal user
- Posts: 144
- Joined: 12 Oct 2017, 12:53
- Location: Philippines
Re: serial port send data to Thingspeak
OK, i made some progress on this today and did the following.
1. Flashed ESP Easy onto ESP-12E module.
2. Set all the basic settings to connect to my network.
3. Followed the instructions here to send data to thingspeak
http://www.letscontrolit.com/forum/view ... f=4&t=1175
4. Set up a ser2net device
5. using the following device settings i can send 2 system values to thingspeak at 20 second intervals and all is OK.
6. See the attachment pics for ser2net config details.
Now im stuck :-/ on 2 points (i think)
1. How do i pass a variable over the serial port to ESP Easy. I take it i would send a command like SerialSend followed by the value? i cannot find any documentation on serialSend?
2. Once i have the value in ESP Easy then would i set up some "rule" to pass this data to thingspeak?
Apologies for the complete "vagueness" on all of this but im at the bottom of a learning curve. Any pointers/examples/help is much appreciated.
TIA
Ray
1. Flashed ESP Easy onto ESP-12E module.
2. Set all the basic settings to connect to my network.
3. Followed the instructions here to send data to thingspeak
http://www.letscontrolit.com/forum/view ... f=4&t=1175
4. Set up a ser2net device
5. using the following device settings i can send 2 system values to thingspeak at 20 second intervals and all is OK.
6. See the attachment pics for ser2net config details.
Now im stuck :-/ on 2 points (i think)
1. How do i pass a variable over the serial port to ESP Easy. I take it i would send a command like SerialSend followed by the value? i cannot find any documentation on serialSend?
2. Once i have the value in ESP Easy then would i set up some "rule" to pass this data to thingspeak?
Apologies for the complete "vagueness" on all of this but im at the bottom of a learning curve. Any pointers/examples/help is much appreciated.
TIA
Ray
You do not have the required permissions to view the files attached to this post.
-
- Normal user
- Posts: 144
- Joined: 12 Oct 2017, 12:53
- Location: Philippines
Re: serial port send data to Thingspeak
This is how i have set up Tools - Advanced
You do not have the required permissions to view the files attached to this post.
-
- Normal user
- Posts: 144
- Joined: 12 Oct 2017, 12:53
- Location: Philippines
Re: serial port send data to Thingspeak
Is this the direction i should be heading?
TaskValueSet Rules Set values on a Dummy Task device TaskValueSet <task nr>,<value nr>,<value/formula>
TaskValueSet Rules Set values on a Dummy Task device TaskValueSet <task nr>,<value nr>,<value/formula>
-
- Normal user
- Posts: 587
- Joined: 18 Jun 2017, 11:02
- Location: Békéscsaba, Hungary
Re: serial port send data to Thingspeak
As i know, the only option to output is to Publish raw data from serial port to the MQTT server, or Thingspeak.rayE wrote: ↑13 Oct 2017, 09:37 Now im stuck :-/ on 2 points (i think)
1. How do i pass a variable over the serial port to ESP Easy. I take it i would send a command like SerialSend followed by the value? i cannot find any documentation on serialSend?
2. Once i have the value in ESP Easy then would i set up some "rule" to pass this data to thingspeak?
If the Ser2Net device is named SerialRAW, then:
Code: Select all
On SerialRAW do
Publish %sysname%/SerialRAW,[SerialRAW]
endon
You can check the Ser2Net source code directly:
https://github.com/letscontrolit/ESPEas ... er2Net.ino
There is a closed bug with a similar task, so i am not sure, that it will work as you want:
https://github.com/letscontrolit/ESPEasy/issues/514
-
- Normal user
- Posts: 144
- Joined: 12 Oct 2017, 12:53
- Location: Philippines
Re: serial port send data to Thingspeak
Thanks for the information. I will give it a try today
Ray

Ray
-
- Normal user
- Posts: 144
- Joined: 12 Oct 2017, 12:53
- Location: Philippines
Re: serial port send data to Thingspeak
My solution to posting data (multiple fields in one go) to thingpeak through the ESP serial port is here.
viewtopic.php?f=6&t=3642
Ray
viewtopic.php?f=6&t=3642
Ray
Who is online
Users browsing this forum: Anthropic Claude Bot [bot] and 9 guests