Skip to content

Origin Source

Name Input Params Return Data Description
resiot_startfrom Empty String Get the LogData source origin
resiot_getparam Integer String Get the parameter with key Index passed by the resiot_runscene(...) function
resiot_getparamcount Empty Integer Get the number of params passed by the resiot_runscene(...) function
resiot_trigger_actionname Empty String Get the name of the action that turned on the Trigger
resiot_trigger_getparam String String Get the value of the parameter called VName
resiot_comm_getparam String String Get the value of the Payload with the value VName

resiot_startfrom()

Get the LogData source origin.
Example
LDSourceOrigin = resiot_startfrom()
Input Parameters
 - * There are no parameters in Input.
Returns
 - LDSourceOrigin (String): * The function returns the LogData source origin as String.

LDSourceOrigin = resiot_startfrom()
resiot_debug(LDSourceOrigin)
-- 
-- Possible Results:
-- 
-- LDSourceOrigin = "Manual"
-- LDSourceOrigin = "Scene"
-- LDSourceOrigin = "Trigger"
-- LDSourceOrigin = "Payload"
-- LDSourceOrigin = "Api"
-- LDSourceOrigin = "Connector"
-- LDSourceOrigin = "Visual"
-- 

Return to index


resiot_getparam (Integer)

Get the parameter with key Index passed by the resiot_runscene(...) function.
Example
Value = resiot_getparam(Index)
Input Parameters
 - Index (Integer): * The index of the parameter.
Returns
 - Value (String): * The function returns the parameter with the key Index passed by the resiot_runscene(...) function.

-- 
-- Scene started by resiot_runscene(HexID, "Index 0", "Index 1", "Index 2")
-- 
Index = 1                       -- The index of the parameter
Value = resiot_getparam(Index)
resiot_debug(Value)
-- 
-- In This case:
-- 
-- Value = "Index 1"
-- 

Return to index


resiot_getparamcount()

Get the number of params passed by the resiot_runscene(...) function.
Example
Count = resiot_getparamcount()
Input Parameters
 - * There are no parameters in Input.
Returns
 - Count (Integer): * The function returns the number of params passed by the resiot_runscene(...) function.

-- 
-- Scene started by resiot_runscene(HexID, "Index 0", "Index 1", "Index 2")
-- 
Count = resiot_getparamcount()
resiot_debug(Count)
-- 
-- In This case:
-- 
-- Count = 3
-- 

Return to index


resiot_trigger_actionname()

Get the name of the action that turned on the Trigger.
Example
ActionName = resiot_trigger_actionname()
Input Parameters
 - * There are no parameters in Input.
Returns
 - ActionName (String): * The function returns the name of the action that turned on the Trigger.

ActionName = resiot_trigger_actionname()
resiot_debug(ActionName)
-- 
-- Result Example:
-- 
-- ActionName = "comm_rx"
-- 

Return to index


resiot_trigger_getparam(String)

Get the value of the parameter called VName.
Example
Value = resiot_trigger_getparam(VName)
Input Parameters
 - VName (String): * The name of the designed parameter.
Returns
 - Value (String): * The function returns the value of the parameter that match with the VName.

VName = "Temperature"               -- The name of the designed parameter
Value = resiot_trigger_getparam(VName)
resiot_debug(Value)
-- 
-- Result Example:
-- 
-- Value = "12°C"
-- 

Return to index


resiot_comm_getparam(String)

Get the value from the list of parameters with the index VName.
Example
Value = resiot_comm_getparam (VName)
Input Parameters
 - VName (String): * The name of the index.
Returns
 - Value (String): * The function returns the value of the parameter that match with the VName.

-- 
-- The List of possible values are:
-- 
-- appeui: the node AppEUI
-- deveui: the node DevEUI
-- port: the port of the communication
-- payload: the message sent
-- gateways: it represents the series of the gateways which the communication passed through divided by a ","
-- topic: the topic that triggered a smart scene( in case of a smart scene launching a new scene, if the smart scene condition was verified by a connector having a topic)
-- body: the body that triggered a smart scene( in case of a smart scene launching a new scene)
-- 
VName = "payload"       -- The name of the index
Value = resiot_comm_getparam(VName)
resiot_debug(Value)
-- 
-- Result Example:
-- 
-- Value = "4D657373616765"
-- 

Return to index