Skip to content

Calendar

Name Input Params Return Data Description
resiot_calgetvalue String, Integer, Integer, String Float, String, String, Integer, Integer, String, Integer, String With an input date (Date, Hour, Minute) and a preselected calendar (sort by Hexadecimal Id), get the nearest data relate to that date
resiot_calgetvaluefromtag String, Integer, Integer, String Float, String, String, Integer, Integer, String, Integer, String With an input date (Date, Hour, Minute) and a preselected calendar (sort by Tag), get the nearest data relate to that date
resiot_calgetlistobjcount String Integer, Integer, String Get the number of all objects in the Objects list
resiot_calgetobjfromindex String, Integer Integer, String, String, Integer, String Get the object with a determined index from the Object list (The first object has index 0)

resiot_calgetvalue (String, Integer, Integer, String)

With an input date (Date, Hour, Minute) and a preselected calendar (sort by Hexadecimal Id), get the nearest data relate to that date.
Example
Value, Name, Tag, Hour, Minute, Day, ErrorCode, ErrorDescription = resiot_calgetvalue(HexID, InputHour, InputMinute, InputDate)
Input Parameters
 - HexID (String): * The Hexadecimal ID of the designed calendar.
 - InputHour (Integer): * The input hour.

 - InputMinute (Integer): * The input minute.
 - InputDate (String): * The desired date. (20-03-2015 Format)

Returns
 - Value (Float): * The respective value.
 - Name (String): * The respective name.

 - Tag (String): * The respective tag.
 - Hour (Integer): * The correct hours of the output data.

 - Minute (Integer): * The correct minutes of the output data.
 - Day (String): * The correct day of the output data. ("sunday","monday"... Format)

 - ErrorCode (Integer): * The type of the error.
 - ErrorDescription (String): * The description of the error.

HexID = "63616c3230"        -- The Hexadecimal ID of the designed calendar
InputHour = 5               -- The input hour
InputMinute = 20            -- The input minute
InputDate = "31/01/2020"    -- The desired date. (20-03-2015 Format)
Value, Name, Tag, Hour, Minute, Day, ErrorCode, ErrorDescription = resiot_calgetvalue(HexID, InputHour, InputMinute, InputDate)
resiot_debug(Value)
resiot_debug(Name)
resiot_debug(Tag)
resiot_debug(Hour)
resiot_debug(Minute)
resiot_debug(Day)
resiot_debug(ErrorCode)
resiot_debug(ErrorDescription)
-- 
-- Result Example:
-- 
-- Value = 500
-- Name = "Lux"
-- Tag = "LuxTag"
-- Hour = 10
-- Minute = 00
-- Day = "monday"
-- 
-- If there aren't any errors:
-- 
-- ErrorCode = -1
-- ErrorDescription = ""
-- 
-- Else:
-- 
-- ErrorCode = Number
-- ErrorDescription = "Error Description"
-- 

Return to index


resiot_calgetvaluefromtag(String, Integer, Integer, String)

With an input date (Date, Hour, Minute) and a preselected calendar (sort by Tag), get the nearest data relate to that date.
Example
Value, Name, Tag, Hour, Minute, Day, ErrorCode, ErrorDescription = resiot_calgetvaluefromtag(InputTag, InputHour, InputMinute, InputDate)
Input Parameters
 - InputTag (String): * The unique tag of the calendar.
 - InputHour (Integer): * The input hour.

 - InputMinute (Integer): * The input minute.
 - InputDate (String): * The desired date. (20-03-2015 Format)

Returns
 - Value (Float): * The respective value.
 - Name (String): * The respective name.

 - Tag (String): * The respective tag.
 - Hour (Integer): * The correct hours of the output data.

 - Minute (Integer): * The correct minutes of the output data.
 - Day (String): * The correct day of the output data. ("sunday","monday"... Format)

 - ErrorCode (Integer): * The type of the error.
 - ErrorDescription (String): * The description of the error.

InputTag = "UltraTag"       -- The unique tag of the calendar
InputHour = 5               -- The input hour
InputMinute = 00            -- The input minute
InputDate = "31/01/2020"    -- The desired date. (20-03-2015 Format)
Value, Name, Tag, Hour, Minute, Day, ErrorCode, ErrorDescription = resiot_calgetvaluefromtag(InputTag, InputHour, InputMinute, InputDate)
resiot_debug(Value)
resiot_debug(Name)
resiot_debug(Tag)
resiot_debug(Hour)
resiot_debug(Minute)
resiot_debug(Day)
resiot_debug(ErrorCode)
resiot_debug(ErrorDescription)
-- 
-- Result Example:
-- 
-- Value = 200
-- Name = "Displayer"
-- Tag = "tDisplayer"
-- Hour = 12
-- Minute = 00
-- Day = "friday"
-- 
-- If there aren't any errors:
-- 
-- ErrorCode = -1
-- ErrorDescription = ""
-- 
-- Else:
-- 
-- ErrorCode = Number
-- ErrorDescription = "Error Description"
-- 

Return to index


resiot_calgetlistobjcount(String)

Get the number of all objects in the Objects list.
Example
Count, ErrorCode, ErrorDescription = resiot_calgetlistobjcount(HexID)
Input Parameters
 - HexID (String): * The Hexadecimal Id of the designated calendar.
Returns
 - Count (Integer): * The number of objects in the list.

 - ErrorCode (Integer): * The type of the error.
 - ErrorDescription (String): * The description of the error.

HexID = "63616c3230"    -- The Hexadecimal Id of the designated calendar
Count, ErrorCode, ErrorDescription = resiot_calgetlistobjcount(HexID)
resiot_debug(Count)
-- 
-- Result Example:
-- 
-- Count = 3
-- 
-- If there aren't any errors:
-- 
-- ErrorCode = -1
-- ErrorDescription = ""
-- 
-- Else:
-- 
-- ErrorCode = Number
-- ErrorDescription = "Error Description"
-- 

Return to index


resiot_calgetobjfromindex(String)

Get the object with a determined index from the Object list. (The first object has index 0)
Example
Type, HexIDObject, TagObject, ErrorCode, ErrorDescription = resiot_calgetobjfromindex(HexID, Index)
Input Parameters
 - HexID (String): * The Hexadecimal Id of the designed calendar.
 - Index (Integer): * The index of the object in the Object list.

Returns
 - Type (Integer): * The type of the object. (0/1, node/nodegroup)
 - HexIDObject (String): * The Hexadecimal Id of the object.

 - TagObject (String): * The Tag of the object.
 - ErrorCode (Integer): * The type of the error.

 - ErrorDescription (String): * The description of the error. *

HexID = "63616c3230"    -- The Hexadecimal Id of the designed calendar
Index = 0               -- The index of the object in the Object list
Type, HexIDObject, TagObject, ErrorCode, ErrorDescription = resiot_calgetobjfromindex(HexID, Index)
resiot_debug(Type)
resiot_debug(HexIDObject)
resiot_debug(TagObject)
resiot_debug(ErrorCode)
resiot_debug(ErrorDescription)
-- 
-- Result Example:
-- 
-- Type = 0
-- HexIDObject = "63616c313635"
-- TagObject = "Audio Node"
-- 
-- If there aren't any errors:
-- 
-- ErrorCode = -1
-- ErrorDescription = ""
-- 
-- Else:
-- 
-- ErrorCode = Number
-- ErrorDescription = "Error Description"
-- 

Return to index