Difference between revisions of "ESPEasy Command Reference"

From Let's Control It
Jump to navigation Jump to search
(Removed plugin specific commands (added them to the plugin pages!))
m
Line 15: Line 15:
  
 
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.
 +
 +
 +
  
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
Line 25: Line 28:
  
 
| Debug
 
| Debug
| Internal
+
| style="background: red; color: white;" | Internal
 
| Change Serial port debug level
 
| Change Serial port debug level
 
| Debug <1-4>
 
| Debug <1-4>
 
|-
 
|-
 
| Delay
 
| Delay
| Rules
+
| style="background: green; color: white;" | Rules
 
| Delay rule processing
 
| Delay rule processing
 
| Delay <delay in milliSeconds>
 
| Delay <delay in milliSeconds>
Line 36: Line 39:
  
 
| Event
 
| Event
| Special
+
| style="background: black; color: white;" | Special
 
| Create an event
 
| Create an event
 
| event,<event>
 
| event,<event>
Line 42: Line 45:
  
 
| GPIO
 
| GPIO
| Plugin
+
| style="background: orange; color: black;" | Plugin
 
| Direct control of output pins
 
| Direct control of output pins
 
| See:[[GPIO]]
 
| See:[[GPIO]]
Line 48: Line 51:
  
 
| Password
 
| Password
| Internal
+
| style="background: red; color: white;" | Internal
 
| Set the password of the unit
 
| Set the password of the unit
 
| Password <new password>
 
| Password <new password>
Line 54: Line 57:
  
 
| Pulse
 
| Pulse
| Plugin
+
| style="background: orange; color: black;" | Plugin
 
| Send short pulses
 
| Send short pulses
 
| See:[[GPIO]]
 
| See:[[GPIO]]
Line 60: Line 63:
  
 
| PWM
 
| PWM
| Plugin
+
| style="background: orange; color: black;" | Plugin
 
| PWM control
 
| PWM control
 
| See:[[GPIO]]
 
| See:[[GPIO]]
 
|-
 
|-
 
| Servo
 
| Servo
| Plugin
+
| style="background: orange; color: black;" | Plugin
 
| Servo motor control
 
| Servo motor control
 
| See:[[GPIO]]
 
| See:[[GPIO]]
Line 71: Line 74:
  
 
| Tone
 
| Tone
| Plugin
+
| style="background: orange; color: black;" | Plugin
 
| Play tone via speaker or piezo
 
| Play tone via speaker or piezo
 
| See:[[GPIO]]
 
| See:[[GPIO]]
 
|-
 
|-
 
| Rtttl
 
| Rtttl
| Plugin
+
| style="background: orange; color: black;" | Plugin
 
| Play melody via speaker or piezo
 
| Play melody via speaker or piezo
 
| See:[[GPIO]]
 
| See:[[GPIO]]
Line 82: Line 85:
  
 
| IP
 
| IP
| Internal
+
| style="background: red; color: white;" | Internal
 
| Change IP address
 
| Change IP address
 
| IP <IP address>
 
| IP <IP address>
Line 88: Line 91:
  
 
| LongPulse
 
| LongPulse
| Plugin
+
| style="background: orange; color: black;" | Plugin
 
| Direct pulse control of output pins
 
| Direct pulse control of output pins
 
| See:[[GPIO]]
 
| See:[[GPIO]]
Line 94: Line 97:
  
 
| Name
 
| Name
| Internal
+
| style="background: red; color: white;" | Internal
 
| Set the name of the unit
 
| Set the name of the unit
 
| Name <new name>
 
| Name <new name>
Line 100: Line 103:
  
 
| Pulse
 
| Pulse
| Plugin
+
| style="background: orange; color: black;" | Plugin
 
| Direct pulse control of output pins
 
| Direct pulse control of output pins
 
| See:[[GPIO]]
 
| See:[[GPIO]]
Line 106: Line 109:
  
 
| Publish
 
| Publish
| Rules
+
| style="background: green; color: white;" | Rules
 
| Send command using MQTT broker service
 
| Send command using MQTT broker service
 
| Publish <topic>, <value>
 
| Publish <topic>, <value>
Line 112: Line 115:
  
 
| PWM
 
| PWM
| Plugin
+
| style="background: orange; color: black;" | Plugin
 
| Direct PWM control of output pins
 
| Direct PWM control of output pins
 
| See:[[GPIO]]
 
| See:[[GPIO]]
Line 118: Line 121:
  
 
| Reboot
 
| Reboot
| Internal
+
| style="background: red; color: white;" | Internal
 
| Reboot the ESP
 
| Reboot the ESP
 
| Reboot
 
| Reboot
Line 124: Line 127:
  
 
| Reset
 
| Reset
| Internal
+
| style="background: red; color: white;" | Internal
 
| Reset config to factory default
 
| Reset config to factory default
 
| Reset
 
| Reset
Line 130: Line 133:
  
 
| Save
 
| Save
| Internal
+
| style="background: red; color: white;" | Internal
 
| Save config to persistent flash memory
 
| Save config to persistent flash memory
 
| Save
 
| Save
Line 136: Line 139:
  
 
| SendTo
 
| SendTo
| Rules
+
| style="background: green; color: white;" | Rules
 
| Send command to other ESP (using UDP)
 
| Send command to other ESP (using UDP)
 
| SendTo <unit nr>, <command>
 
| SendTo <unit nr>, <command>
Line 142: Line 145:
  
 
| SendToHTTP
 
| SendToHTTP
| Rules
+
| style="background: green; color: white;" | Rules
 
| Send command to other network device using HTTP
 
| Send command to other network device using HTTP
 
| SendToHTTP <IP address>, <Portnumber>, <command>
 
| SendToHTTP <IP address>, <Portnumber>, <command>
Line 148: Line 151:
  
 
| SendToUDP
 
| SendToUDP
| Rules
+
| style="background: green; color: white;" | Rules
 
| Send command to other network device using UDP
 
| Send command to other network device using UDP
 
| SendToUDP <IP address>, <Portnumber>, <command>
 
| SendToUDP <IP address>, <Portnumber>, <command>
Line 154: Line 157:
  
 
| Servo
 
| Servo
| Plugin
+
| style="background: orange; color: black;" | Plugin
 
| Direct control of servo motors
 
| Direct control of servo motors
 
| See:[[GPIO]]
 
| See:[[GPIO]]
Line 160: Line 163:
  
 
| Settings
 
| Settings
| Internal
+
| style="background: red; color: white;" | Internal
 
| Show settings on serial terminal
 
| Show settings on serial terminal
 
| Settings
 
| Settings
Line 166: Line 169:
  
 
| Status
 
| Status
| Plugin
+
| style="background: orange; color: black;" | Plugin
 
| Show status on previously controlled pins
 
| Show status on previously controlled pins
 
| Status <device>,<pin>
 
| Status <device>,<pin>
Line 172: Line 175:
  
 
| TaskValueSet
 
| TaskValueSet
| Rules
+
| style="background: green; color: white;" | Rules
 
| Set values on a Dummy Task device
 
| Set values on a Dummy Task device
 
| TaskValueSet <task nr>,<value nr>,<value/formula>
 
| TaskValueSet <task nr>,<value nr>,<value/formula>
Line 178: Line 181:
  
 
| TimerSet
 
| TimerSet
| Rules
+
| style="background: green; color: white;" | Rules
 
| Start a timed event
 
| Start a timed event
 
| TimerSet <timernr>,<time in seconds>
 
| TimerSet <timernr>,<time in seconds>
Line 184: Line 187:
  
 
| Unit
 
| Unit
| Internal
+
| style="background: red; color: white;" | Internal
 
| Set the unit number
 
| Set the unit number
 
| Unit <unit number>
 
| Unit <unit number>
Line 190: Line 193:
  
 
| WifiAPKey
 
| WifiAPKey
| Internal
+
| style="background: red; color: white;" | Internal
 
| Change AP WPA key
 
| Change AP WPA key
 
| WifiAPKey <WPA key>
 
| WifiAPKey <WPA key>
Line 196: Line 199:
  
 
| WifiConnect
 
| WifiConnect
| Internal
+
| style="background: red; color: white;" | Internal
 
| Connect to configured wireless network
 
| Connect to configured wireless network
 
| WifiConnect
 
| WifiConnect
Line 202: Line 205:
  
 
| WifiDisconnect
 
| WifiDisconnect
| Internal
+
| style="background: red; color: white;" | Internal
 
| Disconnect from wireless network
 
| Disconnect from wireless network
 
| WifiDisconnect
 
| WifiDisconnect
Line 208: Line 211:
  
 
| WifiKey
 
| WifiKey
| Internal
+
| style="background: red; color: white;" | Internal
 
| Change WPA key for primary WiFi
 
| Change WPA key for primary WiFi
 
| WifiKey <Wifi WPA key>
 
| WifiKey <Wifi WPA key>
Line 214: Line 217:
  
 
| WifiKey2
 
| WifiKey2
| Internal
+
| style="background: red; color: white;" | Internal
 
| Change WPA key for secondary WiFi
 
| Change WPA key for secondary WiFi
 
| WifiKey2 <Wifi WPA key>
 
| WifiKey2 <Wifi WPA key>
Line 220: Line 223:
  
 
| WifiScan
 
| WifiScan
| Internal
+
| style="background: red; color: white;" | Internal
 
| Scan Wireless networks
 
| Scan Wireless networks
 
| WifiScan
 
| WifiScan
Line 226: Line 229:
  
 
| WifiSSID
 
| WifiSSID
| Internal
+
| style="background: red; color: white;" | Internal
 
| Change SSID to connect as primary WiFi
 
| Change SSID to connect as primary WiFi
 
| WifiSSID <SSID>
 
| WifiSSID <SSID>
Line 232: Line 235:
  
 
| WifiSSID2
 
| WifiSSID2
| Internal
+
| style="background: red; color: white;" | Internal
 
| Change SSID  to connect as secondry WiFi
 
| Change SSID  to connect as secondry WiFi
 
| WifiSSID2 <SSID>
 
| WifiSSID2 <SSID>
 
|}
 
|}

Revision as of 19:03, 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>
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>