Difference between revisions of "ESPEasy System Variables"

From Let's Control It
Jump to navigation Jump to search
Line 5: Line 5:
  
 
  %sysname% - Name as configured through the webgui
 
  %sysname% - Name as configured through the webgui
  %systime% - Current time if NTP is enabled (HH:MM:SS, HH:MM prior to v2.0)
+
  %systime% - Current time if NTP is enabled (hh:mm:ss, hh:mm prior to v2.0)
  %systime_am% - Current am/pm time if NTP is enabled (HH:MM:SS xM)
+
  %systime_am% - Current am/pm time if NTP is enabled (hh:mm:ss xm)
  %lcltime% - Current date/time if NTP is enabled (YYYY-MM-DD HH:MM:SS, HH:MM prior to v2.0)
+
  %lcltime% - Current date/time if NTP is enabled (YYYY-MM-DD hh:mm:ss, HH:MM)
  %lcltime_am% - Current date/time (am/pm) if NTP is enabled (YYYY-MM-DD HH:MM:SS xM)
+
  %lcltime_am% - Current date/time (am/pm) if NTP is enabled (YYYY-MM-DD hh:mm:ss xm)
  %syshour% - HH
+
  %syshour% - hh
  %sysmin% - MM
+
  %sysmin% - mm
  %syssec% - SS
+
  %syssec% - ss
 
  %sysday% - DD
 
  %sysday% - DD
 
  %sysmonth% - XX
 
  %sysmonth% - XX

Revision as of 00:41, 10 March 2018

ESP Easy system variables:

Generic: These can be used in templates for HTTP, MQTT, OLED and LCD displays and within rules:

%sysname%	- Name as configured through the webgui
%systime%	- Current time if NTP is enabled (hh:mm:ss, hh:mm prior to v2.0)
%systime_am%	- Current am/pm time if NTP is enabled (hh:mm:ss xm)
%lcltime%	- Current date/time if NTP is enabled (YYYY-MM-DD hh:mm:ss, HH:MM)
%lcltime_am%	- Current date/time (am/pm) if NTP is enabled (YYYY-MM-DD hh:mm:ss xm)
%syshour%	- hh
%sysmin%	- mm
%syssec%	- ss
%sysday%	- DD
%sysmonth%	- XX
%sysyear%	- 4 digits - 2017
%sysyears%	- 2 digits - 17
%sysweekday%	- Weekday (integer) - 1, 2, 3... (1=Sunday, 2=Monday etc.)
%sysweekday_s%	- Weekday (verbose) - Sun, Mon, Tue...
%uptime%	- Uptime in minutes
%rssi% 		- WiFi signal strength
%ip%		- Current IP address
%unit%		- Unit number
%ssid%		- Name of current WiFi
%vcc% 		- VCC value, this is only available in the VCC versions of FW.
%mac% 		- MAC address
%mac_int% 	- MAC address in integer to be used in rules (only the last 24 bit)

More uses of these system variables can be seen in the rules section and formula section.