Connected Devices/Projects/Project Link/Taxonomy: Difference between revisions

→‎Recipe: Documented
(→‎Recipe: Documented)
Line 115: Line 115:


== Recipe ==
== Recipe ==
A recipe is a set of *rules*.
Each rule is triggered when *all* its *conditions* are true. A condition is specified by a set of channels to watch and a range of values that make it true - the condition becomes true once *any* of the channels it watches provides a value that fits the range.
Once a rule is triggered, it *executes*. An execution sends one value to a set of channels.
Once a rule is triggered, it won't be triggered again until at least one of the conditions has become false and true again.
Format:
  {
    rules: one or more of {
      conditions: one or more of {
        source: one or more of Selectors (see section on channels)
        kind: see [http://fxbox.github.io/taxonomy/doc/foxbox_taxonomy/services/enum.ChannelKind.html#json documentation of channel kinds]
        range: see [http://fxbox.github.io/taxonomy/doc/foxbox_taxonomy/values/enum.Range.html#json documentation of ranges]
        duration: (optional) floating point number of seconds
      }
      execute: one or more of {
        destination: one or more Selectors (see section on channels)
        kind: see [http://fxbox.github.io/taxonomy/doc/foxbox_taxonomy/services/enum.ChannelKind.html#json documentation of channel kinds]
        value: see [http://fxbox.github.io/taxonomy/doc/foxbox_taxonomy/values/enum.Value.html#json documentation of values]
      }
    }
  }
* Send Recipe
* Send Recipe
To Be Documented: Use channel selector {"kind": "AddThinkerbellRule"}.
* List available Recipes
* List available Recipes
To Be Documented: Use service selector {"getters": "ThinkerbellRuleSource"}.


== WebPush ==
== WebPush ==
184

edits