Page 1 of 1

Serial Server - how to send commnad to Serial port from ESP?

Posted: 21 Sep 2017, 11:21
by martiniman
Hi!
I use Serial Server (Ser2Net) plugin and 'Event processing:RFLink', i received commands from RFLink (http://www.rflink.nl/blog2/)
and post it to MQTT via EspEasy Rules and Publish command (this rule do NOT work):

Code: Select all

On !RFLink do
  Publish %sysname%/RFLinkRAW,[RFLinkRAW]
endon
My settings - https://www.dropbox.com/s/ivwbhbjn6cedk ... y.png?dl=0
Image

But how to send commnad to RFLink from ESP (i can do it from telnet)?

Thank you.

Re: Serial Server - how to send commnad to Serial port from ESP?

Posted: 23 Sep 2017, 14:45
by Martinus
like this:
SerialSend 10;NewKaku;000003;2;8;

Re: Serial Server - how to send commnad to Serial port from ESP?

Posted: 25 Sep 2017, 09:28
by martiniman
Hi, thanks for response.
I cannot publish to mqtt received from RFlink command.
I rise Issue (https://github.com/letscontrolit/ESPEasy/issues/514) but Contributors says this is not a bug.
rflink message is

Code: Select all

20;9C;RTS;ID=3f4d5d;SWITCH=01;CMD=ON;
I try all combinations, but no luck:

Code: Select all

on !rflink do
publish /test1,ok
publish /test1a,[rflink]
publish /test1b,[!rflink]
publish /test1c,[rflink#]
publish /test1d,[!rflink#]
endon

on [!rflink] do
publish /test2,ok
publish /test2a,[rflink]
publish /test2b,[!rflink]
publish /test2c,[rflink#]
publish /test2d,[!rflink#]
endon

on !rflink# do
publish /test3,ok
publish /test3a,[rflink]
publish /test3b,[!rflink]
publish /test3c,[rflink#]
publish /test3d,[!rflink#]
endon

on [!rflink#] do
publish /test4,ok
publish /test4a,[rflink]
publish /test4b,[!rflink]
publish /test4c,[rflink#]
publish /test4d,[!rflink#]
endon
Result:

Code: Select all

/test1 ok
/test1a (null)
/test1b (null)
/test1c 0.00
/test1d (null)

/test2 ok
/test2a (null)
/test2b (null)
/test2c 0.00
/test2d (null)

/test3 ok
/test3a (null)
/test3b (null)
/test3c 0.00
/test3d (null)

/test4 ok
/test4a (null)
/test4b (null)
/test4c 0.00
/test4d (null)

Please show me right way to do it.

Re: Serial Server - how to send commnad to Serial port from ESP?

Posted: 16 Oct 2017, 10:52
by mikeluyten
I believe you need to specify which value to send?
Can you try:

Code: Select all

[rflink#RTS]
[rflink#ID]
[rflink#SWITCH]
[rflink#CMD]
and see if anything is published?

Re: Serial Server - how to send commnad to Serial port from ESP?

Posted: 08 Nov 2017, 08:03
by martiniman
Hi.
I just review code https://github.com/letscontrolit/ESPEas ... er2Net.ino and there is no parser for CMD ID SWITCH.
Nothing pulished.

Re: Serial Server - how to send commnad to Serial port from ESP?

Posted: 08 Nov 2017, 15:55
by Martinus
This should have been fixed on github on september 23rd
Use %eventvalue% to get the literal event string

Re: Serial Server - how to send commnad to Serial port from ESP?

Posted: 01 Feb 2018, 00:08
by zang
What's the proper method to use this feature? When I use %eventvalue% I just get "!RFLink#". See my post here

viewtopic.php?f=4&t=4760

Re: Serial Server - how to send commnad to Serial port from ESP?

Posted: 05 Sep 2018, 11:04
by seb82
This is working for me with "RFLink" selected for event processing and this rule:

Code: Select all

On !RFLink#* do
Publish test,%eventvalue%
endon
Or if you select "Generic" for event processing:

Code: Select all

On !Serial#* do
Publish test,%eventvalue%
endon
I had to put a "RX Receive Timeout" of 10 ms or it would strip off a few characters.

Re: Serial Server - how to send commnad to Serial port from ESP?

Posted: 23 Oct 2018, 09:46
by martiniman
seb82 wrote: 05 Sep 2018, 11:04 This is working for me with "RFLink" selected for event processing and this rule
Thank you so much!
Full description is here: viewtopic.php?p=32531#p32531

Re: Serial Server - how to send commnad to Serial port from ESP?

Posted: 23 Oct 2018, 19:28
by seb82
Thanks for the link. It is great if there is a plugin for ESP Easy, I shall try for sure.

At the time, I believe it was not existing so I made my own firmware with the help of some existing code from github. It can be found here : https://github.com/seb821/espRFLinkMQTT

Re: Serial Server - how to send commnad to Serial port from ESP?

Posted: 25 Oct 2018, 14:42
by martiniman
Wow, your firmware looks great, i will try it soon.