Difference between revisions of "ESPEasy Command Reference"
Jump to navigation
Jump to search
Grovkillen (talk | contribs) m |
Grovkillen (talk | contribs) m |
||
Line 7: | Line 7: | ||
* Using the Rule engine: just enter the '''<command>''' within an event block or conditional block. | * Using the Rule engine: just enter the '''<command>''' within an event block or conditional block. | ||
− | Commands are divided into several classes: | + | |
+ | {| class="wikitable sortable" | ||
+ | |- | ||
+ | ! style="width: 13%|Protocol | ||
+ | ! style="width: 35%|Syntax | ||
+ | ! Extra information | ||
+ | |- | ||
+ | |||
+ | | HTTP | ||
+ | | '''http://<espeasyip>/control?cmd=<span style="color: white; background:#0077dd"><command></span>''' | ||
+ | | - | ||
+ | |- | ||
+ | |||
+ | | MQTT | ||
+ | | '''<MQTT subscribe template>/cmd''' with payload: '''<span style="color: white; background:#0077dd"><command></span>''' | ||
+ | | As of current status this is obeyed only for the [[ESP Easy web interface#Controllers page (version 2.0+)|first controller]] in the list. | ||
+ | |- | ||
+ | |||
+ | | Serial (TTL) | ||
+ | | '''<span style="color: white; background:#0077dd"><command></span>''' | ||
+ | | Just type the '''<command>''' | ||
+ | |- | ||
+ | |||
+ | | UDP | ||
+ | | '''SendTo <unit nr>, <span style="color: white; background:#0077dd"><command></span>''' | ||
+ | | Setup UDP peer-2-peer first. | ||
+ | |- | ||
+ | |||
+ | | Rules | ||
+ | | '''<span style="color: white; background:#0077dd"><command></span>''' | ||
+ | | Internally within ESP Easy. Just enter the '''<command>''' within an event block or conditional block. | ||
+ | |- | ||
+ | |||
+ | |} | ||
+ | |||
+ | '''<span style="color: white; background:#0077dd">Commands</span>''' are divided into several classes: | ||
<span style="color: red>Internal</span> - Can be run from serial and rules engine | <span style="color: red>Internal</span> - Can be run from serial and rules engine |
Revision as of 19:32, 16 October 2017
ESP Easy offers a set of commands to control hardware devices and provide some basic local control using rules. There are several ways to launch commands on ESP Easy:
- Using HTTP: syntax http://<espeasyip>/control?cmd=<command>
- Using MQTT: send the <command> to topic <MQTT subscribe template>/cmd (as of current status this is obeyed only for the first controller in the list)
- Using Serial port: just type the <command>
- Using UDP between ESP units: SendTo <unit nr>, <command> (Setup UDP peer-2-peer first!)
- Using the Rule engine: just enter the <command> within an event block or conditional block.
Protocol | Syntax | Extra information |
---|---|---|
HTTP | http://<espeasyip>/control?cmd=<command> | - |
MQTT | <MQTT subscribe template>/cmd with payload: <command> | As of current status this is obeyed only for the first controller in the list. |
Serial (TTL) | <command> | Just type the <command> |
UDP | SendTo <unit nr>, <command> | Setup UDP peer-2-peer first. |
Rules | <command> | Internally within ESP Easy. Just enter the <command> within an event block or conditional block. |
Commands are divided into several classes:
Internal - Can be run from serial and rules engine Rules - Can be run from serial and rules engine Plugin - Can be run from serial, rules engine, HTTP, MQTT Special - This can be used from any source
If you want to use internal or rules commands using HTTP/MQTT, setup an event within the rules section and remotely launch the "event" command.
Command | Class | Purpose | Syntax |
---|---|---|---|
Debug | Internal | Change Serial port debug level | Debug <1-4> |
Delay | Rules | Delay rule processing | Delay <delay in milliSeconds> |
Event | Special | Create an event | event,<event> |
GPIO | Plugin | Direct control of output pins | See:GPIO |
Password | Internal | Set the password of the unit | Password <new password> |
Pulse | Plugin | Send short pulses | See:GPIO |
PWM | Plugin | PWM control | See:GPIO |
Servo | Plugin | Servo motor control | See:GPIO |
Tone | Plugin | Play tone via speaker or piezo | See:GPIO and Buzzer (RTTTL) |
Rtttl | Plugin | Play melody via speaker or piezo | See:GPIO and Buzzer (RTTTL) |
IP | Internal | Change IP address | IP <IP address> |
LongPulse | Plugin | Direct pulse control of output pins | See:GPIO |
Name | Internal | Set the name of the unit | Name <new name> |
Pulse | Plugin | Direct pulse control of output pins | See:GPIO |
Publish | Rules | Send command using MQTT broker service | Publish <topic>, <value> |
PWM | Plugin | Direct PWM control of output pins | See:GPIO |
Reboot | Internal | Reboot the ESP | Reboot |
Reset | Internal | Reset config to factory default | Reset |
Save | Internal | Save config to persistent flash memory | Save |
SendTo | Rules | Send command to other ESP (using UDP) | SendTo <unit nr>, <command> |
SendToHTTP | Rules | Send command to other network device using HTTP | SendToHTTP <IP address>, <Portnumber>, <command> |
SendToUDP | Rules | Send command to other network device using UDP | SendToUDP <IP address>, <Portnumber>, <command> |
Servo | Plugin | Direct control of servo motors | See:GPIO |
Settings | Internal | Show settings on serial terminal | Settings |
Status | Plugin | Show status on previously controlled pins | Status <device>,<pin> |
TaskValueSet | Rules | Set values on a Dummy Task device | TaskValueSet <task nr>,<value nr>,<value/formula> |
TimerSet | Rules | Start a timed event | TimerSet <timernr>, |
Unit | Internal | Set the unit number | Unit <unit number> |
WifiAPKey | Internal | Change AP WPA key | WifiAPKey <WPA key> |
WifiConnect | Internal | Connect to configured wireless network | WifiConnect |
WifiDisconnect | Internal | Disconnect from wireless network | WifiDisconnect |
WifiKey | Internal | Change WPA key for primary WiFi | WifiKey <Wifi WPA key> |
WifiKey2 | Internal | Change WPA key for secondary WiFi | WifiKey2 <Wifi WPA key> |
WifiScan | Internal | Scan Wireless networks | WifiScan |
WifiSSID | Internal | Change SSID to connect as primary WiFi | WifiSSID <SSID> |
WifiSSID2 | Internal | Change SSID to connect as secondry WiFi | WifiSSID2 <SSID> |