Skip to end of metadata
Go to start of metadata

Typical scripting recipes you may want to know. See Build-in Objects And Functions for more details.

 

Fire event


Scenario:

  1. you have an object with "temperatureChanged"(float) event 
  2. you want to fire it when a method, property, or trigger is executed

Recipe:

Use "fireEvent" function provided by "context" object:

 

Call other property/method in current Thing


Use "context" object:

 

Call property/method in other Thing


Use "context" object:

Send email


Use "send" function provided by "smtp" object:

 

Get value from a REST service


Use "get" function provided by "http" object:

 

Transform object into JSON


TODO

Transform JSON into object


TODO



 

 

 

  • No labels