ESPEasy Command Reference

From Let's Control It
Revision as of 11:25, 15 January 2018 by Grovkillen (talk | contribs) (Removed STATUS command)
Jump to navigation Jump to search

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:

Protocol Syntax Extra information
HTTP http://<espeasyip>/control?cmd=<command> Send commands over the HTTP protocol.
MQTT <MQTT subscribe template>/cmd with payload: <command> Send commands over the MQTT protocol. As of current status this is obeyed only for the first controller in the list.
Serial (TTL) <command> Send commands using serial (RX/TX). Just type the <command>
UDP SendTo <unit nr>, <command> Send commands from one ESP Easy unit to another. 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, it's possible to send a float value along as well. event,<eventName>
event,<eventName>=<eventValue>
GPIO Plugin Direct control of output pins See:GPIO
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>
Password Internal Set the password of the unit Password <new password>
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
ResetFlashWriteCounter Internal Reset flash write to zero. ResetFlashWriteCounter
Rules Internal Rules enabled (1) or rules disabled (0) Rules,<value>
Tone Plugin Play tone via speaker or piezo See:Buzzer (RTTTL)
Rtttl Plugin Play melody via speaker or piezo See:Buzzer (RTTTL)
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
TaskClear Internal Delete the given task/device TaskClear,<task/device nr>
TaskRun Internal Run/excecute the given task/device, use to manually force an update/read of the task. TaskRun,<task/device nr>
TaskValueSet Rules Set values on a Dummy Task device TaskValueSet,<task/device nr>,<value nr>,<value/formula>
TimerSet Rules Start a timed event TimerSet,<timernr>,<timeInSeconds>
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>