Tutorial SendTo

From Let's Control It
Jump to navigation Jump to search

WIP.gif


Beware.jpg

Information on this page is based on preliminary development. Beware that functionality may be incomplete, not fully tested and subject to change. It may even be removed in future releases if it turns out be unstable or based on erroneous interpretation of the operation of third-party technology. At this stage, we provide the information to support development and testing.

With SendTo you can add a Rule to your ESPEasy, capable of sending an event to another unit.
This can be useful in cases where you want to take immediate action.
There are two flavors:
- SendTo to send remote unit control commands using the internal peer to peer UDP messaging
- Publish to send remote commands to other ESP using MQTT broker

SendTo

SendTo <unit>,<command>
on demoEvent do
  sendTo 2,GPIO,2,1
  sendTo 2,event,givemesomewater
endon


Publish

Publish <topic>,<value>