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

Moderators: rtenklooster, Voyager, BertB, Stuntteam

Forum rules
You have entered the experimental forum, beware!!!
Post Reply
Message
Author
martiniman
Normal user
Posts: 13
Joined: 10 Jan 2017, 11:07

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

#1 Post by martiniman » 21 Sep 2017, 11:21

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.
Last edited by martiniman on 23 Oct 2018, 09:44, edited 2 times in total.

Martinus

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

#2 Post by Martinus » 23 Sep 2017, 14:45

like this:
SerialSend 10;NewKaku;000003;2;8;

martiniman
Normal user
Posts: 13
Joined: 10 Jan 2017, 11:07

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

#3 Post by martiniman » 25 Sep 2017, 09:28

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.

mikeluyten
New user
Posts: 5
Joined: 24 Oct 2016, 05:57

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

#4 Post by mikeluyten » 16 Oct 2017, 10:52

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?

martiniman
Normal user
Posts: 13
Joined: 10 Jan 2017, 11:07

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

#5 Post by martiniman » 08 Nov 2017, 08:03

Hi.
I just review code https://github.com/letscontrolit/ESPEas ... er2Net.ino and there is no parser for CMD ID SWITCH.
Nothing pulished.

Martinus

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

#6 Post by Martinus » 08 Nov 2017, 15:55

This should have been fixed on github on september 23rd
Use %eventvalue% to get the literal event string

zang
New user
Posts: 4
Joined: 30 Jan 2018, 15:51

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

#7 Post by zang » 01 Feb 2018, 00:08

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

seb82
Normal user
Posts: 62
Joined: 05 Sep 2018, 10:56

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

#8 Post by seb82 » 05 Sep 2018, 11:04

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.
Sébastien - espRFLinkMQTT gateway RFLink MQTT on esp

martiniman
Normal user
Posts: 13
Joined: 10 Jan 2017, 11:07

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

#9 Post by martiniman » 23 Oct 2018, 09:46

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

seb82
Normal user
Posts: 62
Joined: 05 Sep 2018, 10:56

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

#10 Post by seb82 » 23 Oct 2018, 19:28

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
Sébastien - espRFLinkMQTT gateway RFLink MQTT on esp

martiniman
Normal user
Posts: 13
Joined: 10 Jan 2017, 11:07

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

#11 Post by martiniman » 25 Oct 2018, 14:42

Wow, your firmware looks great, i will try it soon.

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests