Difference between revisions of "ESPEasy System Variables"
Jump to navigation
Jump to search
Line 21: | Line 21: | ||
Now send this command to the ESP: | Now send this command to the ESP: | ||
− | http://<your esp ip>/control?cmd=event, | + | 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. | 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) | (note that 'timerSet' is a rule command and cannot be run directly from a remote command) |
Revision as of 15:54, 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 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)