<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.webcore.co/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Eibyer</id>
		<title>webCoRE Wiki - Web-enabled Community's own Rule Engine - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.webcore.co/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Eibyer"/>
		<link rel="alternate" type="text/html" href="https://wiki.webcore.co/Special:Contributions/Eibyer"/>
		<updated>2026-05-15T15:00:34Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.28.0</generator>

	<entry>
		<id>https://wiki.webcore.co/index.php?title=Variable&amp;diff=821</id>
		<title>Variable</title>
		<link rel="alternate" type="text/html" href="https://wiki.webcore.co/index.php?title=Variable&amp;diff=821"/>
				<updated>2018-09-12T15:27:22Z</updated>
		
		<summary type="html">&lt;p&gt;Eibyer: /* Global Variables */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A ''variable'' is a container for data that can be referenced or modified at a later time. Common uses of variables include&lt;br /&gt;
&lt;br /&gt;
* Tracking a value for use in the future &lt;br /&gt;
* Communicating or tracking state between pistons&lt;br /&gt;
* Avoiding repetitive code by storing data that needs to be used in multiple places in a piston&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Variable scopes==&lt;br /&gt;
===Local Variables===&lt;br /&gt;
Local variables are owned by an individual piston. They are unique to each piston and are not shared, so multiple pistons can safely define local variables with the same name. &lt;br /&gt;
&lt;br /&gt;
The ''Show variables'' option in the piston editor enables a &amp;lt;code&amp;gt;define&amp;lt;/code&amp;gt; block where variables are added. Local variables can have an ''initial value'' that is set every time the piston runs. If omitted, any value set to the variable will carry over for use in future executions of the piston.&lt;br /&gt;
&lt;br /&gt;
===Global Variables===&lt;br /&gt;
Global variables are variables that are common to all pistons. They always start with the @ symbol and are available to all pistons in the same webCoRE instance.&lt;br /&gt;
&lt;br /&gt;
Any change made to a global variable by any piston is available for the next run of all other pistons within the same webCoRE instance. When a piston runs, a snapshot is taken of the global variables to ensure that they do not change unexpectedly while the piston is executing. For this reason, global variables cannot be used to &amp;quot;pass back a result&amp;quot; from the Execute piston action to its caller.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: Define global variables on the upper right hand pane while editing a piston.&lt;br /&gt;
&lt;br /&gt;
===Superglobal Variables===&lt;br /&gt;
Users with more than one webCoRE instance at a single location can share superglobal variables between those webCoRE instances. Use the @@ prefix to create a superglobal variable.&lt;br /&gt;
&lt;br /&gt;
==System Variables==&lt;br /&gt;
System variables are local read-only variables that provide information about the environment and always have a $ prefix. They cannot be written to and their values are not necessarily constant (the same) during the whole piston run.&lt;br /&gt;
&lt;br /&gt;
==Variable Data Types==&lt;br /&gt;
webCoRE supports a variety of data types, please review the [[Variable data types|variable data types]].&lt;/div&gt;</summary>
		<author><name>Eibyer</name></author>	</entry>

	<entry>
		<id>https://wiki.webcore.co/index.php?title=Functions&amp;diff=572</id>
		<title>Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.webcore.co/index.php?title=Functions&amp;diff=572"/>
				<updated>2017-07-25T17:10:52Z</updated>
		
		<summary type="html">&lt;p&gt;Eibyer: /* Date and time functions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;float: left; clear: both; margin-right: 1em; margin-bottom: 1em;&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
Functions are extensions to expressions that allow data processing and conversion. Here is a list of all defined functions&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=[[Variable_data_types#String|String]] functions=&lt;br /&gt;
&lt;br /&gt;
==concat==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;''string'' concat(''dynamic'' value1, ''dynamic'' value2[, .., ''dynamic'' valueN])&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns a string that is the concatenation of all the supplied values. This function accepts two or more input values.&lt;br /&gt;
&lt;br /&gt;
==contains==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;''boolean'' contains(''string'' haystack, ''string'' needle)&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns true if the &amp;lt;code&amp;gt;needle&amp;lt;/code&amp;gt; is found anywhere in the &amp;lt;code&amp;gt;haystack&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==endsWith==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;''boolean'' endsWith(''string'' haystack, ''string'' needle)&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns true if &amp;lt;code&amp;gt;haystack&amp;lt;/code&amp;gt; ends with the &amp;lt;code&amp;gt;needle&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==format==&lt;br /&gt;
[[File:Format.pdf|page=1|thumb|256px|A very nice article written by Professor Don Colton, at the Brigham Young University of Hawaii]]&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;''string'' format(''string'' formatString[, ''dynamic'' value1[, .., ''dynamic'' valueN]])&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns a string that is built based on the &amp;lt;code&amp;gt;formatString&amp;lt;/code&amp;gt; with arguments replaced by their corresponding values. Follows the java syntax for &amp;lt;code&amp;gt;printf()&amp;lt;/code&amp;gt;. See a quick reference [https://www.cs.colostate.edu/~cs160/.Summer16/resources/Java_printf_method_quick_reference.pdf here], or a more detailed reference [https://sharkysoft.com/archive/printf/docs/javadocs/lava/clib/stdio/doc-files/specification.htm Reference here].&lt;br /&gt;
::Each % in the format string represents an argument and corresponds to a value (in order of appearance) in the value list. Each argument can have formatting settings, according to the reference provided. &lt;br /&gt;
:Example&lt;br /&gt;
::&amp;lt;code&amp;gt;format('The temperature outside is %.2f degrees Fahrenheit', [Temp sensor:temperature])&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;The temperature outside is 71.26 degrees Fahrenheit&amp;lt;/code&amp;gt;&lt;br /&gt;
::The &amp;lt;code&amp;gt;%.2f&amp;lt;/code&amp;gt; translates to &amp;quot;format as &amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt;loat and use &amp;lt;code&amp;gt;.2&amp;lt;/code&amp;gt; decimal places.&lt;br /&gt;
&lt;br /&gt;
==indexOf==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;''integer'' indexOf(''string'' haystack, ''string'' needle)&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns the character index of the first occurrence of &amp;lt;code&amp;gt;needle&amp;lt;/code&amp;gt; inside &amp;lt;code&amp;gt;haystack&amp;lt;/code&amp;gt;&lt;br /&gt;
:Examples&lt;br /&gt;
::&amp;lt;code&amp;gt;indexOf(&amp;quot;hello world&amp;quot;, 'l')&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==lastIndexOf==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;''integer'' lastIndexOf(''string'' haystack, ''string'' needle)&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns the character index of the last occurrence of &amp;lt;code&amp;gt;needle&amp;lt;/code&amp;gt; inside &amp;lt;code&amp;gt;haystack&amp;lt;/code&amp;gt;&lt;br /&gt;
:Examples&lt;br /&gt;
::&amp;lt;code&amp;gt;lastIndexOf(&amp;quot;hello world&amp;quot;, 'l')&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;9&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==left==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;''string'' left(''string'' value, ''integer'' length)&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns the first &amp;lt;code&amp;gt;length&amp;lt;/code&amp;gt; characters in &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt;&lt;br /&gt;
:Examples&lt;br /&gt;
::&amp;lt;code&amp;gt;left(&amp;quot;hello world&amp;quot;, 2)&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;he&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==lower==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;''string'' lower(''string'' value)&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; but with all lower case letters.&lt;br /&gt;
:Examples&lt;br /&gt;
::&amp;lt;code&amp;gt;lower(&amp;quot;Hello World&amp;quot;)&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;hello world&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==mid==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;''string'' mid(''string'' value, ''integer'' start[, ''integer'' count = remaining])&amp;lt;/code&amp;gt;&lt;br /&gt;
:Arguments&lt;br /&gt;
::&amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; - provides the 0-based index of the first character to copy. If &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; is negative, the counting starts from the end of &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt;.&lt;br /&gt;
::&amp;lt;code&amp;gt;count&amp;lt;/code&amp;gt; - provides the number of characters to copy from &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt;. If not provided, all of the remaining characters from &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; are returned, starting with character number &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt;. If &amp;lt;code&amp;gt;count&amp;lt;/code&amp;gt; is negative, prior characters are returned.&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns a substring of &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;count&amp;lt;/code&amp;gt; characters long, starting at character number &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt;. Note that the first character in any string has index 0.&lt;br /&gt;
:Examples&lt;br /&gt;
::&amp;lt;code&amp;gt;mid(&amp;quot;Hello World&amp;quot;, 2, 3)&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;llo&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;mid(&amp;quot;Hello World&amp;quot;, 2)&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;llo World&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;mid(&amp;quot;Hello World&amp;quot;, -5, 2)&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;Wo&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;mid(&amp;quot;Hello World&amp;quot;, -1, -3)&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;orl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==random==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;''dynamic'' random([''integer'' range | ''dynamic'' value1, ''dynamic'' value2[, .., ''dynamic'' valueN]])&amp;lt;/code&amp;gt;&lt;br /&gt;
:Arguments&lt;br /&gt;
::&amp;lt;code&amp;gt;range&amp;lt;/code&amp;gt; - an integer number representing a range&lt;br /&gt;
::&amp;lt;code&amp;gt;value1&amp;lt;/code&amp;gt;..&amp;lt;code&amp;gt;valueN&amp;lt;/code&amp;gt; - any kind of arguments, one will be randomly returned&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns a random decimal number between &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; if no arguments are provided, or a number between &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;range&amp;lt;/code&amp;gt; (inclusive) if a single argument is provided, or a randomly selected argument if two or more arguments are provided.&lt;br /&gt;
:Examples&lt;br /&gt;
::&amp;lt;code&amp;gt;random()&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;0.483&amp;lt;/code&amp;gt; (random decimal)&lt;br /&gt;
::&amp;lt;code&amp;gt;random(20)&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;6&amp;lt;/code&amp;gt; (random integer)&lt;br /&gt;
::&amp;lt;code&amp;gt;random(&amp;quot;Hello World&amp;quot;, &amp;quot;Good morning&amp;quot;, &amp;quot;Hello&amp;quot;, &amp;quot;Hi&amp;quot;)&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;Hello&amp;lt;/code&amp;gt; (randomly selected value)&lt;br /&gt;
:Tips&lt;br /&gt;
::To output a random integer between 5 and 20 use &amp;lt;code&amp;gt;(5 + random(15))&amp;lt;/code&amp;gt;&lt;br /&gt;
::To output a random integer between -5 and 20 use &amp;lt;code&amp;gt;(-5 + random(25))&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==replace==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;''string'' replace(''string'' haystack, ''string'' needle1, ''string'' replacement1[, .., ''string'' needleN, ''string'' replacementN])&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Replaces all the occurrences of &amp;lt;code&amp;gt;needle&amp;lt;/code&amp;gt; inside &amp;lt;code&amp;gt;haystack&amp;lt;/code&amp;gt; with its respective &amp;lt;code&amp;gt;replacement&amp;lt;/code&amp;gt;. Multiple pairs of &amp;lt;code&amp;gt;needle&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;replacement&amp;lt;/code&amp;gt; can be provided in one function call.&lt;br /&gt;
:Regular expressions&lt;br /&gt;
::Needles support regular expressions when their value starts and ends with a &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;. For example, &amp;lt;code&amp;gt;'/(\s)/'&amp;lt;/code&amp;gt; will match all spaces.&lt;br /&gt;
:Examples&lt;br /&gt;
::&amp;lt;code&amp;gt;replace(&amp;quot;Hello World&amp;quot;, 'World', 'Earth')&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;Hello Earth&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;replace(&amp;quot;Hello World&amp;quot;, 'World', 'Earth', 'Hello', 'Hi')&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;Hi Earth&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;replace(&amp;quot;Hello World&amp;quot;, 'World', 'Earth', 'Earth', 'Planet')&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;Hello Planet&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==right==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;''string'' right(''string'' value, ''integer'' length)&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns the last &amp;lt;code&amp;gt;length&amp;lt;/code&amp;gt; characters in &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt;&lt;br /&gt;
:Examples&lt;br /&gt;
::&amp;lt;code&amp;gt;right(&amp;quot;hello world&amp;quot;, 4)&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;orld&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==startsWith==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;''boolean'' startsWith(''string'' haystack, ''string'' needle)&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns true if &amp;lt;code&amp;gt;haystack&amp;lt;/code&amp;gt; starts with the &amp;lt;code&amp;gt;needle&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==string==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;''string'' string(''dynamic'' value)&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; as a string.&lt;br /&gt;
&lt;br /&gt;
==substr==&lt;br /&gt;
:Alias of &amp;lt;code&amp;gt;mid()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==substring==&lt;br /&gt;
:Alias of &amp;lt;code&amp;gt;mid()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==title==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;''string'' title(''string'' value)&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; but in its title case format (each word starts with a capitalized letter).&lt;br /&gt;
:Examples&lt;br /&gt;
::&amp;lt;code&amp;gt;lower(&amp;quot;Hello there world&amp;quot;)&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;Hello There World&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==upper==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;''string'' upper(''string'' value)&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; but with all upper case letters.&lt;br /&gt;
:Examples&lt;br /&gt;
::&amp;lt;code&amp;gt;upper(&amp;quot;Hello World&amp;quot;)&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;HELLO WORLD&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==text==&lt;br /&gt;
:Alias of &amp;lt;code&amp;gt;string()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==trim==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;&amp;quot;string&amp;quot; trim(&amp;quot;string&amp;quot; value)&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; with leading and trailing spaces removed&lt;br /&gt;
:Examples&lt;br /&gt;
::&amp;lt;code&amp;gt;trim(&amp;quot; Hello World &amp;quot;)&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;Hello World&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==trimLeft==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;&amp;quot;string&amp;quot; trimLeft(&amp;quot;string&amp;quot; value)&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; with leading spaces removed&lt;br /&gt;
:Examples&lt;br /&gt;
::&amp;lt;code&amp;gt;trimLeft(&amp;quot; Hello World &amp;quot;)&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;&amp;quot;Hello World &amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==ltrim==&lt;br /&gt;
:Alias of &amp;lt;code&amp;gt;trimLeft()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==trimRight==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;&amp;quot;string&amp;quot; trimRight(&amp;quot;string&amp;quot; value)&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; with trailing spaces removed&lt;br /&gt;
:Examples&lt;br /&gt;
::&amp;lt;code&amp;gt;trimRight(&amp;quot; Hello World &amp;quot;)&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;&amp;quot; Hello World&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==rtrim==&lt;br /&gt;
:Alias of &amp;lt;code&amp;gt;trimRight()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Numeric functions=&lt;br /&gt;
&lt;br /&gt;
==avg==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;''decimal'' avg(''decimal'' value1, ''decimal'' value2[, .., ''decimal'' valueN])&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns the mean average of all the values provided.&lt;br /&gt;
&lt;br /&gt;
==abs==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;''decimal'' abs(''decimal'' value)&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns the absolute value of the argument (e.g., remove negative sign for negative values).&lt;br /&gt;
&lt;br /&gt;
==ceil==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;''integer'' ceil(''decimal'' value)&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns the immediately higher integer, equivalent to rounding the decimal away from zero.&lt;br /&gt;
:Examples&lt;br /&gt;
::&amp;lt;code&amp;gt;ceil(5.6)&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;6&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;ceil(-5.6)&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;-6&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==ceiling==&lt;br /&gt;
:Alias of &amp;lt;code&amp;gt;ceil&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==decimal==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;''decimal'' decimal(''dynamic'' value)&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Converts &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; into a decimal. Returns &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; if &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; is not numeric.&lt;br /&gt;
&lt;br /&gt;
==float==&lt;br /&gt;
:Alias of &amp;lt;code&amp;gt;decimal&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==floor==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;''integer'' ceil(''decimal'' value)&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns the integer part of a decimal, equivalent to rounding the decimal towards zero.&lt;br /&gt;
:Examples&lt;br /&gt;
::&amp;lt;code&amp;gt;floor(5.6)&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;5&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;floor(-5.6)&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;-5&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==max==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;''dynamic'' max(''dynamic'' value1, ''dynamic'' value2[, .., ''dynamic'' valueN])&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns the maximum of all the values provided. Note: this function works with both numbers and strings.&lt;br /&gt;
&lt;br /&gt;
==median==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;''dynamic'' median(''dynamic'' value1, ''dynamic'' value2[, .., ''dynamic'' valueN])&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns the median average of all the values provided. Note: this function works with both numbers and strings.&lt;br /&gt;
&lt;br /&gt;
==min==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;''dynamic'' min(''dynamic'' value1, ''dynamic'' value2[, .., ''dynamic'' valueN])&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns the minimum of all the values provided. Note: this function works with both numbers and strings.&lt;br /&gt;
&lt;br /&gt;
==number==&lt;br /&gt;
:Alias of &amp;lt;code&amp;gt;decimal&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==power==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;''decimal'' power(''decimal'' value, ''decimal'' exponent)&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; at the power of &amp;lt;code&amp;gt;exponent&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==round==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;''decimal'' round(''decimal'' value[, ''integer'' precision = 0])&amp;lt;/code&amp;gt;&lt;br /&gt;
:Arguments&lt;br /&gt;
::&amp;lt;code&amp;gt;precision&amp;lt;/code&amp;gt; - the number of decimal places to be retained. If not provided, defaults to &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns the rounded &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;precision&amp;lt;/code&amp;gt; decimal places.&lt;br /&gt;
&lt;br /&gt;
==sqr==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;''decimal'' sqr(''decimal'' value)&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns the squared &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt;, equivalent to &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; multiplied by itself.&lt;br /&gt;
&lt;br /&gt;
==sqrt==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;''decimal'' sqrt(''decimal'' value)&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns the square root of &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==stdev==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;''decimal'' stdev(''decimal'' value1, ''decimal'' value2[, .., ''decimal'' valueN])&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns the standard deviation of all the values provided.&lt;br /&gt;
&lt;br /&gt;
==sum==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;''decimal'' sum(''decimal'' value1, ''decimal'' value2[, .., ''decimal'' valueN])&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns the sum of sum of all the values provided.&lt;br /&gt;
&lt;br /&gt;
==variance==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;''decimal'' variance(''decimal'' value1, ''decimal'' value2[, .., ''decimal'' valueN])&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns the variance of all the values provided.&lt;br /&gt;
&lt;br /&gt;
=[[Variable_data_types#Boolean|Boolean]] functions=&lt;br /&gt;
&lt;br /&gt;
==bool==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;bool(''dynamic'' value)&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns the truth value of the input. Accepts anything as input and will return true if &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; is either a non-zero number, a non-empty string (with some exceptions, see below), a non-empty device list, a non-empty date/time/datetime&lt;br /&gt;
&lt;br /&gt;
==boolean==&lt;br /&gt;
:This is an alias of [[Functions#bool|bool]]&lt;br /&gt;
&lt;br /&gt;
==eq==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;eq(''dynamic'' value1, ''dynamic'' value2)&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns true if &amp;lt;code&amp;gt;value1&amp;lt;/code&amp;gt; is equivalent to &amp;lt;code&amp;gt;value2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==ge==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;ge(''dynamic'' value1, ''dynamic'' value2)&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns true if &amp;lt;code&amp;gt;value1&amp;lt;/code&amp;gt; is greater than or equal to &amp;lt;code&amp;gt;value2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==gt==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;gt(''dynamic'' value1, ''dynamic'' value2)&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns true if &amp;lt;code&amp;gt;value1&amp;lt;/code&amp;gt; is greater than &amp;lt;code&amp;gt;value2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==isBetween==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;isBetween(''dynamic'' value, ''dynamic'' startValue, ''dynamic'' endValue)&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns true if &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; is greater then or equal to &amp;lt;code&amp;gt;startValue&amp;lt;/code&amp;gt; and less than or equal to &amp;lt;code&amp;gt;endValue&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==isEmpty==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;isEmpty(''dynamic'' value)&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns true if &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; is not set, an empty string, or zero&lt;br /&gt;
&lt;br /&gt;
==le==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;le(''dynamic'' value1, ''dynamic'' value2)&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns true if &amp;lt;code&amp;gt;value1&amp;lt;/code&amp;gt; is less than or equal to &amp;lt;code&amp;gt;value2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==lt==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;lt(''dynamic'' value1, ''dynamic'' value2)&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns true if &amp;lt;code&amp;gt;value1&amp;lt;/code&amp;gt; is less than &amp;lt;code&amp;gt;value2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==not==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;not(''dynamic'' value)&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns the negated truth state of &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt;. This is the logical negation of &amp;lt;code&amp;gt;[[Functions#bool|bool]](''dynamic'' value)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=[[Variable_data_types#Date_and_Time|Date and time]] functions=&lt;br /&gt;
&lt;br /&gt;
==addDays==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;addDays(''datetime'' value, ''integer'' days)&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns a datetime that is &amp;lt;code&amp;gt;days&amp;lt;/code&amp;gt; days after the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt;. For negative values of &amp;lt;code&amp;gt;days&amp;lt;/code&amp;gt;, it returns a datetime that is &amp;lt;code&amp;gt;days&amp;lt;/code&amp;gt; days before &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==addHours==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;addHours(''datetime'' value, ''integer'' hours)&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns a datetime that is &amp;lt;code&amp;gt;hours&amp;lt;/code&amp;gt; hours after the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt;. For negative values of &amp;lt;code&amp;gt;hours&amp;lt;/code&amp;gt;, it returns a datetime that is &amp;lt;code&amp;gt;hours&amp;lt;/code&amp;gt; hours before &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==addMinutes==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;addMinutes(''datetime'' value, ''integer'' minutes)&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns a datetime that is &amp;lt;code&amp;gt;minutes&amp;lt;/code&amp;gt; minutes after the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt;. For negative values of &amp;lt;code&amp;gt;minutes&amp;lt;/code&amp;gt;, it returns a datetime that is &amp;lt;code&amp;gt;minutes&amp;lt;/code&amp;gt; minutes before &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==addSeconds==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;addSeconds(''datetime'' value, ''integer'' seconds)&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns a datetime that is &amp;lt;code&amp;gt;seconds&amp;lt;/code&amp;gt; seconds after the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt;. For negative values of &amp;lt;code&amp;gt;seconds&amp;lt;/code&amp;gt;, it returns a datetime that is &amp;lt;code&amp;gt;seconds&amp;lt;/code&amp;gt; seconds before &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==addWeeks==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;addWeeks(''datetime'' value, ''integer'' weeks)&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns a datetime that is &amp;lt;code&amp;gt;weeks&amp;lt;/code&amp;gt; weeks after the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt;. For negative values of &amp;lt;code&amp;gt;weeks&amp;lt;/code&amp;gt;, it returns a datetime that is &amp;lt;code&amp;gt;weeks&amp;lt;/code&amp;gt; weeks before &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==date==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;date(''datetime'' value)&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns the date portion of &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; by stripping off time information.&lt;br /&gt;
&lt;br /&gt;
==datetime==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;''datetime'' datetime(''dynamic'' value)&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Tries to convert any value into a datetime. Accepts strings in common date/time formats.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==formatDuration==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;''string'' formatDuration(''datetime'' value[, ''boolean'' friendly = false[, ''string'' granularity = 's'[, ''boolean'' showAdverbs = false]]])&amp;lt;/code&amp;gt;&lt;br /&gt;
:Arguments&lt;br /&gt;
::&amp;lt;code&amp;gt;friendly&amp;lt;/code&amp;gt; - &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; makes the output compact, in the form of &amp;lt;code&amp;gt;0d 00:00:00.000&amp;lt;/code&amp;gt;, while &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; makes the output more human friendly, in the form of &amp;lt;code&amp;gt; 0 days, 0 hours, 0 minutes, and 0 seconds&amp;lt;/code&amp;gt;. Defaults to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;.&lt;br /&gt;
::&amp;lt;code&amp;gt;granularity&amp;lt;/code&amp;gt; - represents the smallest time unit to be output. One of &amp;lt;code&amp;gt;d&amp;lt;/code&amp;gt; for days, &amp;lt;code&amp;gt;h&amp;lt;/code&amp;gt; for hours, &amp;lt;code&amp;gt;m&amp;lt;/code&amp;gt; for minutes, &amp;lt;code&amp;gt;s&amp;lt;/code&amp;gt; for seconds, or &amp;lt;code&amp;gt;ms&amp;lt;/code&amp;gt; for milliseconds. Any time unit below the selected granularity will not be output. Defaults to &amp;lt;code&amp;gt;s&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;showAdverbs&amp;lt;/code&amp;gt; - only affects the friendly output, when &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; the words &amp;lt;code&amp;gt;in&amp;lt;/code&amp;gt; (for future durations - positive input) or &amp;lt;code&amp;gt;ago&amp;lt;/code&amp;gt; (for past durations - negative input) are prepended or appended respectively to the output&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns a string that represents the duration in a human readable format&lt;br /&gt;
:Examples&lt;br /&gt;
::&amp;lt;code&amp;gt;formatDuration(12029)&amp;lt;/code&amp;gt; will output &amp;lt;code&amp;gt;00:00:12&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;formatDuration(68493, true)&amp;lt;/code&amp;gt; will output &amp;lt;code&amp;gt;1 minute and 8 seconds&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;formatDuration(68493, false, 'ms')&amp;lt;/code&amp;gt; will output &amp;lt;code&amp;gt;00:01:08&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;formatDuration(68493, true, 'm', true)&amp;lt;/code&amp;gt; will output &amp;lt;code&amp;gt;in 1 minute&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==formatDateTime==&lt;br /&gt;
:Syntax&lt;br /&gt;
:Arguments&lt;br /&gt;
:Examples&lt;br /&gt;
:Reference - https://docs.oracle.com/javase/tutorial/i18n/format/simpleDateFormat.html&lt;br /&gt;
&lt;br /&gt;
==time==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;''time'' time(''datetime'' value)&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns the time portion of &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; by stripping off date information.&lt;br /&gt;
&lt;br /&gt;
=Weather related functions=&lt;br /&gt;
&lt;br /&gt;
==celsius==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;''decimal'' celsius(''decimal'' value)&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Converts a temperature value from Fahrenheit to Celsius.&lt;br /&gt;
&lt;br /&gt;
==dewPoint==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;''decimal'' dewPoint(''decimal'' temperature, ''decimal'' relativeHumidity[, ''string'' scale = 'F'])&amp;lt;/code&amp;gt;&lt;br /&gt;
:Parameters&lt;br /&gt;
::&amp;lt;code&amp;gt;scale&amp;lt;/code&amp;gt; - optional, one of &amp;lt;code&amp;gt;C&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;F&amp;lt;/code&amp;gt;, corresponding to the temperature range used for &amp;lt;code&amp;gt;temperature&amp;lt;/code&amp;gt;. The result will be provided in the same scale. If no scale is provided, the Fahrenheit scale will be used.&lt;br /&gt;
:Returns&lt;br /&gt;
::Returns the due temperature for a given temperature and relative humidity&lt;br /&gt;
&lt;br /&gt;
==fahrenheit==&lt;br /&gt;
:Syntax&lt;br /&gt;
::&amp;lt;code&amp;gt;''decimal'' fahrenheit(''decimal'' value)&amp;lt;/code&amp;gt;&lt;br /&gt;
:Returns&lt;br /&gt;
::Converts a temperature value from Celsius to Fahrenheit.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#Dynamic|Dynamic]] =&lt;br /&gt;
;if(condition, valueIfTrue, valueIfFalse)&lt;br /&gt;
:evaluates a boolean and returns value1 if true, or value2 otherwise&lt;br /&gt;
;least(values)&lt;br /&gt;
:returns the value that is least found a series of numeric values&lt;br /&gt;
;most(values)&lt;br /&gt;
:returns the value that is most found a series of numeric values&lt;br /&gt;
;previousValue([device;attribute])&lt;br /&gt;
:returns the previous value of the attribute&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#Number_.28Integer.29|Integers]] =&lt;br /&gt;
;age([device﹕attribute])&lt;br /&gt;
:returns the number of milliseconds an attribute had the current value&lt;br /&gt;
;count(values)&lt;br /&gt;
:calculates the number of true/non-zero/non-empty items in a series of numeric values&lt;br /&gt;
;int()&lt;br /&gt;
://todo&lt;br /&gt;
;integer(decimal or string)&lt;br /&gt;
:converts a decimal value to it's integer value&lt;br /&gt;
;newer([device﹕attribute],[...], [device﹕attribute], threshold)&lt;br /&gt;
:returns the number of devices whose attribute had the current value for less than the specified number of milliseconds&lt;br /&gt;
;older([device﹕attribute],[...], [device﹕attribute], threshold)&lt;br /&gt;
:returns the number of devices whose attribute had the current value for more than the specified number of milliseconds&lt;br /&gt;
;previousAge([device﹕attribute])&lt;br /&gt;
:returns the number of milliseconds an attribute had the previous value&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#Time|Time]] =&lt;br /&gt;
;time(value)&lt;br /&gt;
:returns the value as a time type&lt;br /&gt;
;addSeconds(dateTime, seconds)&lt;br /&gt;
:adds seconds to time, returns the value as a time type&lt;br /&gt;
;addMinutes(dateTime, minutes)&lt;br /&gt;
:adds minutes to time, returns the value as a time type&lt;br /&gt;
;addHours(dateTime, hours)&lt;br /&gt;
:adds hours to time, returns the value as a time type&lt;br /&gt;
;addDays(dateTime, days)&lt;br /&gt;
:adds days to time, returns the value as a time type&lt;br /&gt;
;addWeeks(dateTime, weeks)&lt;br /&gt;
:adds weeks to time, returns the value as a time type&lt;/div&gt;</summary>
		<author><name>Eibyer</name></author>	</entry>

	<entry>
		<id>https://wiki.webcore.co/index.php?title=WebCoRE_todo&amp;diff=358</id>
		<title>WebCoRE todo</title>
		<link rel="alternate" type="text/html" href="https://wiki.webcore.co/index.php?title=WebCoRE_todo&amp;diff=358"/>
				<updated>2017-05-10T16:33:45Z</updated>
		
		<summary type="html">&lt;p&gt;Eibyer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{warning|Just because a feature is on this list, doesn't mean that [https://community.smartthings.com/users/ady624/summary ady624] will implement it.}}&lt;br /&gt;
{{warning|This list may not be complete. If you find something that is not on the list that has not been implemented don't complain, add it!}}&lt;br /&gt;
&lt;br /&gt;
The following is a list of missing features or known issues (in a somewhat priority order):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Virtual tasks - add the lot (in progress)&lt;br /&gt;
# Superglobal variables publication to other locations&lt;br /&gt;
# AskAlexa Message Queue integration&lt;br /&gt;
# Twilio integration&lt;br /&gt;
# NFL integration&lt;br /&gt;
# Physical / Programmatic Switch Support&lt;br /&gt;
# Lock code support&lt;br /&gt;
# Prevent already scheduled tasks from executing during restrictions&lt;br /&gt;
# Command optimizations&lt;br /&gt;
# Way to identify devices that are selected but not used&lt;br /&gt;
# Import from Red Piston Picture&lt;br /&gt;
# Backup/Restore Pistons to/from local storage&lt;br /&gt;
# Remove ''(only while )'' when all Mode restrictions are deselected.&lt;br /&gt;
&lt;br /&gt;
Resolved (or believed to be resolved) issues:&lt;br /&gt;
# &amp;lt;del&amp;gt;Smart Home Monitor&amp;lt;/del&amp;gt; (3/26/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Location Mode&amp;lt;/del&amp;gt; (3/26/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Time Triggers (every x minutes/hours/days/etc do)&amp;lt;/del&amp;gt; (4/12/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Color support&amp;lt;/del&amp;gt; (4/12/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;[[Task Cancellation Policy|TCP]]&amp;lt;/del&amp;gt; (4/13/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;[[Task Execution Policy|TEP]]&amp;lt;/del&amp;gt; (4/13/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Execute other pistons&amp;lt;/del&amp;gt; (4/15/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Wait until &amp;amp;lt;time&amp;amp;gt;&amp;lt;/del&amp;gt; (4/15/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Execute Routines&amp;lt;/del&amp;gt; (4/15/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Multiple choice conditions (any of, not any of)&amp;lt;/del&amp;gt; (4/16/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Web service calls with location (needs clarification)&amp;lt;/del&amp;gt; (4/17/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Task mode restrictions&amp;lt;/del&amp;gt; (4/18/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Time conditions/restrictions (time is before/between/after)&amp;lt;/del&amp;gt; (4/18/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Date conditions/restrictions (date is before/between/after)&amp;lt;/del&amp;gt; (4/19/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Timed conditions (changed, was / were)&amp;lt;/del&amp;gt; (4/20/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Masking phone numbers while sharing pistons&amp;lt;/del&amp;gt; (4/21/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Global variables&amp;lt;/del&amp;gt; (4/22/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Superglobal variables&amp;lt;/del&amp;gt; (4/22/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Global/superglobal variables triggers on change&amp;lt;/del&amp;gt; (4/23/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Timed triggers (stays/stay)&amp;lt;/del&amp;gt; (4/23/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Time condition offsets&amp;lt;/del&amp;gt; (4/23/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Use of variables inside conditions and restrictions (same as they can be used in actions)&amp;lt;/del&amp;gt; (4/24/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Store condition matching/non-matching device list to variable&amp;lt;/del&amp;gt; (4/24/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Subscribe to Routines Events&amp;lt;/del&amp;gt; (4/24/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;IFTTT integration&amp;lt;/del&amp;gt; (4/24/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;AskAlexa integration&amp;lt;/del&amp;gt; (4/24/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Custom commands with parameters&amp;lt;/del&amp;gt; (4/25/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Copy&amp;amp;Paste support inside piston editor&amp;lt;/del&amp;gt; (4/25/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;formatDuration(value, friendly, granularity, showAdverbs)&amp;lt;/del&amp;gt; (4/23/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Contact support for notifications&amp;lt;/del&amp;gt; (4/26/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Timed triggers with multiple devices and Any aggregation&amp;lt;/del&amp;gt; (4/26/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;IFTTT event arguments parsing&amp;lt;/del&amp;gt; (4/26/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;formatDuration( )&amp;lt;/del&amp;gt; (5/3/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Power Cut Detection&amp;lt;/del&amp;gt; (5/8/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Turn X switch to Random State&amp;lt;/del&amp;gt; (5/8/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Turn X switch to {variable} State&amp;lt;/del&amp;gt; (5/8/2017)&lt;/div&gt;</summary>
		<author><name>Eibyer</name></author>	</entry>

	<entry>
		<id>https://wiki.webcore.co/index.php?title=WebCoRE_todo&amp;diff=357</id>
		<title>WebCoRE todo</title>
		<link rel="alternate" type="text/html" href="https://wiki.webcore.co/index.php?title=WebCoRE_todo&amp;diff=357"/>
				<updated>2017-05-10T16:33:01Z</updated>
		
		<summary type="html">&lt;p&gt;Eibyer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{warning|Just because a feature is on this list, doesn't mean that [https://community.smartthings.com/users/ady624/summary ady624] will implement it.}}&lt;br /&gt;
{{warning|This list may not be complete. If you find something that is not on the list that has not been implemented don't complain, add it!}}&lt;br /&gt;
&lt;br /&gt;
The following is a list of missing features or known issues (in a somewhat priority order):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Virtual tasks - add the lot (in progress)&lt;br /&gt;
# Superglobal variables publication to other locations&lt;br /&gt;
# AskAlexa Message Queue integration&lt;br /&gt;
# Twilio integration&lt;br /&gt;
# NFL integration&lt;br /&gt;
# Physical / Programmatic Switch Support&lt;br /&gt;
# Lock code support&lt;br /&gt;
# Prevent already scheduled tasks from executing during restrictions&lt;br /&gt;
# Command optimizations&lt;br /&gt;
# Way to identify devices that are selected but not used&lt;br /&gt;
# Import from Red Piston Picture&lt;br /&gt;
# Backup/Restore Pistons to/from local storage&lt;br /&gt;
# Remove (only while ) when all Mode restrictions are deselected.&lt;br /&gt;
&lt;br /&gt;
Resolved (or believed to be resolved) issues:&lt;br /&gt;
# &amp;lt;del&amp;gt;Smart Home Monitor&amp;lt;/del&amp;gt; (3/26/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Location Mode&amp;lt;/del&amp;gt; (3/26/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Time Triggers (every x minutes/hours/days/etc do)&amp;lt;/del&amp;gt; (4/12/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Color support&amp;lt;/del&amp;gt; (4/12/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;[[Task Cancellation Policy|TCP]]&amp;lt;/del&amp;gt; (4/13/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;[[Task Execution Policy|TEP]]&amp;lt;/del&amp;gt; (4/13/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Execute other pistons&amp;lt;/del&amp;gt; (4/15/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Wait until &amp;amp;lt;time&amp;amp;gt;&amp;lt;/del&amp;gt; (4/15/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Execute Routines&amp;lt;/del&amp;gt; (4/15/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Multiple choice conditions (any of, not any of)&amp;lt;/del&amp;gt; (4/16/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Web service calls with location (needs clarification)&amp;lt;/del&amp;gt; (4/17/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Task mode restrictions&amp;lt;/del&amp;gt; (4/18/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Time conditions/restrictions (time is before/between/after)&amp;lt;/del&amp;gt; (4/18/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Date conditions/restrictions (date is before/between/after)&amp;lt;/del&amp;gt; (4/19/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Timed conditions (changed, was / were)&amp;lt;/del&amp;gt; (4/20/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Masking phone numbers while sharing pistons&amp;lt;/del&amp;gt; (4/21/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Global variables&amp;lt;/del&amp;gt; (4/22/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Superglobal variables&amp;lt;/del&amp;gt; (4/22/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Global/superglobal variables triggers on change&amp;lt;/del&amp;gt; (4/23/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Timed triggers (stays/stay)&amp;lt;/del&amp;gt; (4/23/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Time condition offsets&amp;lt;/del&amp;gt; (4/23/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Use of variables inside conditions and restrictions (same as they can be used in actions)&amp;lt;/del&amp;gt; (4/24/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Store condition matching/non-matching device list to variable&amp;lt;/del&amp;gt; (4/24/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Subscribe to Routines Events&amp;lt;/del&amp;gt; (4/24/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;IFTTT integration&amp;lt;/del&amp;gt; (4/24/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;AskAlexa integration&amp;lt;/del&amp;gt; (4/24/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Custom commands with parameters&amp;lt;/del&amp;gt; (4/25/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Copy&amp;amp;Paste support inside piston editor&amp;lt;/del&amp;gt; (4/25/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;formatDuration(value, friendly, granularity, showAdverbs)&amp;lt;/del&amp;gt; (4/23/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Contact support for notifications&amp;lt;/del&amp;gt; (4/26/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Timed triggers with multiple devices and Any aggregation&amp;lt;/del&amp;gt; (4/26/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;IFTTT event arguments parsing&amp;lt;/del&amp;gt; (4/26/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;formatDuration( )&amp;lt;/del&amp;gt; (5/3/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Power Cut Detection&amp;lt;/del&amp;gt; (5/8/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Turn X switch to Random State&amp;lt;/del&amp;gt; (5/8/2017)&lt;br /&gt;
# &amp;lt;del&amp;gt;Turn X switch to {variable} State&amp;lt;/del&amp;gt; (5/8/2017)&lt;/div&gt;</summary>
		<author><name>Eibyer</name></author>	</entry>

	<entry>
		<id>https://wiki.webcore.co/index.php?title=Functions&amp;diff=300</id>
		<title>Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.webcore.co/index.php?title=Functions&amp;diff=300"/>
				<updated>2017-05-05T04:51:30Z</updated>
		
		<summary type="html">&lt;p&gt;Eibyer: /* String */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= [[Variable_data_types#Boolean|Boolean]] =&lt;br /&gt;
;bool()&lt;br /&gt;
://todo&lt;br /&gt;
;boolean(anything)&lt;br /&gt;
:converts a value to it's boolean value&lt;br /&gt;
;contains(string, substring)&lt;br /&gt;
:returns true if a string contains a substring&lt;br /&gt;
;endsWith(string, substring)&lt;br /&gt;
:returns true if a string ends with a substring&lt;br /&gt;
;eq(value1, value2)&lt;br /&gt;
:returns true if two values are equal&lt;br /&gt;
;ge(value1, value2)&lt;br /&gt;
:returns true if value1 &amp;gt;= value2&lt;br /&gt;
;gt(value1, value2)&lt;br /&gt;
:returns true if value1 &amp;gt; value2&lt;br /&gt;
;isBetween(value, startValue, endValue)&lt;br /&gt;
:returns true if value &amp;gt;= startValue and value &amp;lt;= endValue&lt;br /&gt;
;isEmpty(value)&lt;br /&gt;
:returns true if the value is empty&lt;br /&gt;
;le(value1, value2)&lt;br /&gt;
:returns true if value1 &amp;lt;= value2&lt;br /&gt;
;lt(value1, value2)&lt;br /&gt;
:returns true if value1 &amp;lt; value2	&lt;br /&gt;
;not(value)&lt;br /&gt;
:returns the negative boolean value&lt;br /&gt;
;startsWith(string, substring)&lt;br /&gt;
:returns true if a string starts with a substring&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#Date|Date]] =&lt;br /&gt;
;date(value)&lt;br /&gt;
:returns the value as a date type&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#Date_and_Time|Datetime]] =&lt;br /&gt;
;addDays(dateTime, days)&lt;br /&gt;
:returns the value as a time type&lt;br /&gt;
;addHours(dateTime, hours)&lt;br /&gt;
:returns the value as a time type&lt;br /&gt;
;addMinutes(dateTime, minutes)&lt;br /&gt;
:returns the value as a time type&lt;br /&gt;
;addSeconds(dateTime, seconds)&lt;br /&gt;
:returns the value as a time type&lt;br /&gt;
;addWeeks(dateTime, weeks)&lt;br /&gt;
:returns the value as a time type&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#Number_.28Decimal.29|Decimal]] =&lt;br /&gt;
;avg(values)&lt;br /&gt;
:calculates the average of a series of numeric values&lt;br /&gt;
;ceil()&lt;br /&gt;
://todo&lt;br /&gt;
;ceiling(decimal or string)&lt;br /&gt;
:converts a decimal value to it's closest higher integer value&lt;br /&gt;
;celsius(temperature) &lt;br /&gt;
:converts temperature from Fahrenheit to Celsius&lt;br /&gt;
;decimal(integer or string)&lt;br /&gt;
:converts an integer value to it's decimal value&lt;br /&gt;
;dewPoint(temperature, relativeHumidity[, scale])&lt;br /&gt;
:returns the calculated dew point temperature&lt;br /&gt;
;fahrenheit([Sensor;temperature]) &lt;br /&gt;
:converts temperature from Celsius to Fahrenheit&lt;br /&gt;
;float()&lt;br /&gt;
://todo&lt;br /&gt;
;floor(decimal or string)&lt;br /&gt;
:converts a decimal value to it's closest lower integer value&lt;br /&gt;
;max(values)&lt;br /&gt;
:calculates the maximum of a series of numeric values&lt;br /&gt;
;median(values)&lt;br /&gt;
:returns the value in the middle of a sorted array&lt;br /&gt;
;min(values)&lt;br /&gt;
:calculates the minimum of a series of numeric values&lt;br /&gt;
;number()&lt;br /&gt;
://todo&lt;br /&gt;
;power(integer or decimal or string, power) &lt;br /&gt;
:converts a decimal value to it's power decimal value&lt;br /&gt;
;round(decimal or string, [precision]) &lt;br /&gt;
:converts a decimal value to it's rounded value&lt;br /&gt;
;sqr(integer or decimal or string) &lt;br /&gt;
:converts a decimal value to it's square decimal value&lt;br /&gt;
;sqrt(integer or decimal or string) &lt;br /&gt;
:converts a decimal value to it's square root decimal value&lt;br /&gt;
;stdev(values)&lt;br /&gt;
:calculates the standard deviation of a series of numeric values&lt;br /&gt;
;sum(values)&lt;br /&gt;
:calculates the sum of a series of numeric values&lt;br /&gt;
;variance(values)&lt;br /&gt;
:calculates the standard deviation of a series of numeric values&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#Dynamic|Dynamic]] =&lt;br /&gt;
;if(condition, valueIfTrue, valueIfFalse)&lt;br /&gt;
:evaluates a boolean and returns value1 if true, or value2 otherwise&lt;br /&gt;
;least(values)&lt;br /&gt;
:returns the value that is least found a series of numeric values&lt;br /&gt;
;most(values)&lt;br /&gt;
:returns the value that is most found a series of numeric values&lt;br /&gt;
;previousValue([device;attribute])&lt;br /&gt;
:returns the previous value of the attribute&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#Number_.28Integer.29|Integers]] =&lt;br /&gt;
;age([device;attribute])&lt;br /&gt;
:returns the number of milliseconds an attribute had the current value&lt;br /&gt;
;count(values)&lt;br /&gt;
:calculates the number of true/non-zero/non-empty items in a series of numeric values&lt;br /&gt;
;int()&lt;br /&gt;
://todo&lt;br /&gt;
;integer(decimal or string)&lt;br /&gt;
:converts a decimal value to it's integer value&lt;br /&gt;
;newer([device;attribute],[...], [device;attribute], threshold)&lt;br /&gt;
:returns the number of devices whose attribute had the current value for less than the specified number of milliseconds&lt;br /&gt;
;older([device;attribute],[...], [device;attribute], threshold)&lt;br /&gt;
:returns the number of devices whose attribute had the current value for more than the specified number of milliseconds&lt;br /&gt;
;previousAge([device;attribute])&lt;br /&gt;
:returns the number of milliseconds an attribute had the previous value&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#String|String]] =&lt;br /&gt;
;concat(string1, string2) &lt;br /&gt;
:returns two strings appended together&lt;br /&gt;
: Example: &amp;lt;code&amp;gt;concat(&amp;quot;hello &amp;quot;, &amp;quot;world&amp;quot;)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;concat(&amp;quot;hello&amp;quot;, &amp;quot; &amp;quot;, &amp;quot;world&amp;quot;)&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;hello world&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;format() &lt;br /&gt;
://todo&lt;br /&gt;
;formatDuration(value[, friendly = false[, granularity = 's'[, showAdverbs = false]]])&lt;br /&gt;
:Usage:&lt;br /&gt;
::value is a number of milliseconds&lt;br /&gt;
::friendly = true/false (false &amp;gt;&amp;gt;&amp;gt; 0d 00:00:00.000, true &amp;gt;&amp;gt;&amp;gt; so many days, so many hours, etc)&lt;br /&gt;
::granularity = one of ms, s, m, h, d (smallest part displayed)&lt;br /&gt;
::showAdverbs = true/false, true adds the in .... or .... ago to friendly times&lt;br /&gt;
:returns a nicely formatted string of time &lt;br /&gt;
:eg: formatDuration(12029) - 00:00:12 | formatDuration(12029, true) - 12 seconds | formatDuration(12029, true, &amp;quot;m&amp;quot;) - 0 minutes | formatDuration(12029, true, &amp;quot;ms&amp;quot;, true) - in 12 seconds and 29 milliseconds&lt;br /&gt;
&lt;br /&gt;
;left(string, count) &lt;br /&gt;
:returns a substring of a value&lt;br /&gt;
:Example1: &amp;lt;code&amp;gt;left(&amp;quot;hello world&amp;quot;, 3)&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;hel&amp;lt;/code&amp;gt;&lt;br /&gt;
:Example2: &amp;lt;code&amp;gt;left(&amp;quot;hello world&amp;quot;, 7)&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;hello w&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
;lower(string)&lt;br /&gt;
:returns a lower case value of a string&lt;br /&gt;
:Example: &amp;lt;code&amp;gt;lower(&amp;quot;HELLO WORLD&amp;quot;)&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;hello world&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;mid(string, start, count)&lt;br /&gt;
:returns a substring of a value&lt;br /&gt;
:returns characters (including spaces) specified by count after start position from string&lt;br /&gt;
:Example1: &amp;lt;code&amp;gt;mid(&amp;quot;hello world&amp;quot;, 3, 4)&amp;lt;/code&amp;gt; returns &amp;lt;code&amp;gt;lo w&amp;lt;/code&amp;gt;&lt;br /&gt;
:Example2: &amp;lt;code&amp;gt;mid(&amp;quot;hello world&amp;quot;, 6, 3)&amp;lt;/code&amp;gt; returns &amp;lt;code&amp;gt;wor&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;replace(string, search, replace[, [..], search, replace])&lt;br /&gt;
:replaces a search text inside of a value&lt;br /&gt;
:Example1: &amp;lt;code&amp;gt;replace(&amp;quot;hello world&amp;quot;, &amp;quot;world&amp;quot;, &amp;quot;earth&amp;quot;)&amp;lt;/code&amp;gt; returns &amp;lt;code&amp;gt;hello earth&amp;lt;/code&amp;gt;&lt;br /&gt;
:Example2: &amp;lt;code&amp;gt;replace(replace(&amp;quot;[hello world]&amp;quot;, &amp;quot;\[&amp;quot;, &amp;quot;(&amp;quot;),&amp;quot;\]&amp;quot;,&amp;quot;)&amp;quot;)&amp;lt;/code&amp;gt; returns &amp;lt;code&amp;gt;(hello world)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Note: There are special characters in regular expressions that needs to be escaped or the script will return an error, in the above example [ and ] are special characters.&lt;br /&gt;
&lt;br /&gt;
;right(string, count)&lt;br /&gt;
:returns a substring of a value&lt;br /&gt;
;sprintf(format, arguments)&lt;br /&gt;
:formats a series of values into a string&lt;br /&gt;
;string(anything)&lt;br /&gt;
:converts a value to it's string value&lt;br /&gt;
;substring(string, start, count)&lt;br /&gt;
:returns a substring of a value&lt;br /&gt;
;text()&lt;br /&gt;
://todo&lt;br /&gt;
;title(string)&lt;br /&gt;
:returns a title case value of a string&lt;br /&gt;
;upper(string)&lt;br /&gt;
:returns an upper case value of a string&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#Time|Time]] =&lt;br /&gt;
;time(value)&lt;br /&gt;
:returns the value as a time type&lt;br /&gt;
;addSeconds(dateTime, seconds)&lt;br /&gt;
:adds seconds to time, returns the value as a time type&lt;br /&gt;
;addMinutes(dateTime, minutes)&lt;br /&gt;
:adds minutes to time, returns the value as a time type&lt;br /&gt;
;addHours(dateTime, hours)&lt;br /&gt;
:adds hours to time, returns the value as a time type&lt;br /&gt;
;addDays(dateTime, days)&lt;br /&gt;
:adds days to time, returns the value as a time type&lt;br /&gt;
;addWeeks(dateTime, weeks)&lt;br /&gt;
:adds weeks to time, returns the value as a time type&lt;/div&gt;</summary>
		<author><name>Eibyer</name></author>	</entry>

	<entry>
		<id>https://wiki.webcore.co/index.php?title=Functions&amp;diff=299</id>
		<title>Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.webcore.co/index.php?title=Functions&amp;diff=299"/>
				<updated>2017-05-05T04:46:28Z</updated>
		
		<summary type="html">&lt;p&gt;Eibyer: /* String */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= [[Variable_data_types#Boolean|Boolean]] =&lt;br /&gt;
;bool()&lt;br /&gt;
://todo&lt;br /&gt;
;boolean(anything)&lt;br /&gt;
:converts a value to it's boolean value&lt;br /&gt;
;contains(string, substring)&lt;br /&gt;
:returns true if a string contains a substring&lt;br /&gt;
;endsWith(string, substring)&lt;br /&gt;
:returns true if a string ends with a substring&lt;br /&gt;
;eq(value1, value2)&lt;br /&gt;
:returns true if two values are equal&lt;br /&gt;
;ge(value1, value2)&lt;br /&gt;
:returns true if value1 &amp;gt;= value2&lt;br /&gt;
;gt(value1, value2)&lt;br /&gt;
:returns true if value1 &amp;gt; value2&lt;br /&gt;
;isBetween(value, startValue, endValue)&lt;br /&gt;
:returns true if value &amp;gt;= startValue and value &amp;lt;= endValue&lt;br /&gt;
;isEmpty(value)&lt;br /&gt;
:returns true if the value is empty&lt;br /&gt;
;le(value1, value2)&lt;br /&gt;
:returns true if value1 &amp;lt;= value2&lt;br /&gt;
;lt(value1, value2)&lt;br /&gt;
:returns true if value1 &amp;lt; value2	&lt;br /&gt;
;not(value)&lt;br /&gt;
:returns the negative boolean value&lt;br /&gt;
;startsWith(string, substring)&lt;br /&gt;
:returns true if a string starts with a substring&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#Date|Date]] =&lt;br /&gt;
;date(value)&lt;br /&gt;
:returns the value as a date type&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#Date_and_Time|Datetime]] =&lt;br /&gt;
;addDays(dateTime, days)&lt;br /&gt;
:returns the value as a time type&lt;br /&gt;
;addHours(dateTime, hours)&lt;br /&gt;
:returns the value as a time type&lt;br /&gt;
;addMinutes(dateTime, minutes)&lt;br /&gt;
:returns the value as a time type&lt;br /&gt;
;addSeconds(dateTime, seconds)&lt;br /&gt;
:returns the value as a time type&lt;br /&gt;
;addWeeks(dateTime, weeks)&lt;br /&gt;
:returns the value as a time type&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#Number_.28Decimal.29|Decimal]] =&lt;br /&gt;
;avg(values)&lt;br /&gt;
:calculates the average of a series of numeric values&lt;br /&gt;
;ceil()&lt;br /&gt;
://todo&lt;br /&gt;
;ceiling(decimal or string)&lt;br /&gt;
:converts a decimal value to it's closest higher integer value&lt;br /&gt;
;celsius(temperature) &lt;br /&gt;
:converts temperature from Fahrenheit to Celsius&lt;br /&gt;
;decimal(integer or string)&lt;br /&gt;
:converts an integer value to it's decimal value&lt;br /&gt;
;dewPoint(temperature, relativeHumidity[, scale])&lt;br /&gt;
:returns the calculated dew point temperature&lt;br /&gt;
;fahrenheit([Sensor;temperature]) &lt;br /&gt;
:converts temperature from Celsius to Fahrenheit&lt;br /&gt;
;float()&lt;br /&gt;
://todo&lt;br /&gt;
;floor(decimal or string)&lt;br /&gt;
:converts a decimal value to it's closest lower integer value&lt;br /&gt;
;max(values)&lt;br /&gt;
:calculates the maximum of a series of numeric values&lt;br /&gt;
;median(values)&lt;br /&gt;
:returns the value in the middle of a sorted array&lt;br /&gt;
;min(values)&lt;br /&gt;
:calculates the minimum of a series of numeric values&lt;br /&gt;
;number()&lt;br /&gt;
://todo&lt;br /&gt;
;power(integer or decimal or string, power) &lt;br /&gt;
:converts a decimal value to it's power decimal value&lt;br /&gt;
;round(decimal or string, [precision]) &lt;br /&gt;
:converts a decimal value to it's rounded value&lt;br /&gt;
;sqr(integer or decimal or string) &lt;br /&gt;
:converts a decimal value to it's square decimal value&lt;br /&gt;
;sqrt(integer or decimal or string) &lt;br /&gt;
:converts a decimal value to it's square root decimal value&lt;br /&gt;
;stdev(values)&lt;br /&gt;
:calculates the standard deviation of a series of numeric values&lt;br /&gt;
;sum(values)&lt;br /&gt;
:calculates the sum of a series of numeric values&lt;br /&gt;
;variance(values)&lt;br /&gt;
:calculates the standard deviation of a series of numeric values&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#Dynamic|Dynamic]] =&lt;br /&gt;
;if(condition, valueIfTrue, valueIfFalse)&lt;br /&gt;
:evaluates a boolean and returns value1 if true, or value2 otherwise&lt;br /&gt;
;least(values)&lt;br /&gt;
:returns the value that is least found a series of numeric values&lt;br /&gt;
;most(values)&lt;br /&gt;
:returns the value that is most found a series of numeric values&lt;br /&gt;
;previousValue([device;attribute])&lt;br /&gt;
:returns the previous value of the attribute&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#Number_.28Integer.29|Integers]] =&lt;br /&gt;
;age([device;attribute])&lt;br /&gt;
:returns the number of milliseconds an attribute had the current value&lt;br /&gt;
;count(values)&lt;br /&gt;
:calculates the number of true/non-zero/non-empty items in a series of numeric values&lt;br /&gt;
;int()&lt;br /&gt;
://todo&lt;br /&gt;
;integer(decimal or string)&lt;br /&gt;
:converts a decimal value to it's integer value&lt;br /&gt;
;newer([device;attribute],[...], [device;attribute], threshold)&lt;br /&gt;
:returns the number of devices whose attribute had the current value for less than the specified number of milliseconds&lt;br /&gt;
;older([device;attribute],[...], [device;attribute], threshold)&lt;br /&gt;
:returns the number of devices whose attribute had the current value for more than the specified number of milliseconds&lt;br /&gt;
;previousAge([device;attribute])&lt;br /&gt;
:returns the number of milliseconds an attribute had the previous value&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#String|String]] =&lt;br /&gt;
;concat(string1, string2) &lt;br /&gt;
:returns two strings appended together&lt;br /&gt;
: Example: &amp;lt;code&amp;gt;concat(&amp;quot;hello &amp;quot;, &amp;quot;world&amp;quot;)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;concat(&amp;quot;hello&amp;quot;, &amp;quot; &amp;quot;, &amp;quot;world&amp;quot;)&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;hello world&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;format() &lt;br /&gt;
://todo&lt;br /&gt;
;formatDuration(value[, friendly = false[, granularity = 's'[, showAdverbs = false]]])&lt;br /&gt;
:Usage:&lt;br /&gt;
::value is a number of milliseconds&lt;br /&gt;
::friendly = true/false (false &amp;gt;&amp;gt;&amp;gt; 0d 00:00:00.000, true &amp;gt;&amp;gt;&amp;gt; so many days, so many hours, etc)&lt;br /&gt;
::granularity = one of ms, s, m, h, d (smallest part displayed)&lt;br /&gt;
::showAdverbs = true/false, true adds the in .... or .... ago to friendly times&lt;br /&gt;
:returns a nicely formatted string of time &lt;br /&gt;
:eg: formatDuration(12029) - 00:00:12 | formatDuration(12029, true) - 12 seconds | formatDuration(12029, true, &amp;quot;m&amp;quot;) - 0 minutes | formatDuration(12029, true, &amp;quot;ms&amp;quot;, true) - in 12 seconds and 29 milliseconds&lt;br /&gt;
&lt;br /&gt;
;left(string, count) &lt;br /&gt;
:returns a substring of a value&lt;br /&gt;
:Example1: &amp;lt;code&amp;gt;left(&amp;quot;hello world&amp;quot;, 3)&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;hel&amp;lt;/code&amp;gt;&lt;br /&gt;
:Example2: &amp;lt;code&amp;gt;left(&amp;quot;hello world&amp;quot;, 7)&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;hello w&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
;lower(string)&lt;br /&gt;
:returns a lower case value of a string&lt;br /&gt;
:Example: &amp;lt;code&amp;gt;lower(&amp;quot;HELLO WORLD&amp;quot;)&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;hello world&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;mid(string, start, count)&lt;br /&gt;
:returns a substring of a value&lt;br /&gt;
:returns characters (including spaces) specified by count after start position from string&lt;br /&gt;
:Example1: &amp;lt;code&amp;gt;mid(&amp;quot;hello world&amp;quot;, 3, 4)&amp;lt;/code&amp;gt; returns &amp;lt;code&amp;gt;lo w&amp;lt;/code&amp;gt;&lt;br /&gt;
:Example2: &amp;lt;code&amp;gt;mid(&amp;quot;hello world&amp;quot;, 6, 3)&amp;lt;/code&amp;gt; returns &amp;lt;code&amp;gt;wor&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;replace(string, search, replace[, [..], search, replace])&lt;br /&gt;
:replaces a search text inside of a value&lt;br /&gt;
:Example1: &amp;lt;code&amp;gt;replace(&amp;quot;hello world&amp;quot;, &amp;quot;world&amp;quot;, &amp;quot;earth&amp;quot;)&amp;lt;/code&amp;gt; returns &amp;lt;code&amp;gt;hello earth&amp;lt;/code&amp;gt;&lt;br /&gt;
:Example2: &amp;lt;code&amp;gt;replace(replace(&amp;quot;[hello world]&amp;quot;, &amp;quot;\[&amp;quot;, &amp;quot;(&amp;quot;),&amp;quot;\]&amp;quot;,&amp;quot;)&amp;quot;)&amp;lt;/code&amp;gt; returns &amp;lt;code&amp;gt;(hello world)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Note: There are special characters in RegEx that needs to be escaped or the script will return an error, in the above example [ and ] are RegEx special characters.&lt;br /&gt;
&lt;br /&gt;
;right(string, count)&lt;br /&gt;
:returns a substring of a value&lt;br /&gt;
;sprintf(format, arguments)&lt;br /&gt;
:formats a series of values into a string&lt;br /&gt;
;string(anything)&lt;br /&gt;
:converts a value to it's string value&lt;br /&gt;
;substring(string, start, count)&lt;br /&gt;
:returns a substring of a value&lt;br /&gt;
;text()&lt;br /&gt;
://todo&lt;br /&gt;
;title(string)&lt;br /&gt;
:returns a title case value of a string&lt;br /&gt;
;upper(string)&lt;br /&gt;
:returns an upper case value of a string&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#Time|Time]] =&lt;br /&gt;
;time(value)&lt;br /&gt;
:returns the value as a time type&lt;br /&gt;
;addSeconds(dateTime, seconds)&lt;br /&gt;
:adds seconds to time, returns the value as a time type&lt;br /&gt;
;addMinutes(dateTime, minutes)&lt;br /&gt;
:adds minutes to time, returns the value as a time type&lt;br /&gt;
;addHours(dateTime, hours)&lt;br /&gt;
:adds hours to time, returns the value as a time type&lt;br /&gt;
;addDays(dateTime, days)&lt;br /&gt;
:adds days to time, returns the value as a time type&lt;br /&gt;
;addWeeks(dateTime, weeks)&lt;br /&gt;
:adds weeks to time, returns the value as a time type&lt;/div&gt;</summary>
		<author><name>Eibyer</name></author>	</entry>

	<entry>
		<id>https://wiki.webcore.co/index.php?title=Functions&amp;diff=298</id>
		<title>Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.webcore.co/index.php?title=Functions&amp;diff=298"/>
				<updated>2017-05-05T04:33:18Z</updated>
		
		<summary type="html">&lt;p&gt;Eibyer: /* String */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= [[Variable_data_types#Boolean|Boolean]] =&lt;br /&gt;
;bool()&lt;br /&gt;
://todo&lt;br /&gt;
;boolean(anything)&lt;br /&gt;
:converts a value to it's boolean value&lt;br /&gt;
;contains(string, substring)&lt;br /&gt;
:returns true if a string contains a substring&lt;br /&gt;
;endsWith(string, substring)&lt;br /&gt;
:returns true if a string ends with a substring&lt;br /&gt;
;eq(value1, value2)&lt;br /&gt;
:returns true if two values are equal&lt;br /&gt;
;ge(value1, value2)&lt;br /&gt;
:returns true if value1 &amp;gt;= value2&lt;br /&gt;
;gt(value1, value2)&lt;br /&gt;
:returns true if value1 &amp;gt; value2&lt;br /&gt;
;isBetween(value, startValue, endValue)&lt;br /&gt;
:returns true if value &amp;gt;= startValue and value &amp;lt;= endValue&lt;br /&gt;
;isEmpty(value)&lt;br /&gt;
:returns true if the value is empty&lt;br /&gt;
;le(value1, value2)&lt;br /&gt;
:returns true if value1 &amp;lt;= value2&lt;br /&gt;
;lt(value1, value2)&lt;br /&gt;
:returns true if value1 &amp;lt; value2	&lt;br /&gt;
;not(value)&lt;br /&gt;
:returns the negative boolean value&lt;br /&gt;
;startsWith(string, substring)&lt;br /&gt;
:returns true if a string starts with a substring&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#Date|Date]] =&lt;br /&gt;
;date(value)&lt;br /&gt;
:returns the value as a date type&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#Date_and_Time|Datetime]] =&lt;br /&gt;
;addDays(dateTime, days)&lt;br /&gt;
:returns the value as a time type&lt;br /&gt;
;addHours(dateTime, hours)&lt;br /&gt;
:returns the value as a time type&lt;br /&gt;
;addMinutes(dateTime, minutes)&lt;br /&gt;
:returns the value as a time type&lt;br /&gt;
;addSeconds(dateTime, seconds)&lt;br /&gt;
:returns the value as a time type&lt;br /&gt;
;addWeeks(dateTime, weeks)&lt;br /&gt;
:returns the value as a time type&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#Number_.28Decimal.29|Decimal]] =&lt;br /&gt;
;avg(values)&lt;br /&gt;
:calculates the average of a series of numeric values&lt;br /&gt;
;ceil()&lt;br /&gt;
://todo&lt;br /&gt;
;ceiling(decimal or string)&lt;br /&gt;
:converts a decimal value to it's closest higher integer value&lt;br /&gt;
;celsius(temperature) &lt;br /&gt;
:converts temperature from Fahrenheit to Celsius&lt;br /&gt;
;decimal(integer or string)&lt;br /&gt;
:converts an integer value to it's decimal value&lt;br /&gt;
;dewPoint(temperature, relativeHumidity[, scale])&lt;br /&gt;
:returns the calculated dew point temperature&lt;br /&gt;
;fahrenheit([Sensor;temperature]) &lt;br /&gt;
:converts temperature from Celsius to Fahrenheit&lt;br /&gt;
;float()&lt;br /&gt;
://todo&lt;br /&gt;
;floor(decimal or string)&lt;br /&gt;
:converts a decimal value to it's closest lower integer value&lt;br /&gt;
;max(values)&lt;br /&gt;
:calculates the maximum of a series of numeric values&lt;br /&gt;
;median(values)&lt;br /&gt;
:returns the value in the middle of a sorted array&lt;br /&gt;
;min(values)&lt;br /&gt;
:calculates the minimum of a series of numeric values&lt;br /&gt;
;number()&lt;br /&gt;
://todo&lt;br /&gt;
;power(integer or decimal or string, power) &lt;br /&gt;
:converts a decimal value to it's power decimal value&lt;br /&gt;
;round(decimal or string, [precision]) &lt;br /&gt;
:converts a decimal value to it's rounded value&lt;br /&gt;
;sqr(integer or decimal or string) &lt;br /&gt;
:converts a decimal value to it's square decimal value&lt;br /&gt;
;sqrt(integer or decimal or string) &lt;br /&gt;
:converts a decimal value to it's square root decimal value&lt;br /&gt;
;stdev(values)&lt;br /&gt;
:calculates the standard deviation of a series of numeric values&lt;br /&gt;
;sum(values)&lt;br /&gt;
:calculates the sum of a series of numeric values&lt;br /&gt;
;variance(values)&lt;br /&gt;
:calculates the standard deviation of a series of numeric values&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#Dynamic|Dynamic]] =&lt;br /&gt;
;if(condition, valueIfTrue, valueIfFalse)&lt;br /&gt;
:evaluates a boolean and returns value1 if true, or value2 otherwise&lt;br /&gt;
;least(values)&lt;br /&gt;
:returns the value that is least found a series of numeric values&lt;br /&gt;
;most(values)&lt;br /&gt;
:returns the value that is most found a series of numeric values&lt;br /&gt;
;previousValue([device;attribute])&lt;br /&gt;
:returns the previous value of the attribute&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#Number_.28Integer.29|Integers]] =&lt;br /&gt;
;age([device;attribute])&lt;br /&gt;
:returns the number of milliseconds an attribute had the current value&lt;br /&gt;
;count(values)&lt;br /&gt;
:calculates the number of true/non-zero/non-empty items in a series of numeric values&lt;br /&gt;
;int()&lt;br /&gt;
://todo&lt;br /&gt;
;integer(decimal or string)&lt;br /&gt;
:converts a decimal value to it's integer value&lt;br /&gt;
;newer([device;attribute],[...], [device;attribute], threshold)&lt;br /&gt;
:returns the number of devices whose attribute had the current value for less than the specified number of milliseconds&lt;br /&gt;
;older([device;attribute],[...], [device;attribute], threshold)&lt;br /&gt;
:returns the number of devices whose attribute had the current value for more than the specified number of milliseconds&lt;br /&gt;
;previousAge([device;attribute])&lt;br /&gt;
:returns the number of milliseconds an attribute had the previous value&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#String|String]] =&lt;br /&gt;
;concat(string1, string2) &lt;br /&gt;
:returns two strings appended together&lt;br /&gt;
: Example: &amp;lt;code&amp;gt;concat(&amp;quot;hello &amp;quot;, &amp;quot;world&amp;quot;)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;concat(&amp;quot;hello&amp;quot;, &amp;quot; &amp;quot;, &amp;quot;world&amp;quot;)&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;hello world&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;format() &lt;br /&gt;
://todo&lt;br /&gt;
;formatDuration(value[, friendly = false[, granularity = 's'[, showAdverbs = false]]])&lt;br /&gt;
:Usage:&lt;br /&gt;
::value is a number of milliseconds&lt;br /&gt;
::friendly = true/false (false &amp;gt;&amp;gt;&amp;gt; 0d 00:00:00.000, true &amp;gt;&amp;gt;&amp;gt; so many days, so many hours, etc)&lt;br /&gt;
::granularity = one of ms, s, m, h, d (smallest part displayed)&lt;br /&gt;
::showAdverbs = true/false, true adds the in .... or .... ago to friendly times&lt;br /&gt;
:returns a nicely formatted string of time &lt;br /&gt;
:eg: formatDuration(12029) - 00:00:12 | formatDuration(12029, true) - 12 seconds | formatDuration(12029, true, &amp;quot;m&amp;quot;) - 0 minutes | formatDuration(12029, true, &amp;quot;ms&amp;quot;, true) - in 12 seconds and 29 milliseconds&lt;br /&gt;
&lt;br /&gt;
;left(string, count) &lt;br /&gt;
:returns a substring of a value&lt;br /&gt;
:Example1: &amp;lt;code&amp;gt;left(&amp;quot;hello world&amp;quot;, 3)&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;hel&amp;lt;/code&amp;gt;&lt;br /&gt;
:Example2: &amp;lt;code&amp;gt;left(&amp;quot;hello world&amp;quot;, 7)&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;hello w&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
;lower(string)&lt;br /&gt;
:returns a lower case value of a string&lt;br /&gt;
:Example: &amp;lt;code&amp;gt;lower(&amp;quot;HELLO WORLD&amp;quot;)&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;hello world&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;mid(string, start, count)&lt;br /&gt;
:returns a substring of a value&lt;br /&gt;
:returns characters (including spaces) specified by count after start position from string&lt;br /&gt;
:Example1: &amp;lt;code&amp;gt;mid(&amp;quot;hello world&amp;quot;, 3, 4)&amp;lt;/code&amp;gt; returns &amp;lt;code&amp;gt;lo w&amp;lt;/code&amp;gt;&lt;br /&gt;
:Example2: &amp;lt;code&amp;gt;mid(&amp;quot;hello world&amp;quot;, 6, 3)&amp;lt;/code&amp;gt; returns &amp;lt;code&amp;gt;wor&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;replace(string, search, replace[, [..], search, replace])&lt;br /&gt;
:replaces a search text inside of a value&lt;br /&gt;
;right(string, count)&lt;br /&gt;
:returns a substring of a value&lt;br /&gt;
;sprintf(format, arguments)&lt;br /&gt;
:formats a series of values into a string&lt;br /&gt;
;string(anything)&lt;br /&gt;
:converts a value to it's string value&lt;br /&gt;
;substring(string, start, count)&lt;br /&gt;
:returns a substring of a value&lt;br /&gt;
;text()&lt;br /&gt;
://todo&lt;br /&gt;
;title(string)&lt;br /&gt;
:returns a title case value of a string&lt;br /&gt;
;upper(string)&lt;br /&gt;
:returns an upper case value of a string&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#Time|Time]] =&lt;br /&gt;
;time(value)&lt;br /&gt;
:returns the value as a time type&lt;br /&gt;
;addSeconds(dateTime, seconds)&lt;br /&gt;
:adds seconds to time, returns the value as a time type&lt;br /&gt;
;addMinutes(dateTime, minutes)&lt;br /&gt;
:adds minutes to time, returns the value as a time type&lt;br /&gt;
;addHours(dateTime, hours)&lt;br /&gt;
:adds hours to time, returns the value as a time type&lt;br /&gt;
;addDays(dateTime, days)&lt;br /&gt;
:adds days to time, returns the value as a time type&lt;br /&gt;
;addWeeks(dateTime, weeks)&lt;br /&gt;
:adds weeks to time, returns the value as a time type&lt;/div&gt;</summary>
		<author><name>Eibyer</name></author>	</entry>

	<entry>
		<id>https://wiki.webcore.co/index.php?title=Functions&amp;diff=297</id>
		<title>Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.webcore.co/index.php?title=Functions&amp;diff=297"/>
				<updated>2017-05-05T04:21:00Z</updated>
		
		<summary type="html">&lt;p&gt;Eibyer: /* String */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= [[Variable_data_types#Boolean|Boolean]] =&lt;br /&gt;
;bool()&lt;br /&gt;
://todo&lt;br /&gt;
;boolean(anything)&lt;br /&gt;
:converts a value to it's boolean value&lt;br /&gt;
;contains(string, substring)&lt;br /&gt;
:returns true if a string contains a substring&lt;br /&gt;
;endsWith(string, substring)&lt;br /&gt;
:returns true if a string ends with a substring&lt;br /&gt;
;eq(value1, value2)&lt;br /&gt;
:returns true if two values are equal&lt;br /&gt;
;ge(value1, value2)&lt;br /&gt;
:returns true if value1 &amp;gt;= value2&lt;br /&gt;
;gt(value1, value2)&lt;br /&gt;
:returns true if value1 &amp;gt; value2&lt;br /&gt;
;isBetween(value, startValue, endValue)&lt;br /&gt;
:returns true if value &amp;gt;= startValue and value &amp;lt;= endValue&lt;br /&gt;
;isEmpty(value)&lt;br /&gt;
:returns true if the value is empty&lt;br /&gt;
;le(value1, value2)&lt;br /&gt;
:returns true if value1 &amp;lt;= value2&lt;br /&gt;
;lt(value1, value2)&lt;br /&gt;
:returns true if value1 &amp;lt; value2	&lt;br /&gt;
;not(value)&lt;br /&gt;
:returns the negative boolean value&lt;br /&gt;
;startsWith(string, substring)&lt;br /&gt;
:returns true if a string starts with a substring&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#Date|Date]] =&lt;br /&gt;
;date(value)&lt;br /&gt;
:returns the value as a date type&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#Date_and_Time|Datetime]] =&lt;br /&gt;
;addDays(dateTime, days)&lt;br /&gt;
:returns the value as a time type&lt;br /&gt;
;addHours(dateTime, hours)&lt;br /&gt;
:returns the value as a time type&lt;br /&gt;
;addMinutes(dateTime, minutes)&lt;br /&gt;
:returns the value as a time type&lt;br /&gt;
;addSeconds(dateTime, seconds)&lt;br /&gt;
:returns the value as a time type&lt;br /&gt;
;addWeeks(dateTime, weeks)&lt;br /&gt;
:returns the value as a time type&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#Number_.28Decimal.29|Decimal]] =&lt;br /&gt;
;avg(values)&lt;br /&gt;
:calculates the average of a series of numeric values&lt;br /&gt;
;ceil()&lt;br /&gt;
://todo&lt;br /&gt;
;ceiling(decimal or string)&lt;br /&gt;
:converts a decimal value to it's closest higher integer value&lt;br /&gt;
;celsius(temperature) &lt;br /&gt;
:converts temperature from Fahrenheit to Celsius&lt;br /&gt;
;decimal(integer or string)&lt;br /&gt;
:converts an integer value to it's decimal value&lt;br /&gt;
;dewPoint(temperature, relativeHumidity[, scale])&lt;br /&gt;
:returns the calculated dew point temperature&lt;br /&gt;
;fahrenheit([Sensor;temperature]) &lt;br /&gt;
:converts temperature from Celsius to Fahrenheit&lt;br /&gt;
;float()&lt;br /&gt;
://todo&lt;br /&gt;
;floor(decimal or string)&lt;br /&gt;
:converts a decimal value to it's closest lower integer value&lt;br /&gt;
;max(values)&lt;br /&gt;
:calculates the maximum of a series of numeric values&lt;br /&gt;
;median(values)&lt;br /&gt;
:returns the value in the middle of a sorted array&lt;br /&gt;
;min(values)&lt;br /&gt;
:calculates the minimum of a series of numeric values&lt;br /&gt;
;number()&lt;br /&gt;
://todo&lt;br /&gt;
;power(integer or decimal or string, power) &lt;br /&gt;
:converts a decimal value to it's power decimal value&lt;br /&gt;
;round(decimal or string, [precision]) &lt;br /&gt;
:converts a decimal value to it's rounded value&lt;br /&gt;
;sqr(integer or decimal or string) &lt;br /&gt;
:converts a decimal value to it's square decimal value&lt;br /&gt;
;sqrt(integer or decimal or string) &lt;br /&gt;
:converts a decimal value to it's square root decimal value&lt;br /&gt;
;stdev(values)&lt;br /&gt;
:calculates the standard deviation of a series of numeric values&lt;br /&gt;
;sum(values)&lt;br /&gt;
:calculates the sum of a series of numeric values&lt;br /&gt;
;variance(values)&lt;br /&gt;
:calculates the standard deviation of a series of numeric values&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#Dynamic|Dynamic]] =&lt;br /&gt;
;if(condition, valueIfTrue, valueIfFalse)&lt;br /&gt;
:evaluates a boolean and returns value1 if true, or value2 otherwise&lt;br /&gt;
;least(values)&lt;br /&gt;
:returns the value that is least found a series of numeric values&lt;br /&gt;
;most(values)&lt;br /&gt;
:returns the value that is most found a series of numeric values&lt;br /&gt;
;previousValue([device;attribute])&lt;br /&gt;
:returns the previous value of the attribute&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#Number_.28Integer.29|Integers]] =&lt;br /&gt;
;age([device;attribute])&lt;br /&gt;
:returns the number of milliseconds an attribute had the current value&lt;br /&gt;
;count(values)&lt;br /&gt;
:calculates the number of true/non-zero/non-empty items in a series of numeric values&lt;br /&gt;
;int()&lt;br /&gt;
://todo&lt;br /&gt;
;integer(decimal or string)&lt;br /&gt;
:converts a decimal value to it's integer value&lt;br /&gt;
;newer([device;attribute],[...], [device;attribute], threshold)&lt;br /&gt;
:returns the number of devices whose attribute had the current value for less than the specified number of milliseconds&lt;br /&gt;
;older([device;attribute],[...], [device;attribute], threshold)&lt;br /&gt;
:returns the number of devices whose attribute had the current value for more than the specified number of milliseconds&lt;br /&gt;
;previousAge([device;attribute])&lt;br /&gt;
:returns the number of milliseconds an attribute had the previous value&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#String|String]] =&lt;br /&gt;
;concat(string1, string2) &lt;br /&gt;
:returns two strings appended together&lt;br /&gt;
: Example: &amp;lt;code&amp;gt;concat(&amp;quot;hello &amp;quot;, &amp;quot;world&amp;quot;)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;concat(&amp;quot;hello&amp;quot;, &amp;quot; &amp;quot;, &amp;quot;world&amp;quot;)&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;hello world&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;format() &lt;br /&gt;
://todo&lt;br /&gt;
;formatDuration(value[, friendly = false[, granularity = 's'[, showAdverbs = false]]])&lt;br /&gt;
:Usage:&lt;br /&gt;
::value is a number of milliseconds&lt;br /&gt;
::friendly = true/false (false &amp;gt;&amp;gt;&amp;gt; 0d 00:00:00.000, true &amp;gt;&amp;gt;&amp;gt; so many days, so many hours, etc)&lt;br /&gt;
::granularity = one of ms, s, m, h, d (smallest part displayed)&lt;br /&gt;
::showAdverbs = true/false, true adds the in .... or .... ago to friendly times&lt;br /&gt;
:returns a nicely formatted string of time &lt;br /&gt;
:eg: formatDuration(12029) - 00:00:12 | formatDuration(12029, true) - 12 seconds | formatDuration(12029, true, &amp;quot;m&amp;quot;) - 0 minutes | formatDuration(12029, true, &amp;quot;ms&amp;quot;, true) - in 12 seconds and 29 milliseconds&lt;br /&gt;
&lt;br /&gt;
;left(string, count) &lt;br /&gt;
:returns a substring of a value&lt;br /&gt;
:Example1: &amp;lt;code&amp;gt;left(&amp;quot;hello world&amp;quot;, 3)&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;hel&amp;lt;/code&amp;gt;&lt;br /&gt;
:Example2: &amp;lt;code&amp;gt;left(&amp;quot;hello world&amp;quot;, 7)&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;hello w&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
;lower(string)&lt;br /&gt;
:returns a lower case value of a string&lt;br /&gt;
:Example: &amp;lt;code&amp;gt;lower(&amp;quot;HELLO WORLD&amp;quot;)&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;hello world&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;mid(string, start, count)&lt;br /&gt;
::returns a substring of a value&lt;br /&gt;
;replace(string, search, replace[, [..], search, replace])&lt;br /&gt;
:replaces a search text inside of a value&lt;br /&gt;
;right(string, count)&lt;br /&gt;
:returns a substring of a value&lt;br /&gt;
;sprintf(format, arguments)&lt;br /&gt;
:formats a series of values into a string&lt;br /&gt;
;string(anything)&lt;br /&gt;
:converts a value to it's string value&lt;br /&gt;
;substring(string, start, count)&lt;br /&gt;
:returns a substring of a value&lt;br /&gt;
;text()&lt;br /&gt;
://todo&lt;br /&gt;
;title(string)&lt;br /&gt;
:returns a title case value of a string&lt;br /&gt;
;upper(string)&lt;br /&gt;
:returns an upper case value of a string&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#Time|Time]] =&lt;br /&gt;
;time(value)&lt;br /&gt;
:returns the value as a time type&lt;br /&gt;
;addSeconds(dateTime, seconds)&lt;br /&gt;
:adds seconds to time, returns the value as a time type&lt;br /&gt;
;addMinutes(dateTime, minutes)&lt;br /&gt;
:adds minutes to time, returns the value as a time type&lt;br /&gt;
;addHours(dateTime, hours)&lt;br /&gt;
:adds hours to time, returns the value as a time type&lt;br /&gt;
;addDays(dateTime, days)&lt;br /&gt;
:adds days to time, returns the value as a time type&lt;br /&gt;
;addWeeks(dateTime, weeks)&lt;br /&gt;
:adds weeks to time, returns the value as a time type&lt;/div&gt;</summary>
		<author><name>Eibyer</name></author>	</entry>

	<entry>
		<id>https://wiki.webcore.co/index.php?title=Functions&amp;diff=291</id>
		<title>Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.webcore.co/index.php?title=Functions&amp;diff=291"/>
				<updated>2017-05-05T00:00:19Z</updated>
		
		<summary type="html">&lt;p&gt;Eibyer: /* String */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= [[Variable_data_types#Boolean|Boolean]] =&lt;br /&gt;
;bool()&lt;br /&gt;
://todo&lt;br /&gt;
;boolean(anything)&lt;br /&gt;
:converts a value to it's boolean value&lt;br /&gt;
;contains(string, substring)&lt;br /&gt;
:returns true if a string contains a substring&lt;br /&gt;
;endsWith(string, substring)&lt;br /&gt;
:returns true if a string ends with a substring&lt;br /&gt;
;eq(value1, value2)&lt;br /&gt;
:returns true if two values are equal&lt;br /&gt;
;ge(value1, value2)&lt;br /&gt;
:returns true if value1 &amp;gt;= value2&lt;br /&gt;
;gt(value1, value2)&lt;br /&gt;
:returns true if value1 &amp;gt; value2&lt;br /&gt;
;isBetween(value, startValue, endValue)&lt;br /&gt;
:returns true if value &amp;gt;= startValue and value &amp;lt;= endValue&lt;br /&gt;
;isEmpty(value)&lt;br /&gt;
:returns true if the value is empty&lt;br /&gt;
;le(value1, value2)&lt;br /&gt;
:returns true if value1 &amp;lt;= value2&lt;br /&gt;
;lt(value1, value2)&lt;br /&gt;
:returns true if value1 &amp;lt; value2	&lt;br /&gt;
;not(value)&lt;br /&gt;
:returns the negative boolean value&lt;br /&gt;
;startsWith(string, substring)&lt;br /&gt;
:returns true if a string starts with a substring&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#Date|Date]] =&lt;br /&gt;
;date(value)&lt;br /&gt;
:returns the value as a date type&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#Date_and_Time|Datetime]] =&lt;br /&gt;
;addDays(dateTime, days)&lt;br /&gt;
:returns the value as a time type&lt;br /&gt;
;addHours(dateTime, hours)&lt;br /&gt;
:returns the value as a time type&lt;br /&gt;
;addMinutes(dateTime, minutes)&lt;br /&gt;
:returns the value as a time type&lt;br /&gt;
;addSeconds(dateTime, seconds)&lt;br /&gt;
:returns the value as a time type&lt;br /&gt;
;addWeeks(dateTime, weeks)&lt;br /&gt;
:returns the value as a time type&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#Number_.28Decimal.29|Decimal]] =&lt;br /&gt;
;avg(values)&lt;br /&gt;
:calculates the average of a series of numeric values&lt;br /&gt;
;ceil()&lt;br /&gt;
://todo&lt;br /&gt;
;ceiling(decimal or string)&lt;br /&gt;
:converts a decimal value to it's closest higher integer value&lt;br /&gt;
;celsius(temperature) &lt;br /&gt;
:converts temperature from Fahrenheit to Celsius&lt;br /&gt;
;decimal(integer or string)&lt;br /&gt;
:converts an integer value to it's decimal value&lt;br /&gt;
;dewPoint(temperature, relativeHumidity[, scale])&lt;br /&gt;
:returns the calculated dew point temperature&lt;br /&gt;
;fahrenheit([Sensor;temperature]) &lt;br /&gt;
:converts temperature from Celsius to Fahrenheit&lt;br /&gt;
;float()&lt;br /&gt;
://todo&lt;br /&gt;
;floor(decimal or string)&lt;br /&gt;
:converts a decimal value to it's closest lower integer value&lt;br /&gt;
;max(values)&lt;br /&gt;
:calculates the maximum of a series of numeric values&lt;br /&gt;
;median(values)&lt;br /&gt;
:returns the value in the middle of a sorted array&lt;br /&gt;
;min(values)&lt;br /&gt;
:calculates the minimum of a series of numeric values&lt;br /&gt;
;number()&lt;br /&gt;
://todo&lt;br /&gt;
;power(integer or decimal or string, power) &lt;br /&gt;
:converts a decimal value to it's power decimal value&lt;br /&gt;
;round(decimal or string, [precision]) &lt;br /&gt;
:converts a decimal value to it's rounded value&lt;br /&gt;
;sqr(integer or decimal or string) &lt;br /&gt;
:converts a decimal value to it's square decimal value&lt;br /&gt;
;sqrt(integer or decimal or string) &lt;br /&gt;
:converts a decimal value to it's square root decimal value&lt;br /&gt;
;stdev(values)&lt;br /&gt;
:calculates the standard deviation of a series of numeric values&lt;br /&gt;
;sum(values)&lt;br /&gt;
:calculates the sum of a series of numeric values&lt;br /&gt;
;variance(values)&lt;br /&gt;
:calculates the standard deviation of a series of numeric values&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#Dynamic|Dynamic]] =&lt;br /&gt;
;if(condition, valueIfTrue, valueIfFalse)&lt;br /&gt;
:evaluates a boolean and returns value1 if true, or value2 otherwise&lt;br /&gt;
;least(values)&lt;br /&gt;
:returns the value that is least found a series of numeric values&lt;br /&gt;
;most(values)&lt;br /&gt;
:returns the value that is most found a series of numeric values&lt;br /&gt;
;previousValue([device;attribute])&lt;br /&gt;
:returns the previous value of the attribute&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#Number_.28Integer.29|Integers]] =&lt;br /&gt;
;age([device;attribute])&lt;br /&gt;
:returns the number of milliseconds an attribute had the current value&lt;br /&gt;
;count(values)&lt;br /&gt;
:calculates the number of true/non-zero/non-empty items in a series of numeric values&lt;br /&gt;
;int()&lt;br /&gt;
://todo&lt;br /&gt;
;integer(decimal or string)&lt;br /&gt;
:converts a decimal value to it's integer value&lt;br /&gt;
;newer([device;attribute],[...], [device;attribute], threshold)&lt;br /&gt;
:returns the number of devices whose attribute had the current value for less than the specified number of milliseconds&lt;br /&gt;
;older([device;attribute],[...], [device;attribute], threshold)&lt;br /&gt;
:returns the number of devices whose attribute had the current value for more than the specified number of milliseconds&lt;br /&gt;
;previousAge([device;attribute])&lt;br /&gt;
:returns the number of milliseconds an attribute had the previous value&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#String|String]] =&lt;br /&gt;
;concat(string1, string2) &lt;br /&gt;
:returns two strings appended together&lt;br /&gt;
: Example: &amp;lt;code&amp;gt;concat(&amp;quot;hello &amp;quot;, &amp;quot;world&amp;quot;)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;concat(&amp;quot;hello&amp;quot;, &amp;quot; &amp;quot;, &amp;quot;world&amp;quot;)&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;hello world&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;format() &lt;br /&gt;
://todo&lt;br /&gt;
;formatDuration(value[, friendly = false[, granularity = 's'[, showAdverbs = false]]])&lt;br /&gt;
:Usage:&lt;br /&gt;
::value is a number of milliseconds&lt;br /&gt;
::friendly = true/false (false &amp;gt;&amp;gt;&amp;gt; 0d 00:00:00.000, true &amp;gt;&amp;gt;&amp;gt; so many days, so many hours, etc)&lt;br /&gt;
::granularity = one of ms, s, m, h, d (smallest part displayed)&lt;br /&gt;
::showAdverbs = true/false, true adds the in .... or .... ago to friendly times&lt;br /&gt;
:returns a nicely formatted string of time &lt;br /&gt;
:eg: formatDuration(12029) - 00:00:12 | formatDuration(12029, true) - 12 seconds | formatDuration(12029, true, &amp;quot;m&amp;quot;) - 0 minutes | formatDuration(12029, true, &amp;quot;ms&amp;quot;, true) - in 12 seconds and 29 milliseconds&lt;br /&gt;
&lt;br /&gt;
;left(string, count) &lt;br /&gt;
:returns a substring of a value&lt;br /&gt;
:Example1: &amp;lt;code&amp;gt;left(&amp;quot;hello world&amp;quot;, 3)&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;hel&amp;lt;/code&amp;gt;&lt;br /&gt;
:Example2: &amp;lt;code&amp;gt;left(&amp;quot;hello world&amp;quot;, 7)&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;hello w&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
;lower(string)&lt;br /&gt;
:returns a lower case value of a string&lt;br /&gt;
;mid(string, start, count)&lt;br /&gt;
::returns a substring of a value&lt;br /&gt;
;replace(string, search, replace[, [..], search, replace])&lt;br /&gt;
:replaces a search text inside of a value&lt;br /&gt;
;right(string, count)&lt;br /&gt;
:returns a substring of a value&lt;br /&gt;
;sprintf(format, arguments)&lt;br /&gt;
:formats a series of values into a string&lt;br /&gt;
;string(anything)&lt;br /&gt;
:converts a value to it's string value&lt;br /&gt;
;substring(string, start, count)&lt;br /&gt;
:returns a substring of a value&lt;br /&gt;
;text()&lt;br /&gt;
://todo&lt;br /&gt;
;title(string)&lt;br /&gt;
:returns a title case value of a string&lt;br /&gt;
;upper(string)&lt;br /&gt;
:returns an upper case value of a string&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#Time|Time]] =&lt;br /&gt;
;time(value)&lt;br /&gt;
:returns the value as a time type&lt;br /&gt;
;addSeconds(dateTime, seconds)&lt;br /&gt;
:adds seconds to time, returns the value as a time type&lt;br /&gt;
;addMinutes(dateTime, minutes)&lt;br /&gt;
:adds minutes to time, returns the value as a time type&lt;br /&gt;
;addHours(dateTime, hours)&lt;br /&gt;
:adds hours to time, returns the value as a time type&lt;br /&gt;
;addDays(dateTime, days)&lt;br /&gt;
:adds days to time, returns the value as a time type&lt;br /&gt;
;addWeeks(dateTime, weeks)&lt;br /&gt;
:adds weeks to time, returns the value as a time type&lt;/div&gt;</summary>
		<author><name>Eibyer</name></author>	</entry>

	<entry>
		<id>https://wiki.webcore.co/index.php?title=Functions&amp;diff=283</id>
		<title>Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.webcore.co/index.php?title=Functions&amp;diff=283"/>
				<updated>2017-05-04T23:49:38Z</updated>
		
		<summary type="html">&lt;p&gt;Eibyer: /* String */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= [[Variable_data_types#Boolean|Boolean]] =&lt;br /&gt;
;bool()&lt;br /&gt;
://todo&lt;br /&gt;
;boolean(anything)&lt;br /&gt;
:converts a value to it's boolean value&lt;br /&gt;
;contains(string, substring)&lt;br /&gt;
:returns true if a string contains a substring&lt;br /&gt;
;endsWith(string, substring)&lt;br /&gt;
:returns true if a string ends with a substring&lt;br /&gt;
;eq(value1, value2)&lt;br /&gt;
:returns true if two values are equal&lt;br /&gt;
;ge(value1, value2)&lt;br /&gt;
:returns true if value1 &amp;gt;= value2&lt;br /&gt;
;gt(value1, value2)&lt;br /&gt;
:returns true if value1 &amp;gt; value2&lt;br /&gt;
;isBetween(value, startValue, endValue)&lt;br /&gt;
:returns true if value &amp;gt;= startValue and value &amp;lt;= endValue&lt;br /&gt;
;isEmpty(value)&lt;br /&gt;
:returns true if the value is empty&lt;br /&gt;
;le(value1, value2)&lt;br /&gt;
:returns true if value1 &amp;lt;= value2&lt;br /&gt;
;lt(value1, value2)&lt;br /&gt;
:returns true if value1 &amp;lt; value2	&lt;br /&gt;
;not(value)&lt;br /&gt;
:returns the negative boolean value&lt;br /&gt;
;startsWith(string, substring)&lt;br /&gt;
:returns true if a string starts with a substring&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#Date|Date]] =&lt;br /&gt;
;date(value)&lt;br /&gt;
:returns the value as a date type&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#Date_and_Time|Datetime]] =&lt;br /&gt;
;addDays(dateTime, days)&lt;br /&gt;
:returns the value as a time type&lt;br /&gt;
;addHours(dateTime, hours)&lt;br /&gt;
:returns the value as a time type&lt;br /&gt;
;addMinutes(dateTime, minutes)&lt;br /&gt;
:returns the value as a time type&lt;br /&gt;
;addSeconds(dateTime, seconds)&lt;br /&gt;
:returns the value as a time type&lt;br /&gt;
;addWeeks(dateTime, weeks)&lt;br /&gt;
:returns the value as a time type&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#Number_.28Decimal.29|Decimal]] =&lt;br /&gt;
;avg(values)&lt;br /&gt;
:calculates the average of a series of numeric values&lt;br /&gt;
;ceil()&lt;br /&gt;
://todo&lt;br /&gt;
;ceiling(decimal or string)&lt;br /&gt;
:converts a decimal value to it's closest higher integer value&lt;br /&gt;
;celsius(temperature) &lt;br /&gt;
:converts temperature from Fahrenheit to Celsius&lt;br /&gt;
;decimal(integer or string)&lt;br /&gt;
:converts an integer value to it's decimal value&lt;br /&gt;
;dewPoint(temperature, relativeHumidity[, scale])&lt;br /&gt;
:returns the calculated dew point temperature&lt;br /&gt;
;fahrenheit([Sensor;temperature]) &lt;br /&gt;
:converts temperature from Celsius to Fahrenheit&lt;br /&gt;
;float()&lt;br /&gt;
://todo&lt;br /&gt;
;floor(decimal or string)&lt;br /&gt;
:converts a decimal value to it's closest lower integer value&lt;br /&gt;
;max(values)&lt;br /&gt;
:calculates the maximum of a series of numeric values&lt;br /&gt;
;median(values)&lt;br /&gt;
:returns the value in the middle of a sorted array&lt;br /&gt;
;min(values)&lt;br /&gt;
:calculates the minimum of a series of numeric values&lt;br /&gt;
;number()&lt;br /&gt;
://todo&lt;br /&gt;
;power(integer or decimal or string, power) &lt;br /&gt;
:converts a decimal value to it's power decimal value&lt;br /&gt;
;round(decimal or string, [precision]) &lt;br /&gt;
:converts a decimal value to it's rounded value&lt;br /&gt;
;sqr(integer or decimal or string) &lt;br /&gt;
:converts a decimal value to it's square decimal value&lt;br /&gt;
;sqrt(integer or decimal or string) &lt;br /&gt;
:converts a decimal value to it's square root decimal value&lt;br /&gt;
;stdev(values)&lt;br /&gt;
:calculates the standard deviation of a series of numeric values&lt;br /&gt;
;sum(values)&lt;br /&gt;
:calculates the sum of a series of numeric values&lt;br /&gt;
;variance(values)&lt;br /&gt;
:calculates the standard deviation of a series of numeric values&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#Dynamic|Dynamic]] =&lt;br /&gt;
;if(condition, valueIfTrue, valueIfFalse)&lt;br /&gt;
:evaluates a boolean and returns value1 if true, or value2 otherwise&lt;br /&gt;
;least(values)&lt;br /&gt;
:returns the value that is least found a series of numeric values&lt;br /&gt;
;most(values)&lt;br /&gt;
:returns the value that is most found a series of numeric values&lt;br /&gt;
;previousValue([device;attribute])&lt;br /&gt;
:returns the previous value of the attribute&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#Number_.28Integer.29|Integers]] =&lt;br /&gt;
;age([device;attribute])&lt;br /&gt;
:returns the number of milliseconds an attribute had the current value&lt;br /&gt;
;count(values)&lt;br /&gt;
:calculates the number of true/non-zero/non-empty items in a series of numeric values&lt;br /&gt;
;int()&lt;br /&gt;
://todo&lt;br /&gt;
;integer(decimal or string)&lt;br /&gt;
:converts a decimal value to it's integer value&lt;br /&gt;
;newer([device;attribute],[...], [device;attribute], threshold)&lt;br /&gt;
:returns the number of devices whose attribute had the current value for less than the specified number of milliseconds&lt;br /&gt;
;older([device;attribute],[...], [device;attribute], threshold)&lt;br /&gt;
:returns the number of devices whose attribute had the current value for more than the specified number of milliseconds&lt;br /&gt;
;previousAge([device;attribute])&lt;br /&gt;
:returns the number of milliseconds an attribute had the previous value&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#String|String]] =&lt;br /&gt;
;concat(string1, string2) &lt;br /&gt;
:returns two strings appended together&lt;br /&gt;
: Example: &amp;lt;code&amp;gt;concat(&amp;quot;hello &amp;quot;, &amp;quot;world&amp;quot;)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;concat(&amp;quot;hello&amp;quot;, &amp;quot; &amp;quot;, &amp;quot;world&amp;quot;)&amp;lt;/code&amp;gt; outputs &amp;lt;code&amp;gt;hello world&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;format() &lt;br /&gt;
://todo&lt;br /&gt;
;formatDuration(value[, friendly = false[, granularity = 's'[, showAdverbs = false]]])&lt;br /&gt;
:Usage:&lt;br /&gt;
::value is a number of milliseconds&lt;br /&gt;
::friendly = true/false (false &amp;gt;&amp;gt;&amp;gt; 0d 00:00:00.000, true &amp;gt;&amp;gt;&amp;gt; so many days, so many hours, etc)&lt;br /&gt;
::granularity = one of ms, s, m, h, d (smallest part displayed)&lt;br /&gt;
::showAdverbs = true/false, true adds the in .... or .... ago to friendly times&lt;br /&gt;
:returns a nicely formatted string of time &lt;br /&gt;
:eg: formatDuration(12029) - 00:00:12 | formatDuration(12029, true) - 12 seconds | formatDuration(12029, true, &amp;quot;m&amp;quot;) - 0 minutes | formatDuration(12029, true, &amp;quot;ms&amp;quot;, true) - in 12 seconds and 29 milliseconds&lt;br /&gt;
;left(string, count) &lt;br /&gt;
:returns a substring of a value&lt;br /&gt;
;lower(string)&lt;br /&gt;
:returns a lower case value of a string&lt;br /&gt;
;mid(string, start, count)&lt;br /&gt;
::returns a substring of a value&lt;br /&gt;
;replace(string, search, replace[, [..], search, replace])&lt;br /&gt;
:replaces a search text inside of a value&lt;br /&gt;
;right(string, count)&lt;br /&gt;
:returns a substring of a value&lt;br /&gt;
;sprintf(format, arguments)&lt;br /&gt;
:formats a series of values into a string&lt;br /&gt;
;string(anything)&lt;br /&gt;
:converts a value to it's string value&lt;br /&gt;
;substring(string, start, count)&lt;br /&gt;
:returns a substring of a value&lt;br /&gt;
;text()&lt;br /&gt;
://todo&lt;br /&gt;
;title(string)&lt;br /&gt;
:returns a title case value of a string&lt;br /&gt;
;upper(string)&lt;br /&gt;
:returns an upper case value of a string&lt;br /&gt;
&lt;br /&gt;
= [[Variable_data_types#Time|Time]] =&lt;br /&gt;
;time(value)&lt;br /&gt;
:returns the value as a time type&lt;br /&gt;
;addSeconds(dateTime, seconds)&lt;br /&gt;
:adds seconds to time, returns the value as a time type&lt;br /&gt;
;addMinutes(dateTime, minutes)&lt;br /&gt;
:adds minutes to time, returns the value as a time type&lt;br /&gt;
;addHours(dateTime, hours)&lt;br /&gt;
:adds hours to time, returns the value as a time type&lt;br /&gt;
;addDays(dateTime, days)&lt;br /&gt;
:adds days to time, returns the value as a time type&lt;br /&gt;
;addWeeks(dateTime, weeks)&lt;br /&gt;
:adds weeks to time, returns the value as a time type&lt;/div&gt;</summary>
		<author><name>Eibyer</name></author>	</entry>

	<entry>
		<id>https://wiki.webcore.co/index.php?title=webCoRE&amp;diff=178</id>
		<title>webCoRE</title>
		<link rel="alternate" type="text/html" href="https://wiki.webcore.co/index.php?title=webCoRE&amp;diff=178"/>
				<updated>2017-04-22T15:56:48Z</updated>
		
		<summary type="html">&lt;p&gt;Eibyer: /* Other Details */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{warning|webCoRE is currently in the [https://en.wikipedia.org/wiki/Software_release_life_cycle#Alpha Alpha phase of the software release lifecycle] which means it might be unstable. Crashes, bugs, and potentially data loss are expected. Anyone is welcome to try it out, but it should not be used for production purposes.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
The ''web Community's own Rule Engine'' (or for short, webCoRE) is a general rule engine for SmartThings. It works by allowing users to create scripts that are interpreted and executed by the SmartThings SmartApp, allowing for complex decisions. webCoRE is currently a work in progress. Please review the [[webCoRE todo]] list.&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
A few steps need to be completed before you can use webCoRE. First, webCoRE needs to be installed in your SmartThings account, then automations need to be configured. These are called [[Piston|pistons]] and will be detailed later. So let's start by installing webCoRE, please follow the 5 steps below.&lt;br /&gt;
&lt;br /&gt;
== Installing webCoRE ==&lt;br /&gt;
You must complete all of these steps.&lt;br /&gt;
&lt;br /&gt;
# [[GitHub Install]] or [[Manual Install]] of webCoRE source code into the SmartThings Cloud&lt;br /&gt;
# [[Enable webCoRE OAuth]] in the SmartThings cloud&lt;br /&gt;
# [[Install webCoRE]] in the SmartThings mobile app&lt;br /&gt;
# [[Enabling webCoRE dashboard]]&lt;br /&gt;
# [[Enable webCoRE on Another Device]]&lt;br /&gt;
&lt;br /&gt;
== Understanding the basics ==&lt;br /&gt;
webCoRE is comprised of the three main components listed below.&lt;br /&gt;
&lt;br /&gt;
=== The webCoRE child SmartApp (''webCoRE Piston'') ===&lt;br /&gt;
The webCoRE child SmartApp is also known as a [[Piston|piston]]. It is responsible for executing the automation script that the user creates and does the heavy lifting in the whole webCoRE ecosystem. It is directly managed by the webCoRE parent SmartApp, which can create, maintain, and delete a Piston.&lt;br /&gt;
&lt;br /&gt;
=== The webCoRE parent SmartApp (''webCoRE'') ===&lt;br /&gt;
The wabCoRE parent SmartApp is the component responsible for managing the child SmartApp instances and their relationship with the Dashboard. It is the middle man that allows adding new Pistons, maintaining them, or deleting them. It is also responsible with the security of the whole ecosystem, allowing password secured access from the Dashboard.&lt;br /&gt;
&lt;br /&gt;
=== The [[Dashboard|dashboard]] ===&lt;br /&gt;
The Dashboard is an [https://en.wikipedia.org/wiki/HTML HTML] interface for webCoRE that allows users to manage their webCoRE installation. It is the central hub to controlling webCoRE, allowing the user to create, modify, test, and delete Pistons.&lt;br /&gt;
&lt;br /&gt;
==Anatomy of a webCoRE Piston==&lt;br /&gt;
A piston is a script that contains a collection of statements, arranged so that the logic and flow of the piston perform tasks in a desired sequence. It is broken down into several sections, described below.&lt;br /&gt;
&lt;br /&gt;
===The ''settings'' section===&lt;br /&gt;
This section allows configuration of how certain aspects of the piston function. These settings control low-level functionality and can alter the way a piston reacts to events. [todo: describe the settings]&lt;br /&gt;
&lt;br /&gt;
===The ''define'' section===&lt;br /&gt;
A very powerful feature of webCoRE is the ability to use [[Variables|variables]]. Think of variables as temporary pockets where you can store information and are able to later retrieve and use this information for any purpose. Variables do just that, they store information that can be later used, either during the current piston run, or at a later time, when another event occurs.&lt;br /&gt;
&lt;br /&gt;
===Restrictions===&lt;br /&gt;
&lt;br /&gt;
===Execute Block===&lt;br /&gt;
&lt;br /&gt;
* [[If Block]] - Simple statement for checking conditions.&lt;br /&gt;
* [[Action]] - Construct for executing an action.&lt;br /&gt;
* [[Timer]] - &amp;lt;Todo&amp;gt;&lt;br /&gt;
* [[Switch]] - &amp;lt;Todo&amp;gt;&lt;br /&gt;
* [[For Loop]] - &amp;lt;Todo&amp;gt;&lt;br /&gt;
* [[For Each Loop]] - &amp;lt;Todo&amp;gt;&lt;br /&gt;
* [[While Loop]] - &amp;lt;Todo&amp;gt;&lt;br /&gt;
* [[Repeat]] - &amp;lt;Todo&amp;gt;&lt;br /&gt;
* [[Break]] - &amp;lt;Todo&amp;gt;&lt;br /&gt;
* [[Exit]] - &amp;lt;Todo&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Other Details===&lt;br /&gt;
# [[webCore Logging]]&lt;br /&gt;
# [[Functions]]&lt;br /&gt;
# [[Task Execution Policy]]&lt;br /&gt;
# [[Task Cancellation Policy]]&lt;br /&gt;
# [[WebCoRE_todo|Dev's WebCoRE To Do List]]&lt;br /&gt;
&lt;br /&gt;
== Creating your first piston ==&lt;br /&gt;
&lt;br /&gt;
Once you finished the installation steps above, let's go ahead and create the first piston, the famous [[Hello World!|Hello World]].&lt;/div&gt;</summary>
		<author><name>Eibyer</name></author>	</entry>

	<entry>
		<id>https://wiki.webcore.co/index.php?title=webCoRE&amp;diff=168</id>
		<title>webCoRE</title>
		<link rel="alternate" type="text/html" href="https://wiki.webcore.co/index.php?title=webCoRE&amp;diff=168"/>
				<updated>2017-04-20T15:24:44Z</updated>
		
		<summary type="html">&lt;p&gt;Eibyer: /* Other Details */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{warning|webCoRE is currently in the [https://en.wikipedia.org/wiki/Software_release_life_cycle#Alpha Alpha phase of the software release lifecycle] which means it might be unstable. Crashes, bugs, and potentially data loss are expected. Anyone is welcome to try it out, but it should not be used for production purposes.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
The ''web Community's own Rule Engine'' (or for short, webCoRE) is a general rule engine for SmartThings. It works by allowing users to create scripts that are interpreted and executed by the SmartThings SmartApp, allowing for complex decisions. webCoRE is currently a work in progress. Please review the [[webCoRE todo]] list.&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
A few steps need to be completed before you can use webCoRE. First, webCoRE needs to be installed in your SmartThings account, then automations need to be configured. These are called [[Piston|pistons]] and will be detailed later. So let's start by installing webCoRE, please follow the 5 steps below.&lt;br /&gt;
&lt;br /&gt;
== Installing webCoRE ==&lt;br /&gt;
You must complete all of these steps.&lt;br /&gt;
&lt;br /&gt;
# [[GitHub Install]] or [[Manual Install]] of webCoRE source code into the SmartThings Cloud&lt;br /&gt;
# [[Enable webCoRE OAuth]] in the SmartThings cloud&lt;br /&gt;
# [[Install webCoRE]] in the SmartThings mobile app&lt;br /&gt;
# [[Enabling webCoRE dashboard]]&lt;br /&gt;
# [[Enable webCoRE on Another Device]]&lt;br /&gt;
&lt;br /&gt;
== Understanding the basics ==&lt;br /&gt;
webCoRE is comprised of the three main components listed below.&lt;br /&gt;
&lt;br /&gt;
=== The webCoRE child SmartApp (''webCoRE Piston'') ===&lt;br /&gt;
The webCoRE child SmartApp is also known as a [[Piston|piston]]. It is responsible for executing the automation script that the user creates and does the heavy lifting in the whole webCoRE ecosystem. It is directly managed by the webCoRE parent SmartApp, which can create, maintain, and delete a Piston.&lt;br /&gt;
&lt;br /&gt;
=== The webCoRE parent SmartApp (''webCoRE'') ===&lt;br /&gt;
The wabCoRE parent SmartApp is the component responsible for managing the child SmartApp instances and their relationship with the Dashboard. It is the middle man that allows adding new Pistons, maintaining them, or deleting them. It is also responsible with the security of the whole ecosystem, allowing password secured access from the Dashboard.&lt;br /&gt;
&lt;br /&gt;
=== The [[Dashboard|dashboard]] ===&lt;br /&gt;
The Dashboard is an [https://en.wikipedia.org/wiki/HTML HTML] interface for webCoRE that allows users to manage their webCoRE installation. It is the central hub to controlling webCoRE, allowing the user to create, modify, test, and delete Pistons.&lt;br /&gt;
&lt;br /&gt;
==Anatomy of a webCoRE Piston==&lt;br /&gt;
A piston is a script that contains a collection of statements, arranged so that the logic and flow of the piston perform tasks in a desired sequence. It is broken down into several sections, described below.&lt;br /&gt;
&lt;br /&gt;
===The ''settings'' section===&lt;br /&gt;
This section allows configuration of how certain aspects of the piston function. These settings control low-level functionality and can alter the way a piston reacts to events. [todo: describe the settings]&lt;br /&gt;
&lt;br /&gt;
===The ''define'' section===&lt;br /&gt;
A very powerful feature of webCoRE is the ability to use [[Variables|variables]]. Think of variables as temporary pockets where you can store information and are able to later retrieve and use this information for any purpose. Variables do just that, they store information that can be later used, either during the current piston run, or at a later time, when another event occurs.&lt;br /&gt;
&lt;br /&gt;
===Restrictions===&lt;br /&gt;
&lt;br /&gt;
===Execute Block===&lt;br /&gt;
&lt;br /&gt;
* [[If Block]] - Simple statement for checking conditions.&lt;br /&gt;
* [[Action]] - Construct for executing an action.&lt;br /&gt;
* [[Timer]] - &amp;lt;Todo&amp;gt;&lt;br /&gt;
* [[Switch]] - &amp;lt;Todo&amp;gt;&lt;br /&gt;
* [[For Loop]] - &amp;lt;Todo&amp;gt;&lt;br /&gt;
* [[For Each Loop]] - &amp;lt;Todo&amp;gt;&lt;br /&gt;
* [[While Loop]] - &amp;lt;Todo&amp;gt;&lt;br /&gt;
* [[Repeat]] - &amp;lt;Todo&amp;gt;&lt;br /&gt;
* [[Break]] - &amp;lt;Todo&amp;gt;&lt;br /&gt;
* [[Exit]] - &amp;lt;Todo&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Other Details===&lt;br /&gt;
# [[webCore Logging]]&lt;br /&gt;
# [[Functions]]&lt;br /&gt;
# [[Task Execution Policy]]&lt;br /&gt;
# [[Task Cancellation Policy]]&lt;br /&gt;
&lt;br /&gt;
== Creating your first piston ==&lt;br /&gt;
&lt;br /&gt;
Once you finished the installation steps above, let's go ahead and create the first piston, the famous [[Hello World!|Hello World]].&lt;/div&gt;</summary>
		<author><name>Eibyer</name></author>	</entry>

	<entry>
		<id>https://wiki.webcore.co/index.php?title=webCoRE&amp;diff=167</id>
		<title>webCoRE</title>
		<link rel="alternate" type="text/html" href="https://wiki.webcore.co/index.php?title=webCoRE&amp;diff=167"/>
				<updated>2017-04-20T15:22:38Z</updated>
		
		<summary type="html">&lt;p&gt;Eibyer: /* Other Details */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{warning|webCoRE is currently in the [https://en.wikipedia.org/wiki/Software_release_life_cycle#Alpha Alpha phase of the software release lifecycle] which means it might be unstable. Crashes, bugs, and potentially data loss are expected. Anyone is welcome to try it out, but it should not be used for production purposes.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
The ''web Community's own Rule Engine'' (or for short, webCoRE) is a general rule engine for SmartThings. It works by allowing users to create scripts that are interpreted and executed by the SmartThings SmartApp, allowing for complex decisions. webCoRE is currently a work in progress. Please review the [[webCoRE todo]] list.&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
A few steps need to be completed before you can use webCoRE. First, webCoRE needs to be installed in your SmartThings account, then automations need to be configured. These are called [[Piston|pistons]] and will be detailed later. So let's start by installing webCoRE, please follow the 5 steps below.&lt;br /&gt;
&lt;br /&gt;
== Installing webCoRE ==&lt;br /&gt;
You must complete all of these steps.&lt;br /&gt;
&lt;br /&gt;
# [[GitHub Install]] or [[Manual Install]] of webCoRE source code into the SmartThings Cloud&lt;br /&gt;
# [[Enable webCoRE OAuth]] in the SmartThings cloud&lt;br /&gt;
# [[Install webCoRE]] in the SmartThings mobile app&lt;br /&gt;
# [[Enabling webCoRE dashboard]]&lt;br /&gt;
# [[Enable webCoRE on Another Device]]&lt;br /&gt;
&lt;br /&gt;
== Understanding the basics ==&lt;br /&gt;
webCoRE is comprised of the three main components listed below.&lt;br /&gt;
&lt;br /&gt;
=== The webCoRE child SmartApp (''webCoRE Piston'') ===&lt;br /&gt;
The webCoRE child SmartApp is also known as a [[Piston|piston]]. It is responsible for executing the automation script that the user creates and does the heavy lifting in the whole webCoRE ecosystem. It is directly managed by the webCoRE parent SmartApp, which can create, maintain, and delete a Piston.&lt;br /&gt;
&lt;br /&gt;
=== The webCoRE parent SmartApp (''webCoRE'') ===&lt;br /&gt;
The wabCoRE parent SmartApp is the component responsible for managing the child SmartApp instances and their relationship with the Dashboard. It is the middle man that allows adding new Pistons, maintaining them, or deleting them. It is also responsible with the security of the whole ecosystem, allowing password secured access from the Dashboard.&lt;br /&gt;
&lt;br /&gt;
=== The [[Dashboard|dashboard]] ===&lt;br /&gt;
The Dashboard is an [https://en.wikipedia.org/wiki/HTML HTML] interface for webCoRE that allows users to manage their webCoRE installation. It is the central hub to controlling webCoRE, allowing the user to create, modify, test, and delete Pistons.&lt;br /&gt;
&lt;br /&gt;
==Anatomy of a webCoRE Piston==&lt;br /&gt;
A piston is a script that contains a collection of statements, arranged so that the logic and flow of the piston perform tasks in a desired sequence. It is broken down into several sections, described below.&lt;br /&gt;
&lt;br /&gt;
===The ''settings'' section===&lt;br /&gt;
This section allows configuration of how certain aspects of the piston function. These settings control low-level functionality and can alter the way a piston reacts to events. [todo: describe the settings]&lt;br /&gt;
&lt;br /&gt;
===The ''define'' section===&lt;br /&gt;
A very powerful feature of webCoRE is the ability to use [[Variables|variables]]. Think of variables as temporary pockets where you can store information and are able to later retrieve and use this information for any purpose. Variables do just that, they store information that can be later used, either during the current piston run, or at a later time, when another event occurs.&lt;br /&gt;
&lt;br /&gt;
===Restrictions===&lt;br /&gt;
&lt;br /&gt;
===Execute Block===&lt;br /&gt;
&lt;br /&gt;
* [[If Block]] - Simple statement for checking conditions.&lt;br /&gt;
* [[Action]] - Construct for executing an action.&lt;br /&gt;
* [[Timer]] - &amp;lt;Todo&amp;gt;&lt;br /&gt;
* [[Switch]] - &amp;lt;Todo&amp;gt;&lt;br /&gt;
* [[For Loop]] - &amp;lt;Todo&amp;gt;&lt;br /&gt;
* [[For Each Loop]] - &amp;lt;Todo&amp;gt;&lt;br /&gt;
* [[While Loop]] - &amp;lt;Todo&amp;gt;&lt;br /&gt;
* [[Repeat]] - &amp;lt;Todo&amp;gt;&lt;br /&gt;
* [[Break]] - &amp;lt;Todo&amp;gt;&lt;br /&gt;
* [[Exit]] - &amp;lt;Todo&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Other Details===&lt;br /&gt;
# [[webCore Logging]]&lt;br /&gt;
# [[Functions]]&lt;br /&gt;
# [[Task Execution Policy]]&lt;br /&gt;
&lt;br /&gt;
== Creating your first piston ==&lt;br /&gt;
&lt;br /&gt;
Once you finished the installation steps above, let's go ahead and create the first piston, the famous [[Hello World!|Hello World]].&lt;/div&gt;</summary>
		<author><name>Eibyer</name></author>	</entry>

	<entry>
		<id>https://wiki.webcore.co/index.php?title=Functions&amp;diff=159</id>
		<title>Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.webcore.co/index.php?title=Functions&amp;diff=159"/>
				<updated>2017-04-17T18:44:44Z</updated>
		
		<summary type="html">&lt;p&gt;Eibyer: /* Time */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Boolean =&lt;br /&gt;
;bool()&lt;br /&gt;
://todo&lt;br /&gt;
;boolean(anything)&lt;br /&gt;
:converts a value to it's boolean value&lt;br /&gt;
;contains(string, substring)&lt;br /&gt;
:returns true if a string contains a substring&lt;br /&gt;
;endsWith(string, substring)&lt;br /&gt;
:returns true if a string ends with a substring&lt;br /&gt;
;eq(value1, value2)&lt;br /&gt;
:returns true if two values are equal&lt;br /&gt;
;ge(value1, value2)&lt;br /&gt;
:returns true if value1 &amp;gt;= value2&lt;br /&gt;
;gt(value1, value2)&lt;br /&gt;
:returns true if value1 &amp;gt; value2&lt;br /&gt;
;isBetween(value, startValue, endValue)&lt;br /&gt;
:returns true if value &amp;gt;= startValue and value &amp;lt;= endValue&lt;br /&gt;
;isEmpty(value)&lt;br /&gt;
:returns true if the value is empty&lt;br /&gt;
;le(value1, value2)&lt;br /&gt;
:returns true if value1 &amp;lt;= value2&lt;br /&gt;
;lt(value1, value2)&lt;br /&gt;
:returns true if value1 &amp;lt; value2	&lt;br /&gt;
;not(value)&lt;br /&gt;
:returns the negative boolean value&lt;br /&gt;
;startsWith(string, substring)&lt;br /&gt;
:returns true if a string starts with a substring&lt;br /&gt;
&lt;br /&gt;
= Date =&lt;br /&gt;
;date(value)&lt;br /&gt;
:returns the value as a date type&lt;br /&gt;
&lt;br /&gt;
= datetime =&lt;br /&gt;
;addDays(dateTime, days)&lt;br /&gt;
:returns the value as a time type&lt;br /&gt;
;addHours(dateTime, hours)&lt;br /&gt;
:returns the value as a time type&lt;br /&gt;
;addMinutes(dateTime, minutes)&lt;br /&gt;
:returns the value as a time type&lt;br /&gt;
;addSeconds(dateTime, seconds)&lt;br /&gt;
:returns the value as a time type&lt;br /&gt;
;addWeeks(dateTime, weeks)&lt;br /&gt;
:returns the value as a time type&lt;br /&gt;
&lt;br /&gt;
= Decimal =&lt;br /&gt;
;avg(values)&lt;br /&gt;
:calculates the average of a series of numeric values&lt;br /&gt;
;ceil()&lt;br /&gt;
://todo&lt;br /&gt;
;ceiling(decimal or string)&lt;br /&gt;
:converts a decimal value to it's closest higher integer value&lt;br /&gt;
;celsius(temperature) &lt;br /&gt;
:converts temperature from Fahrenheit to Celsius&lt;br /&gt;
;decimal(integer or string)&lt;br /&gt;
:converts an integer value to it's decimal value&lt;br /&gt;
;dewPoint(temperature, relativeHumidity[, scale])&lt;br /&gt;
:returns the calculated dew point temperature&lt;br /&gt;
;fahrenheit([Sensor;temperature]) &lt;br /&gt;
:converts temperature from Celsius to Fahrenheit&lt;br /&gt;
;float()&lt;br /&gt;
://todo&lt;br /&gt;
;floor(decimal or string)&lt;br /&gt;
:converts a decimal value to it's closest lower integer value&lt;br /&gt;
;max(values)&lt;br /&gt;
:calculates the maximum of a series of numeric values&lt;br /&gt;
;median(values)&lt;br /&gt;
:returns the value in the middle of a sorted array&lt;br /&gt;
;min(values)&lt;br /&gt;
:calculates the minimum of a series of numeric values&lt;br /&gt;
;number()&lt;br /&gt;
://todo&lt;br /&gt;
;power(integer or decimal or string, power) &lt;br /&gt;
:converts a decimal value to it's power decimal value&lt;br /&gt;
;round(decimal or string, [precision]) &lt;br /&gt;
:converts a decimal value to it's rounded value&lt;br /&gt;
;sqr(integer or decimal or string) &lt;br /&gt;
:converts a decimal value to it's square decimal value&lt;br /&gt;
;sqrt(integer or decimal or string) &lt;br /&gt;
:converts a decimal value to it's square root decimal value&lt;br /&gt;
;stdev(values)&lt;br /&gt;
:calculates the standard deviation of a series of numeric values&lt;br /&gt;
;sum(values)&lt;br /&gt;
:calculates the sum of a series of numeric values&lt;br /&gt;
;variance(values)&lt;br /&gt;
:calculates the standard deviation of a series of numeric values&lt;br /&gt;
&lt;br /&gt;
= Dynamic =&lt;br /&gt;
;if(condition, valueIfTrue, valueIfFalse)&lt;br /&gt;
:evaluates a boolean and returns value1 if true, or value2 otherwise&lt;br /&gt;
;least(values)&lt;br /&gt;
:returns the value that is least found a series of numeric values&lt;br /&gt;
;most(values)&lt;br /&gt;
:returns the value that is most found a series of numeric values&lt;br /&gt;
;previousValue([device;attribute])&lt;br /&gt;
:returns the previous value of the attribute&lt;br /&gt;
&lt;br /&gt;
= Integers =&lt;br /&gt;
;age([device;attribute])&lt;br /&gt;
:returns the number of milliseconds an attribute had the current value&lt;br /&gt;
;count(values)&lt;br /&gt;
:calculates the number of true/non-zero/non-empty items in a series of numeric values&lt;br /&gt;
;int()&lt;br /&gt;
://todo&lt;br /&gt;
;integer(decimal or string)&lt;br /&gt;
:converts a decimal value to it's integer value&lt;br /&gt;
;newer([device;attribute],[...], [device;attribute], threshold)&lt;br /&gt;
:returns the number of devices whose attribute had the current value for less than the specified number of milliseconds&lt;br /&gt;
;older([device;attribute],[...], [device;attribute], threshold)&lt;br /&gt;
:returns the number of devices whose attribute had the current value for more than the specified number of milliseconds&lt;br /&gt;
;previousAge([device;attribute])&lt;br /&gt;
:returns the number of milliseconds an attribute had the previous value&lt;br /&gt;
&lt;br /&gt;
= String =&lt;br /&gt;
;concat(string1, string2) &lt;br /&gt;
:returns two strings appended together&lt;br /&gt;
;format() &lt;br /&gt;
://todo&lt;br /&gt;
;left(string, count) &lt;br /&gt;
:returns a substring of a value&lt;br /&gt;
;lower(string)&lt;br /&gt;
:returns a lower case value of a string&lt;br /&gt;
;mid(string, start, count)&lt;br /&gt;
::returns a substring of a value&lt;br /&gt;
;replace(string, search, replace[, [..], search, replace])&lt;br /&gt;
:replaces a search text inside of a value&lt;br /&gt;
;right(string, count)&lt;br /&gt;
:returns a substring of a value&lt;br /&gt;
;sprintf(format, arguments)&lt;br /&gt;
:formats a series of values into a string&lt;br /&gt;
;string(anything)&lt;br /&gt;
:converts a value to it's string value&lt;br /&gt;
;substring(string, start, count)&lt;br /&gt;
:returns a substring of a value&lt;br /&gt;
;text()&lt;br /&gt;
://todo&lt;br /&gt;
;title(string)&lt;br /&gt;
:returns a title case value of a string&lt;br /&gt;
;upper(string)&lt;br /&gt;
:returns an upper case value of a string&lt;br /&gt;
&lt;br /&gt;
= Time =&lt;br /&gt;
;time(value)&lt;br /&gt;
:returns the value as a time type&lt;br /&gt;
;addSeconds(dateTime, seconds)&lt;br /&gt;
:adds seconds to time, returns the value as a time type&lt;br /&gt;
;addMinutes(dateTime, minutes)&lt;br /&gt;
:adds minutes to time, returns the value as a time type&lt;br /&gt;
;addHours(dateTime, hours)&lt;br /&gt;
:adds hours to time, returns the value as a time type&lt;br /&gt;
;addDays(dateTime, days)&lt;br /&gt;
:adds days to time, returns the value as a time type&lt;br /&gt;
;addWeeks(dateTime, weeks)&lt;br /&gt;
:adds weeks to time, returns the value as a time type&lt;/div&gt;</summary>
		<author><name>Eibyer</name></author>	</entry>

	</feed>