Difference between revisions of "ESPEasy System Variables"
Jump to navigation
Jump to search
(Created page with "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...") |
|||
Line 15: | Line 15: | ||
Sample: | Sample: | ||
− | on | + | on remoteTimerControl1 do |
timerSet 1,%eventvalue% | timerSet 1,%eventvalue% | ||
endon | endon | ||
− | Now send this command to the ESP: event, | + | Now send this command to the ESP: event,remoteTimerControl1=5 |
and it will set timer 1 to 5 seconds. | and it will set timer 1 to 5 seconds. | ||
Using this technique you can parse a value from an event to the rule engine. | 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) | (note that 'timerSet' is a rule command and cannot be run directly from a remote command) |
Revision as of 15:49, 10 October 2016
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 %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:
on remoteTimerControl1 do timerSet 1,%eventvalue% endon
Now send this command to the ESP: event,remoteTimerControl1=5 and it will set timer 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)