Shortly, my goal is to publish an MQTT message from my nodeMCU running ESPeasy upon receiving a message on the serial RX pin (from an Arduino). I'm attempting to do this by configuring a rule on the ESPeasy.
I've looked in these forums and in the official documentation(s), but I haven't been able to find the answer.
Closest forum post I could find was https://www.letscontrolit.com/forum/vie ... php?t=5478, but it doesn't explain fully how to get it running.
They use this rule:
Code: Select all
On Serial#myname do
publish home/ESP07/Alarm,[Serial#myname]
Endon
Code: Select all
on !Serial#T1018* do
TaskValueSet 2,1,{strtol:16:{substring:13:15:%eventvalue%}}.{strtol:16:{substring:15:17:%eventvalue%}}*100/255
endon
I tried all possible combinations of turning on/off the serial server, different "on" statements, different serial input commands/messages, but to no avail. No MQTT messages are being published. (As a sanity check, the rules and mqtt config do work when I use an example rule with a timer).
Can anyone give me some basic steps I need to take to get this to work?
In particular, I have the following questions:
- How should I formulate my "on" statement (and what does it syntactically mean)?
- Should I turn on the Serial Server ("plugin")?
- How/where is the serial communication set up (baud rate, stop bits, etc.)?
Ostheer