Difference between revisions of "ESPEasy Command Reference"

From Let's Control It
Jump to navigation Jump to search
m
m
Line 16: Line 16:
 
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.
 
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.
  
{| border="1" style="border-collapse:collapse; border:1px solid silver;text-align:left;width:50%;"
+
{| class="wikitable sortable"
 +
|-
 
! Command
 
! Command
 
! Class
 
! Class
Line 22: Line 23:
 
! Syntax
 
! Syntax
 
|-
 
|-
 +
 
| Debug
 
| Debug
 
| Internal
 
| Internal
Line 32: Line 34:
 
| Delay <delay in milliSeconds>
 
| Delay <delay in milliSeconds>
 
|-
 
|-
 +
 
| Event
 
| Event
 
| Special
 
| Special
Line 37: Line 40:
 
| event,<event>
 
| event,<event>
 
|-
 
|-
 +
 
| GPIO
 
| GPIO
 
| Plugin
 
| Plugin
Line 42: Line 46:
 
| See:[[GPIO]]
 
| See:[[GPIO]]
 
|-
 
|-
 +
 
| Password
 
| Password
 
| Internal
 
| Internal
Line 47: Line 52:
 
| Password <new password>
 
| Password <new password>
 
|-
 
|-
 +
 
| Pulse
 
| Pulse
 
| Plugin
 
| Plugin
Line 52: Line 58:
 
| See:[[GPIO]]
 
| See:[[GPIO]]
 
|-
 
|-
 +
 
| PWM
 
| PWM
 
| Plugin
 
| Plugin
Line 62: Line 69:
 
| See:[[GPIO]]
 
| See:[[GPIO]]
 
|-
 
|-
 +
 
| Tone
 
| Tone
 
| Plugin
 
| Plugin
Line 72: Line 80:
 
| See:[[GPIO]]
 
| See:[[GPIO]]
 
|-
 
|-
 +
 
| IP
 
| IP
 
| Internal
 
| Internal
Line 77: Line 86:
 
| IP <IP address>
 
| IP <IP address>
 
|-
 
|-
 +
 
| LCD
 
| LCD
 
| Plugin
 
| Plugin
Line 82: Line 92:
 
| See:[[LCDDisplay]]
 
| See:[[LCDDisplay]]
 
|-
 
|-
 +
 
| LCDCMD
 
| LCDCMD
 
| Plugin
 
| Plugin
Line 87: Line 98:
 
| See:[[LCDDisplay]]
 
| See:[[LCDDisplay]]
 
|-
 
|-
 +
 
| LongPulse
 
| LongPulse
 
| Plugin
 
| Plugin
Line 92: Line 104:
 
| See:[[GPIO]]
 
| See:[[GPIO]]
 
|-
 
|-
 +
 
| MCPGPIO
 
| MCPGPIO
 
| Plugin
 
| Plugin
Line 97: Line 110:
 
| See:[[MCP23017]]
 
| See:[[MCP23017]]
 
|-
 
|-
 +
 
| MCPPulse
 
| MCPPulse
 
| Plugin
 
| Plugin
Line 102: Line 116:
 
| See:[[MCP23017]]
 
| See:[[MCP23017]]
 
|-
 
|-
 +
 
| MCPLongPulse
 
| MCPLongPulse
 
| Plugin
 
| Plugin
Line 107: Line 122:
 
| See:[[MCP23017]]
 
| See:[[MCP23017]]
 
|-
 
|-
 +
 
| Name
 
| Name
 
| Internal
 
| Internal
Line 112: Line 128:
 
| Name <new name>
 
| Name <new name>
 
|-
 
|-
 +
 
| OLED
 
| OLED
 
| Plugin
 
| Plugin
Line 117: Line 134:
 
| See:[[OLEDDisplay]]
 
| See:[[OLEDDisplay]]
 
|-
 
|-
 +
 
| OLEDCMD
 
| OLEDCMD
 
| Plugin
 
| Plugin
Line 122: Line 140:
 
| See:[[OLEDDisplay]]
 
| See:[[OLEDDisplay]]
 
|-
 
|-
 +
 
| PCAPWM
 
| PCAPWM
 
| Plugin
 
| Plugin
Line 127: Line 146:
 
| See:[[PCA9685]]
 
| See:[[PCA9685]]
 
|-
 
|-
 +
 
| PCFGPIO
 
| PCFGPIO
 
| Plugin
 
| Plugin
Line 132: Line 152:
 
| See:[[PCF8574]]
 
| See:[[PCF8574]]
 
|-
 
|-
 +
 
| PCFPulse
 
| PCFPulse
 
| Plugin
 
| Plugin
Line 137: Line 158:
 
| See:[[PCF8574]]
 
| See:[[PCF8574]]
 
|-
 
|-
 +
 
| PCFLongPulse
 
| PCFLongPulse
 
| Plugin
 
| Plugin
Line 142: Line 164:
 
| See:[[PCF8574]]
 
| See:[[PCF8574]]
 
|-
 
|-
 +
 
| Pulse
 
| Pulse
 
| Plugin
 
| Plugin
Line 147: Line 170:
 
| See:[[GPIO]]
 
| See:[[GPIO]]
 
|-
 
|-
 +
 
| Publish
 
| Publish
 
| Rules
 
| Rules
Line 152: Line 176:
 
| Publish <topic>, <value>
 
| Publish <topic>, <value>
 
|-
 
|-
 +
 
| PWM
 
| PWM
 
| Plugin
 
| Plugin
Line 157: Line 182:
 
| See:[[GPIO]]
 
| See:[[GPIO]]
 
|-
 
|-
 +
 
| Reboot
 
| Reboot
 
| Internal
 
| Internal
Line 162: Line 188:
 
| Reboot
 
| Reboot
 
|-
 
|-
 +
 
| Reset
 
| Reset
 
| Internal
 
| Internal
Line 167: Line 194:
 
| Reset
 
| Reset
 
|-
 
|-
 +
 
| Save
 
| Save
 
| Internal
 
| Internal
Line 172: Line 200:
 
| Save
 
| Save
 
|-
 
|-
 +
 
| SendTo
 
| SendTo
 
| Rules
 
| Rules
Line 177: Line 206:
 
| SendTo <unit nr>, <command>
 
| SendTo <unit nr>, <command>
 
|-
 
|-
 +
 
| SendToHTTP
 
| SendToHTTP
 
| Rules
 
| Rules
Line 182: Line 212:
 
| SendToHTTP <IP address>, <Portnumber>, <command>
 
| SendToHTTP <IP address>, <Portnumber>, <command>
 
|-
 
|-
 +
 
| SendToUDP
 
| SendToUDP
 
| Rules
 
| Rules
Line 187: Line 218:
 
| SendToUDP <IP address>, <Portnumber>, <command>
 
| SendToUDP <IP address>, <Portnumber>, <command>
 
|-
 
|-
 +
 
| Servo
 
| Servo
 
| Plugin
 
| Plugin
Line 192: Line 224:
 
| See:[[GPIO]]
 
| See:[[GPIO]]
 
|-
 
|-
 +
 
| Settings
 
| Settings
 
| Internal
 
| Internal
Line 197: Line 230:
 
| Settings
 
| Settings
 
|-
 
|-
 +
 
| Status
 
| Status
 
| Plugin
 
| Plugin
Line 202: Line 236:
 
| Status <device>,<pin>
 
| Status <device>,<pin>
 
|-
 
|-
 +
 
| TaskValueSet
 
| TaskValueSet
 
| Rules
 
| Rules
Line 207: Line 242:
 
| TaskValueSet <task nr>,<value nr>,<value/formula>
 
| TaskValueSet <task nr>,<value nr>,<value/formula>
 
|-
 
|-
 +
 
| TimerSet
 
| TimerSet
 
| Rules
 
| Rules
Line 212: Line 248:
 
| TimerSet <timernr>,<time in seconds>
 
| TimerSet <timernr>,<time in seconds>
 
|-
 
|-
 +
 
| Unit
 
| Unit
 
| Internal
 
| Internal
Line 217: Line 254:
 
| Unit <unit number>
 
| Unit <unit number>
 
|-
 
|-
 +
 
| WifiAPKey
 
| WifiAPKey
 
| Internal
 
| Internal
Line 222: Line 260:
 
| WifiAPKey <WPA key>
 
| WifiAPKey <WPA key>
 
|-
 
|-
 +
 
| WifiConnect
 
| WifiConnect
 
| Internal
 
| Internal
Line 227: Line 266:
 
| WifiConnect
 
| WifiConnect
 
|-
 
|-
 +
 
| WifiDisconnect
 
| WifiDisconnect
 
| Internal
 
| Internal
Line 232: Line 272:
 
| WifiDisconnect
 
| WifiDisconnect
 
|-
 
|-
 +
 
| WifiKey
 
| WifiKey
 
| Internal
 
| Internal
Line 237: Line 278:
 
| WifiKey <Wifi WPA key>
 
| WifiKey <Wifi WPA key>
 
|-
 
|-
 +
 
| WifiKey2
 
| WifiKey2
 
| Internal
 
| Internal
Line 242: Line 284:
 
| WifiKey2 <Wifi WPA key>
 
| WifiKey2 <Wifi WPA key>
 
|-
 
|-
 +
 
| WifiScan
 
| WifiScan
 
| Internal
 
| Internal
Line 247: Line 290:
 
| WifiScan
 
| WifiScan
 
|-
 
|-
 +
 
| WifiSSID
 
| WifiSSID
 
| Internal
 
| Internal
Line 252: Line 296:
 
| WifiSSID <SSID>
 
| WifiSSID <SSID>
 
|-
 
|-
 +
 
| WifiSSID2
 
| WifiSSID2
 
| Internal
 
| Internal

Revision as of 17:39, 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.

Commands are divided into several classes:

Internal - Can be run from serial and rules engine
Rules -  Can be run from serial and rules engine
Plugins - 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
Rtttl Plugin Play melody via speaker or piezo See:GPIO
IP Internal Change IP address IP <IP address>
LCD Plugin Write text messages to LCD screen See:LCDDisplay
LCDCMD Plugin Control LCD screen See:LCDDisplay
LongPulse Plugin Direct pulse control of output pins See:GPIO
MCPGPIO Plugin Control MCP23017 output pins See:MCP23017
MCPPulse Plugin Pulse control on MCP23017 output pins See:MCP23017
MCPLongPulse Plugin Long pulse control on MCP23017 output pins See:MCP23017
Name Internal Set the name of the unit Name <new name>
OLED Plugin Write text messages to OLED screen See:OLEDDisplay
OLEDCMD Plugin Control OLED screen See:OLEDDisplay
PCAPWM Plugin Control PCA9685 pwm pins See:PCA9685
PCFGPIO Plugin Control PCF8574 output pins See:PCF8574
PCFPulse Plugin Pulse control on PCF8574 output pins See:PCF8574
PCFLongPulse Plugin Long pulse control on PCF8574 output pins See:PCF8574
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>