ESPEasy Command Reference

From Let's Control It
Jump to: navigation, 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>
GPIO Plugin Direct control of output pins See:GPIO
Status Plugin Get a status set by GPIO/PWM/Servo command. Status,GPIO,<pin number>
IP Internal Change IP address IP <IP address>
LongPulse Plugin Direct pulse control of output pins See:GPIO
LongPulse_mS Plugin Direct pulse control of output pins, same as above but using mSeconds instead of Seconds. 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. Example for domain:
SendToHTTP <IP address>, <Portnumber>, <command>
SendToHTTP <domain>, <Portnumber>, </url>
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>
TaskClearAll Internal Delete ALL task/device TaskClearAll
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>

Raw list of commands

Some of these commands below are not meant to be used by end users, they might do harm to your system if used wrongly. This list is meant to be a reference list for developers and power users.

event [_C005.ino]
   %valname% [_C005.ino] (variable)
   %value% [_C008.ino] (variable)
email [_N001_Email.ino]
buzzer [_N002_Buzzer.ino]
pinstate [_P001_Switch.ino]
gpio [_P001_Switch.ino]
pwm [_P001_Switch.ino]
pulse [_P001_Switch.ino]
longpulse [_P001_Switch.ino]
longpulse_ms [_P001_Switch.ino]
servo [_P001_Switch.ino]
status [_P001_Switch.ino]
monitor [_P001_Switch.ino]
inputswitchstate [_P001_Switch.ino]
rtttl [_P001_Switch.ino]
tone [_P001_Switch.ino]
mcpgpio [_P009_MCP.ino]
mcppulse [_P009_MCP.ino]
mcplongpulse [_P009_MCP.ino]
extgpio [_P011_PME.ino]
extpwm [_P011_PME.ino]
extpulse [_P011_PME.ino]
extlongpulse [_P011_PME.ino]
LCD [_P012_LCD.ino]
LCDCMD [_P012_LCD.ino]
Off [_P012_LCD.ino]
Clear [_P012_LCD.ino]
pcfgpio [_P019_PCF8574.ino]
pcfpulse [_P019_PCF8574.ino]
pcflongpulse [_P019_PCF8574.ino]
serialsend [_P020_Ser2Net.ino]
setlevel [_P021_Level.ino]
getlevel [_P021_Level.ino]
pcapwm [_P022_PCA9685.ino]
pcafrq [_P022_PCA9685.ino]
OLED [_P023_OLED.ino]
OLEDCMD [_P023_OLED.ino]
Low [_P036_FrameOLED.ino]
High [_P036_FrameOLED.ino]
NeoPixel [_P038_NeoPixel.ino]
NeoPixelAll [_P038_NeoPixel.ino]
NeoPixelLine [_P038_NeoPixel.ino]
NeoClockColor [_P041_NeoClock.ino]
NeoTestAll [_P041_NeoClock.ino]
NeoTestLoop [_P041_NeoClock.ino]
MotorShieldCMD [_P048_Motorshield_v2.ino]
DCMotor [_P048_Motorshield_v2.ino]
Forward [_P048_Motorshield_v2.ino]
Backward [_P048_Motorshield_v2.ino]
Release [_P048_Motorshield_v2.ino]
Stepper [_P048_Motorshield_v2.ino]
SINGLE [_P048_Motorshield_v2.ino]
DOUBLE [_P048_Motorshield_v2.ino]
INTERLEAVE [_P048_Motorshield_v2.ino]
MICROSTEP [_P048_Motorshield_v2.ino]
mhzcalibratezero [_P049_MHZ19.ino]
mhzreset [_P049_MHZ19.ino]
mhzabcenable [_P049_MHZ19.ino]
mhzabcdisable [_P049_MHZ19.ino]
mhzmeasurementrange1000 [_P049_MHZ19.ino]
mhzmeasurementrange2000 [_P049_MHZ19.ino]
mhzmeasurementrange3000 [_P049_MHZ19.ino]
mhzmeasurementrange5000 [_P049_MHZ19.ino]
senseair_setrelay [_P052_SenseAir.ino]
senseair_setABCperiod [_P052_SenseAir.ino]
dmx [_P054_DMX512.ino]
chime [_P055_Chiming.ino]
chimeplay [_P055_Chiming.ino]
chimesave [_P055_Chiming.ino]
mprint [_P057_HT16K33_LED.ino]
mbr [_P057_HT16K33_LED.ino]
mnum [_P057_HT16K33_LED.ino]
stop [_P065_DRF0299_MP3.ino]
vol [_P065_DRF0299_MP3.ino]
eq [_P065_DRF0299_MP3.ino]
tare [_P067_HX711_Load_Cell.ino]
7dn [_P073_7DGT.ino]
7dt [_P073_7DGT.ino]
7don [_P073_7DGT.ino]
7doff [_P073_7DGT.ino]
7db [_P073_7DGT.ino]
background [Command.ino]
executeRules [Command.ino]
clearRTCRAM [Command.ino]
notify [Command.ino]
resetFlashWriteCounter [Command.ino]
udptest [Command.ino]
sdcard [Command.ino]
sdremove [Command.ino]
lowmem [Command.ino]
malloc [Command.ino]
sysload [Command.ino]
SerialFloat [Command.ino]
accessinfo [Command.ino]
clearaccessblock [Command.ino]
meminfo [Command.ino]
TaskClear [Command.ino]
TaskClearAll [Command.ino]
wdconfig [Command.ino]
wdread [Command.ino]
build [Command.ino]
NoSleep [Command.ino]
i2cscanner [Command.ino]
deepSleep [Command.ino]
TaskValueSet [Command.ino]
TaskRun [Command.ino]
TimerSet [Command.ino]
Delay [Command.ino]
SendTo [Command.ino]
Publish [Command.ino]
SendToUDP [Command.ino]
SendToHTTP [Command.ino]
BlynkGet [Command.ino]
WifiSSID [Command.ino]
WifiKey [Command.ino]
WifiSSID2 [Command.ino]
WifiKey2 [Command.ino]
WifiScan [Command.ino]
WifiConnect [Command.ino]
WifiDisconnect [Command.ino]
WifiAPMode [Command.ino]
Unit [Command.ino]
Password [Command.ino]
Reboot [Command.ino]
Restart [Command.ino]
Erase [Command.ino]
Debug [Command.ino]
IP [Command.ino]
Settings [Command.ino]
  MQTT#Connected [Controller.ino] (event)
  System#Wake [ESPEasy.ino] (event)
  System#Boot [ESPEasy.ino] (event)
  System#Sleep [ESPEasy.ino] (event)
   %pvalue% [ESPEasy.ino] (variable)
  Rules#Timer= [Misc.ino] (event)
   %eventvalue% [Misc.ino] (variable)
   %vcc% [StringConverter.ino] (variable)
   %ip% [StringConverter.ino] (variable)
   %rssi% [StringConverter.ino] (variable)
   %ssid% [StringConverter.ino] (variable)
   %unit% [StringConverter.ino] (variable)
   %mac% [StringConverter.ino] (variable)
   %mac_int% [StringConverter.ino] (variable)
   %systm_hm% [StringConverter.ino] (variable)
   %systm_hm_am% [StringConverter.ino] (variable)
   %systime% [StringConverter.ino] (variable)
   %systime_am% [StringConverter.ino] (variable)
   %sysname% [StringConverter.ino] (variable)
   %syshour% [StringConverter.ino] (variable)
   %sysmin% [StringConverter.ino] (variable)
   %syssec% [StringConverter.ino] (variable)
   %sysday% [StringConverter.ino] (variable)
   %sysmonth% [StringConverter.ino] (variable)
   %sysyear% [StringConverter.ino] (variable)
   %sysyears% [StringConverter.ino] (variable)
   %sysweekday% [StringConverter.ino] (variable)
   %sysweekday_s% [StringConverter.ino] (variable)
   %lcltime% [StringConverter.ino] (variable)
   %lcltime_am% [StringConverter.ino] (variable)
   %uptime% [StringConverter.ino] (variable)
   %tskname% [StringConverter.ino] (variable)
   %vname1% [StringConverter.ino] (variable)
   %vname2% [StringConverter.ino] (variable)
   %vname3% [StringConverter.ino] (variable)
   %vname4% [StringConverter.ino] (variable)
   %id% [StringConverter.ino] (variable)
   %val1% [StringConverter.ino] (variable)
   %val2% [StringConverter.ino] (variable)
   %val3% [StringConverter.ino] (variable)
   %val4% [StringConverter.ino] (variable)
   %c_c2f% [StringConverter.ino] (variable)
   %c_ms2Bft% [StringConverter.ino] (variable)
   %c_cm2imp% [StringConverter.ino] (variable)
   %c_mm2imp% [StringConverter.ino] (variable)
   %c_m2day% [StringConverter.ino] (variable)
   %c_m2dh% [StringConverter.ino] (variable)
   %c_m2dhm% [StringConverter.ino] (variable)
   %c_s2dhms% [StringConverter.ino] (variable)
  Clock#Time= [TimeESPeasy.ino] (event)
  Time#Initialized [TimeESPeasy.ino] (event)
  Time#Set [TimeESPeasy.ino] (event)
  Login#Failed [WebServer.ino] (event)
  WiFi#Connected [Wifi.ino] (event)