Difference between revisions of "ESPEasy System Variables"
Jump to navigation
Jump to search
Grovkillen (talk | contribs) m |
Grovkillen (talk | contribs) m |
||
Line 6: | Line 6: | ||
%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) | ||
+ | %syshour% - HH | ||
+ | %sysmin% - MM | ||
+ | %syssec% - SS | ||
+ | %sysday% - DD | ||
+ | %sysmonth% - XX | ||
+ | %sysyear% - 4 digits - 2017 | ||
+ | %sysyears% - 2 digits - 17 | ||
%uptime% - Uptime in minutes | %uptime% - Uptime in minutes | ||
%ip% - Current IP address | %ip% - Current IP address |
Revision as of 21:27, 16 October 2017
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) %syshour% - HH %sysmin% - MM %syssec% - SS %sysday% - DD %sysmonth% - XX %sysyear% - 4 digits - 2017 %sysyears% - 2 digits - 17 %uptime% - Uptime in minutes %ip% - Current IP address %vcc% - VCC value, this needs a custom compiled firmware! (#define FEATURE_ADC_VCC true)
Rules engine specific:
%eventvalue% - substitutes the event value (everything that comes after the '=' sign)
Sample rules section:
on remoteTimerControl do timerSet 1,%eventvalue% endon
Now send this command to the ESP:
http://<your esp ip>/control?cmd=event,remoteTimerControl=5
and it will set rules timer nr 1 to 5 seconds. Using this technique you can parse a value from an event to the rule engine. (note that 'timerSet' is a rule command and cannot be run directly from a remote command)