Version 2.12 (2017-04-11)
Features
Rule improvements
We have added more flexibility and options when configuring rules.
Multiple conditions for a rule
You can now add multiple conditions for a rule to trigger, e.g.
- “When the engine power of my pump is above 80% AND water flow is below 10%, notify me” –> something is probably wrong since almost no water is pumped but power high.
- “When temperature in my fridge goes above 8 oC and the fridge door is closed, notify me” –> Fridge might be broken.
The overall rule conditions are evaluated if at least one of the resources selected in the resource dropdown(s) is included in an incoming observation. For selected resources that are not part of the incoming observation, the criteria will be evaluated using latest known value stored for that resource in the thing shadow.
To add multiple conditions, click “+ CONDITION” in rule edit.
Data from a Thing or an Observation can be used in rule conditions and rule actions
In this release, it is possible to include data from the Thing and Observation that triggered the rule in the rule conditions and rule actions. This enables e.g. comparing previous observation for the Thing with the current observation, like “When observed temperature is not equal to the previous temperature measurement, notify me”.
In addition to the substitutions currently available in the rule action (e.g. ${rule.name}
), the following data is now available:
${thing.*}
, e.g. thing.thingName, thing.thingType, thing.domain – context data for the Thing.${thing.state.<resource name>}
– the value of the resource in the thing shadow before the data that triggered the rule is saved.${thing.metadata.<resource name>}
– the timestamp of the${thing.state.<resource name>}
value.${observation.<resource name>}
– the value of the resource in the observation that triggered the rule.${timestamp}
– the timestamp of the observation that triggered the rule.${now}
– the timestamp at rule evaluation.
In rule edit in App Board, there is a help section detailing how to use data from the Thing or Observation.
Support for calculations in rule conditions, rule actions, and dynamic widget
Now you can add calculations and logical expressions when configuring:
- Rule conditions
- Rule actions
- Dynamic widget
For example, mathematical expressions to enable conditions like “When temperature is above previous temperature *1,2 then notify me” can be used.
In rule edit in App Board, there is a help section detailing available expressions and how to use them.
Support for observation timestamp in rule conditions
In the resource dropdown available when configuring a rule condition, an entry for “Observation timestamp” (corresponding to the ${timestamp} mentioned above) can be used e.g. to evaluate how much time has passed since last observation.
Added “Not equals” operator for rule
A new operator, “Not equals”, was added to the available options for the rule criteria.
Support for calculation formulas in Dynamic widget
As mentioned above, the same formulas supported in rules are possible to use in the dynamic widget. Just add the calculations when editing the dynamic widget and the result will be shown and updated in real time as observations and calculations are updated.
Raw observations available in widgets and Analyze
Visualization of raw observations is now available in time series and table widgets and in Analyze.
To facilitate easy readability and relevant amount of data points in the widgets and charts, observations are per default visualized as aggregations. This means that the number of data points visualized is automatically adjusted to both available data points and selected observation period.
By enabling raw data visualization you will see raw data instead, meaning all recorded data points for the selected observation period will be shown.
For widgets (time series and table) you select visualization in widget edit mode in the new drop down “Aggregate observations”.
- Selecting “No” means all (raw) observations will be displayed. The 100 most recent observations will be displayed, if available.
In Analyze you find the selection drop down next to the observation period picker
- Selecting “No” means all (raw) observations will be displayed. The 100 most recent observations will be displayed, if available.
Please note that there is up to 5 minutes delay before data is available for visualizations in the time series and table widgets, regardless of aggregations or not.
Value and Gauge widget always displays the real time values (or last known value).
Minor improvements and corrections
Numerous minor enhancements and bug fixes are delivered by the new release, including:
- Improved user experience if user session expires
- Solved issue with LoRa things not being able to join under certain conditions