Page 1 of 1
tx rx serial plugin
Posted: 21 Feb 2018, 18:16
by dangu
Hello
there is very much of plugin on the communication serie in easy esp.

after several tests, with a basic plug-in style p-020 Ser2Net and modification, I do not communicate with anything.
what wants to do is receive 2 bytes sent by an arduino to 19200 bauds, integrate them into 2 TaskDeviceValueNames [0] and [1], then return a byte to the arduino, or put a pin to 1 on esp to confirm the reception.
if you know how to use the serial port under easy esp, I'm at your listening,
because I dry a little to write my plugin, and the use under easy esp ets quite different from that of arduino.
Thank you for all your advice.....

Re: tx rx serial plugin
Posted: 22 Feb 2018, 11:17
by toffel969
Hi
I think you can achieve desired functionality by using rules and serial commands to ESPEasy from Arduino
Connect Arduino Serial to ESP serial
Create a dummy device on ESP Easy (lets say on Task No1)
On the arduino :
Code: Select all
Serial.print(TaskValueSet,1,1,[value 1 from Arduino])
Serial.print(TaskValueSet,1,2,[value 2 from Arduino])
Now you have the values from the Arduino stored in the Dummy device of ESP.
you should be able to send back via rules using the serialsend command (that needs confirmation)
Re: tx rx serial plugin
Posted: 22 Feb 2018, 20:12
by dangu
Hello
thank you for your help, in fact thanks to your help, the operation is super simple.
I created a Dummy Device, then sent the value TaskValueSet, 1,4,1893.33 with usb serial interface 3.3v, and valeue received task1 value 4 = 1893.33.
Perfect, that's exactly what I wanted to do, I understood the sending mechanism.
thank you.
Re: tx rx serial plugin
Posted: 25 Feb 2018, 22:42
by Meek
I’m very curious on how your code on the Arduino looks like.
In the past, I have tried to exchange data via the serial interface (TxD & RxD) between ESP and Arduino core.
But in my experiences with serial code exchange between the Arduino and ESP modules, this gave a lot of overhead on the ESP module that became unresponsive.
Perhaps in the last months, the implementation might have evolved thanks to the community and especially by the coders.
Would you like to share the Arduino code with us ?
Re: tx rx serial plugin
Posted: 26 Feb 2018, 01:12
by dangu
Hello
I work with the firmware "EASYESP" version 2.3.0 build 147 with ESP8266-12
IF I UNDERSTAND WELL, you are sending data from esp to arduino, which strongly slows down the ESP according to you.
In my case, I send data from ARDUINO to ESP via serial interface.
sending is done with this command:
Serial.print ("TaskValueSet, 1,1, [value 1 from Arduino]"), simply (5 times this every 2m30sec)
in fact this montage serves me with arduino to decode the data of a weather station type ks300 in 868mhz, which sends the data to esp which sends a domoticz.
my concern now, "easyesp" send the data according to the time determined by (delay), and not at the reception.
I would like to send the received data just after, and the next sending will be done after receiving the other data, no sending if no data reception.
I dig how to do? ? ? 
Re: tx rx serial plugin
Posted: 26 Feb 2018, 11:26
by toffel969
Meek wrote: ↑25 Feb 2018, 22:42
I’m very curious on how your code on the Arduino looks like.
In the past, I have tried to exchange data via the serial interface (TxD & RxD) between ESP and Arduino core.
But in my experiences with serial code exchange between the Arduino and ESP modules, this gave a lot of overhead on the ESP module that became unresponsive.
Perhaps in the last months, the implementation might have evolved thanks to the community and especially by the coders.
Would you like to share the Arduino code with us ?
Hi
Depending on the update rate, Serial commands shouldnt increase load substantially (like every 2,5 min from TO) or am I mistaken?
Re: tx rx serial plugin
Posted: 27 Feb 2018, 17:06
by tango156157
dangu wrote: ↑26 Feb 2018, 01:12
Hello
I work with the firmware "EASYESP" version 2.3.0 build 147 with ESP8266-12
IF I UNDERSTAND WELL, you are sending data from esp to arduino, which strongly slows down the ESP according to you.
In my case, I send data from ARDUINO to ESP via serial interface.
sending is done with this command:
Serial.print ("TaskValueSet, 1,1, [value 1 from Arduino]"), simply (5 times this every 2m30sec)
in fact this montage serves me with arduino to decode the data of a weather station type ks300 in 868mhz, which sends the data to esp which sends a domoticz.
my concern now, "easyesp" send the data according to the time determined by (delay), and not at the reception.
I would like to send the received data just after, and the next sending will be done after receiving the other data, no sending if no data reception.
I dig how to do? ? ?
Hi Dangu, I am also trying to achieve something similar. Please can you share your Arduino code?
Many Thanks
Re: tx rx serial plugin
Posted: 28 Feb 2018, 14:26
by dangu
Hello Tango
do you want to do a montage similar to what I do?
what code do you want, the code that just sends 2 datas to esp for testing,
or the code that receives the datas from the weather station in esp8266 under interrupt, but without using arduino!
Re: tx rx serial plugin
Posted: 02 Mar 2018, 14:53
by tango156157
Hi Dangu,
Thanks for replying back. Actually I am looking for your Arduino side code (completed code which sends data to ESP over Serial).
Many thanks if you can share that.
Regards
T
Re: tx rx serial plugin
Posted: 04 Mar 2018, 19:07
by dangu
hello Tango
I was blocked by the SendToHTTP function, but now that it works, I will be able to advance in the arduino code.
be careful I do not communicate with AT commands, I send values to it by the TaskValueSet command with serial port.
when my program is over, I'll give it to you.