pimatic
  • Sign in

Documentation
pimatic

  • Home
  • Getting Started Guide
  • Usage
  • Installing Plugins
  • Rules
  • Functions for Variables & Rules
  • subString()
  • date()
  • hexString()
  • abs()
  • log()
  • min()
  • max()
  • sign()
  • sqrt()
  • pow()
  • REST API and Dummy Devices
  • Advanced Configuration
  • GUIs
  • Development
  • IoT Temp
  • Mariela_DHT22
  •   Create a new Memo
 
  • Headline 1
  • Headline 2
  • Headline 3
  • Headline 4
  • Text
  • Preformatted / Code

Enter link target

Search for a memo

Search results in Documentation
  • No matching pages found
Remove LinkSet Link
  •  Underline
  •  Strikethrough
  •  Superscript
  •  Subscript
  •  Text-color
  •  Backgroundcolor
  •  Insert table
  •  Insert file
  •  Insert Comment
  •  Insert table of content
  •  Insert custom type element
 
  • Enable spellcheck
  • Language: English (United States)
 
  •  Show Authors
  •  Hide Paragraphs
  PDF 
  • Word Document (.docx)
  • Open Document Format (.odt)
  • HTML Document (.html)
  • Markdown (.md)

Functions for Variables & Rules

Contents
  1. String Expressions
  2. String Functions
  3. Numeric Expressions
  4. Numeric Functions

String Expressions

String Expressions can be used for variables of type “Expression” and as parameters for some rule predicates and actions.
String Expressions may be one of the following:

  • variable references, e.g., $someVar
  • plain string, e.g., "ABC"
  • function calls, e.g., subString($someVar, "BB")
  • string with embedded expressions, "AA$someVar"

In some cases it is required to surround an embedded expression with curly brackets to get parsed properly, e.g. "{$someVar}BB". This way, it is also possible to embed function calls, e.g., "AA{subString($someText, "BB")}"

String Functions

  • date()
  • hexString()
  • subString()

Numeric Expressions

Numeric Expressions can be used for variables of type "Expression", and as parameters to functions, rule predicates & actions. Similar to String Expressions it may contain of the following:

  • variable references, e.g., $someVar, where the variable contains a number or a number string
  • plain string representing a number, e.g., "3"
  • numbers, e.g., 3
  • function calls which return numbers or number strings, e.g., abs($someVar)
  • number strings with embedded expressions, "3$someVar"

Numeric Functions

  • abs()
  • acos()
  • avg()
  • cos()
  • log()
  • min()
  • max()
  • pow()
  • random()
  • round()
  • roundToNearest()
  • sign()
  • sqrt()
  • trunc()

Subpages

  • subString()
  • date()
  • hexString()
  • abs()
  • log()
  • min()
  • max()
  • sign()
  • sqrt()
  • pow()
Last modified 1 year ago by mwittig. 
Authors:
mw
Content © 2021 pimatic | Teamemo Legal notice
Built with Teamemo