Skip to content

Object Nodes

Name Input Params Return Data Description
resiot_getlastpayload String, String String Get the last Payload of a Node
resiot_getlastpayloaddate String, String Integer Get the date (in seconds) of the last Payload of a Node
resiot_setnodevalue String, String, String, String Boolean, String Set the Tag and the Content Type of the Payload Fields of the Node as Tag and Value
resiot_setnodevaluewithtime String, String, String, String, Integer Boolean, String Set the Tag and the Content Type of the Payload Fields of the Node as Tag and Value in a determinated time
resiot_getnodevalue String, String, String String, String Get the Content of a Payload field of a Node
resiot_getnodevaluewithtime String, String, String String, Integer, String Get the Content and the Last Set Time of a Payload field of a Node
resiot_getnodedatafromtag String String, String Get the Node DevEUI and AppEUI with the Tag
resiot_tx String, String, String, String, String, String, Boolean, String, ... Error This function send a message to a Broker/WebSocket
resiot_txraw String, String, String, String, String, String, Boolean, String, ... Error This function send a message to a Broker/WebSocket
resiot_tx_gw String, String, String, String, String, String, Boolean, String, String, ... Error This function send a message to a Broker/WebSocket through the desired Gateway
resiot_txraw_gw String, String, String, String, String, String, Boolean, String, String, ... Error This function send a message to a Broker/WebSocket through the desired Gateway
resiot_setcounterdownlink String, String, Integer Error This function set the Downlink counter of an ABP node
resiot_setcountetuplink String, String, Integer Error This function set the Uplink counter of an ABP node
resiot_downlinkqueue_deleteall String, String String This function delete the Downlink Queue
resiot_setlatitudelongitude String, String, Float, Float Error This function update the Latitude and the Longitude of a Node
resiot_setlatitudelongitudewtime String, String, Float, Float, Integer Error This function update the Latitude and the Longitude of a Node in a determinated time
resiot_getlastdatejoin String, String Integer, Error Get the date of the last Join of a Node
resiot_getnodebyalias String String, String, String Get the node appEui and devEui from its alias
resiot_getnodebytag String String, String, String Get the node appEui and devEui from its tag
resiot_getnodealias String, String String, String Get the node Alias from its appEui and devEui
resiot_getnodetag String, String String, String Get the node Tag from its appEui and devEui

resiot_getlastpayload(String, String)

Get the last Payload of a Node.
Example
Payload = resiot_getlastpayload(AppEUI, DevEUI)
Input Parameters
 - AppEUI (String): * The AppEUI of the node.
 - DevEUI (String): * The DevEUI of the node.

Returns
 - Payload (String): * The function returns the last Payload of the node. *

DevEUI = "0e7e346433306517"     -- The DevEUI of the node
AppEUI = "4d454e4f57415454"     -- The AppEUI of the node
Payload = resiot_getlastpayload(AppEUI, DevEUI)
resiot_debug(Payload)   -- Result Example: Payload = "1e563CDa"

Return to index


resiot_getlastpayloaddate (String, String)

Get the date (in seconds) of the last Payload of a Node.
Example
Date = resiot_getlastpayloaddate(AppEUI, DevEUI)
Input Parameters
 - AppEUI (String): * The AppEUI of the node.
 - DevEUI (String): * The DevEUI of the node.

Returns
 - Date (Integer): * The function returns the Date (in seconds) of the last Payload of the node based on the DevEUI and AppEUI. *

DevEUI = "0e7e346433306517"     -- The DevEUI of the node
AppEUI = "4d454e4f57415454"     -- The AppEUI of the node
Date = resiot_getlastpayloaddate(AppEUI, DevEUI)
resiot_debug(Date)      -- Result Example: Date = 1501235867  -->  28 July 2017 11:57:47

Return to index


resiot_setnodevalue(String, String, String, String)

Set the Tag and the Content Type of the Payload Fields of the Node as Tag and Value.
Example
AllWorked, Error = resiot_setnodevalue(AppEUI, DevEUI, Tag, Value)
Input Parameters
 - AppEUI (String): * The AppEUI of the node.
 - DevEUI (String): * The DevEUI of the node.

 - Tag (String): * The Tag of a Payload field.
 - Value (String): * The content type of a Payload field.

Returns
 - AllWorked (Boolean): * The functions return true if everything worked fine. Otherwise it returns false.
 - Error (String): * If AllWorked is false, than the error is written here.

AppEUI = "0022117344261579"     -- The AppEUI of the node
DevEUI = "bc004a30b3519f861"    -- The DevEUI of the node
Tag1 = "Decibel"                -- The name of the Tag field contained in the node
Tag2 = "Description"            -- The name of the Tag field contained in the node
Tag3 = "Alarm"                  -- The name of the Tag field contained in the node
Value1 = 22                     -- The input value, the content type field is based on the content type detected form the value
                                -- In this case we have 22 so the content type would be Numeric
Value2 = "This is a new node"   -- The input value, the content type field is based on the content type detected form the value
                                -- In this case we have a string so the content type would be String
Value3 = true                   -- The input value, the content type field is based on the content type detected form the value
                                -- In this case we have true so the content type would be Boolean
AllWorked1, Error = resiot_setnodevalue(AppEUI, DevEUI, Tag, tostring(Value1))
AllWorked2, Error = resiot_setnodevalue(AppEUI, DevEUI, Tag, tostring(Value2))
AllWorked3, Error = resiot_setnodevalue(AppEUI, DevEUI, Tag, tostring(Value3))
resiot_debug(AllWorked1)
resiot_debug(AllWorked2)
resiot_debug(AllWorked3)
-- 
-- Result Example:
-- 
-- If there aren't any errors:
-- 
-- AllWorked = true
-- Error = ""
-- 
-- Else:
-- 
-- AllWorked = false
-- Error = "Error Message"
-- 

Return to index


resiot_setnodevaluewithtime(String, String, String, String, Integer)

Set the Tag and the Content Type of the Payload Fields of the Node as Tag and Value in a determinated time.
Example
AllWorked, Error = resiot_setnodevaluewithtime(AppEUI, DevEUI, Tag, Value, Date)
Input Parameters
 - DevEUI (String): * The DevEUI of the node.
 - AppEUI (String): * The AppEUI of the node.

 - Tag (String): * The tag of a Payload field.
 - Value (String): * The content type of a Payload field.

 - Date (Integer): * The date you want to set, express in seconds.
Returns
 - AllWorked (Boolean): * The functions return true if everything worked fine. Otherwise it returns false.

 - Error (String): * If AllWorked is false, than the error is written here. *

AppEUI = "0022117344261579"     -- The AppEUI of the node
DevEUI = "bc004a30b3519f861"    -- The DevEUI of the node
Tag1 = "Decibel"                -- The name of the Tag field contained in the node
Tag2 = "Description"            -- The name of the Tag field contained in the node
Tag3 = "Alarm"                  -- The name of the Tag field contained in the node
Value1 = 22                     -- The input value, the content type field is based on the content type detected form the value
                                -- In this case we have 22 so the content type would be Numeric
Value2 = "This is a new node"   -- The input value, the content type field is based on the content type detected form the value
                                -- In this case we have a string so the content type would be String
Value3 = true                   -- The input value, the content type field is based on the content type detected form the value
                                -- In this case we have true so the content type would be Boolean
Date = os.time() - 14400 -- Today's date in seconds - 4 hours in seconds
AllWorked1, Error = resiot_setnodevaluewithtime(AppEUI, DevEUI, Tag, tostring(Value1), Date)
AllWorked2, Error = resiot_setnodevaluewithtime(AppEUI, DevEUI, Tag, tostring(Value2), Date)
AllWorked3, Error = resiot_setnodevaluewithtime(AppEUI, DevEUI, Tag, tostring(Value3), Date)
resiot_debug(AllWorked1)
resiot_debug(AllWorked2)
resiot_debug(AllWorked3)
-- 
-- Result Example:
-- 
-- If there aren't any errors:
-- 
-- AllWorked = true
-- Error = ""
-- 
-- Else:
-- 
-- AllWorked = false
-- Error = "Error Message"
-- 

Return to index


resiot_getnodevalue (String, String, String)

Get the Content of a Payload field of a Node.
If the tag has never been assigned a value, it will return, by default, a 0 int value, a empty "" text or a false boolean depending on the type of the tag.
Example
Content, Error = resiot_getnodevalue(AppEUI, DevEUI, Tag)
Input Parameters
 - AppEUI (String): * The AppEUI of the node.
 - DevEUI (String): * The DevEUI of the node.

 - Tag (String): * The tag of a Payload field.
Returns
 - Content (String): * The function returns the value of a Payload field of a Node, based on its Tag.

 - Error (String): * If ContentType is empty, than the error is written here. *

AppEUI = "0022117344261579"     -- The AppEUI of the node
DevEUI = "bc004a30b3519f861"    -- The DevEUI of the node
Tag = "Decibel"                 -- The name of the Tag field contained in the node
Content, Error = resiot_getnodevalue(AppEUI, DevEUI, Tag)
resiot_debug(Content)
-- 
-- Result Example:
-- 
-- If there aren't any errors:
-- 
-- Content = "String"
-- Error = ""
-- 
-- Else:
-- 
-- Content = ""
-- Error = "Error Message"
-- 

Return to index


resiot_getnodevaluewithtime (String, String, String)

Get the Content of a Payload field of a Node and the Last Set Date of the Content in seconds.
If the tag has never been assigned a value, as Content it will return, by default, a 0 int value, a empty "" text or a false boolean depending on the type of the tag.
If the tag has never been assigned a value, as Last Set Date it will return, by default, a negative int value.
Example
Content, LastSetDate, Error = resiot_getnodevaluewithtime(AppEUI, DevEUI, Tag)
Input Parameters
 - AppEUI (String): * The AppEUI of the node.
 - DevEUI (String): * The DevEUI of the node.
 - Tag (String): * The tag of a Payload field.
Returns
 - Content (String): * The function returns the value of a Payload field of a Node, based on its Tag.
 - LastSetDate (Integer): * The function returns the last set date of a Payload field of a Node in seconds, based on its Tag.
 - Error (String): * If ContentType is empty, than the error is written here.

AppEUI = "0022117344261579"     -- The AppEUI of the node
DevEUI = "bc004a30b3519f861"    -- The DevEUI of the node
Tag = "Decibel"                 -- The name of the Tag field contained in the node
Content, LastSetDate, Error = resiot_getnodevaluewithtime(AppEUI, DevEUI, Tag)
resiot_debug(Content)
resiot_debug(LastSetDate)
-- 
-- Result Example:
-- 
-- If there aren't any errors:
-- 
-- Content = "String"
-- LastSetDate = 1.544188463e+09    --It means 1.544.188.463 seconds
-- Error = ""
-- 
-- Else:
-- 
-- Content = ""
-- LastSetDate = 0
-- Error = "Error Message"
-- 

Return to index


resiot_getnodedatafromtag(String)

Get the Node DevEUI and AppEUI with the Tag (not Field Tags).
Example
DevEUI, AppEUI = resiot_getnodedatafromtag(Tag)
Input Parameters
 - Tag (String): * The Tag of the node.
Returns
 - DevEUI (String): * The function returns the DevEUI of the node with the same Tag.

 - AppEUI (String): * The function returns the AppEUI of the node with the same Tag. *

Tag = "Tag" 
DevEUI, AppEUI = resiot_getnodedatafromtag(Tag)
resiot_debug(DevEUI)
resiot_debug(AppEUI)
-- 
-- Result Example:
-- 
-- DevEUI = "bc004a30b3519f861"
-- AppEUI = "0022117344261579"
-- 

Return to index


resiot_tx(String, String, String, String, String, String, Boolean, String, ...)

This function sends a message to a Node.
It is best used when you are sending non ascii characters because of its required hex encoding for the payload.
Example
Error = resiot_tx(Data, Port, DevEUI, AppEUI, HexID, Reference, AskConfirmation, Command)
Input Parameters
 - Data (String): * The message that you want to send. This message has to be HEX ENCODED.
 - Port (String): * The comunication port that you need to use to communicate with the Broker/WebSocket. (ex. 200)

 - DevEUI (String): * The Device EUI of the node you want to contact.
 - AppEUI (String): * The Application EUI connected to your node.

 - HexID (String): * The Connector Id that identifies the Broker/WebSocket/LoRaServer you want to use to send your message.
 - AskConfirmation (Boolean): * If set to true, the network server will notify you this communication with reference Reference(see above) has been received with a tx_confirm message.

 - Reference (String): * Usually(this depends on your Connector) a 8 character long string used by the network server to notify you when this particular transmission has been received. Can be left empty.
 - Command (String): * A string that is used to filter only determinated messages. If not needed it can be left empty.

 - Extra Params JSON (String): * 10 optional fields used to crete dynamic topics. For example if the server require to know the user's identity the "p0" field may be "User": "Admin".
Returns
 - Error (String): * If the DevEUI or the AppEUI aren't found or the desired connector is not found, it prints the error in the console, otherwise it doesn' t do anything.

Data = "4D657373616765"         --"Message"
Port = "200"                    -- The port number
DevEUI = "6a5d4b89457dac89"     -- The DevEUI of the node
AppEUI = "1684b596ad352c14"     -- The AppEUI of the node
HexID = "69643d31"              -- The id that identifies the device
Reference = "abcdefgh"          -- When this particular transmission has been received. Can be left empty
Confirm = true                  -- Allows the reference of the comunication
Command = ""                    -- A string that is used to filter determinated messages. It can be left empty
Error = resiot_tx(Data, Port, DevEUI, AppEUI, HexID, Reference, Confirm, Command, "{"p0":"10"}")
resiot_debug(Error)
-- 
-- Result Example:
-- 
-- If there aren't any errors:
-- 
-- Error = ""
-- 
-- Else:
-- 
-- Error = "Error Message"
-- 

Return to index


resiot_txraw(String, String, String, String, String, String, Boolean, String, ...)

This function sends a message to a Node.
It is best used when you are sending ascii characters because of its simple payload format.
Example
Error = resiot_txraw(Data, Port, DevEUI, AppEUI, HexID, Reference, AskConfirmation, Command)
Input Parameters
 - Data (String): * The message that you want to send. This message MUST NOT BE ENCODED.
 - Port (String): * The comunication port that you need to use to communicate with the Broker/WebSocket. (ex. 200)

 - DevEUI (String): * The Device EUI of the node you want to contact.
 - AppEUI (String): * The Application EUI connected to your node.

 - HexID (String): * The Connector Id that identifies the Broker/WebSocket/LoRaServer you want to use to send your message.
 - AskConfirmation (Boolean): * If set to true, the network server will notify you this communication with reference Reference(see above) has been received with a tx_confirm message.

 - Reference (String): * Usually(this depends on your Connector) a 8 character long string used by the network server to notify you when this particular transmission has been received. Can be left empty.
 - Command (String): * A string that is used to filter only determinated messages. If not needed it can be left empty.

 - Extra Params JSON (String): * 10 optional fields used to crete dynamic topics. For example if the server require to know the user's identity the "p0" field may be "User": "Admin".
Returns
 - Error (String): * If the DevEUI or the AppEUI aren't found or the desired connector is not found, it prints the error in the console, otherwise it doesn't do anything.

Data = "Message"             -- This message MUST NOT BE ENCODED
Port = "200"                 -- The port number
DevEUI = "6a5d4b89457dac89"  -- The DevEUI of the node
AppEUI = "1684b596ad352c14"  -- The AppEUI of the node
HexID = "69643d31"           -- The id that identifies the device
Reference = "abcdefgh"       -- When this particular transmission has been received. Can be left empty
Confirm = true               -- Allows the reference of the comunication
Command = ""                 -- A string that is used to filter determinated messages. It can be left empty
Error = resiot_txraw(Data, Port, DevEUI, AppEUI, HexID, Reference, Confirm, Command, "{"p0":"10"}")
resiot_debug(Error)
-- 
-- Result Example:
-- 
-- If there aren't any errors:
-- 
-- Error = ""
-- 
-- Else:
-- 
-- Error = "Error Message"
-- 

Return to index


resiot_tx_gw(String, String, String, String, String, String, Boolean, String, String, ...)

This function sends a message to a Broker/WebSocket.
It is best used when you are sending non ascii characters because of its required hex encoding for the payload.
Example
Error = resiot_tx_gw(Data, Port, DevEUI, AppEUI, HexID, Reference, AskConfirmation, Command, GwEUI)
Input Parameters
 - Data (String): * The message that you want to send. This message MUST BE ENCODED.
 - Port (String): * The comunication port that you need to use to communicate with the Broker/WebSocket. (ex. 200)

 - DevEUI (String): * The Device EUI of the node you want to contact.
 - AppEUI (String): * The Application EUI connected to your node.

 - HexID (String): * The Connector Id that identifies the Broker/WebSocket/LoRaServer you want to use to send your message.
 - AskConfirmation (Boolean): * If set to true, the network server will notify you this communication with reference Reference(see above) has been received with a tx_confirm message.

 - Reference (String): * Usually(this depends on your Connector) a 8 character long string used by the network server to notify you when this particular transmission has been received. Can be left empty.
 - Command (String): * A string that is used to filter only determinated messages. If not needed it can be left empty.


 - GwEUI (String): * The GwEUI of the desired Gateway.
 - Extra Params JSON (String): * 10 optional fields used to crete dynamic topics. For example if the server require to know the user's identity the "p0" field may be "User": "Admin".

Returns
 - Error (String): * If the DevEUI or the AppEUI aren't found or the desired connector is not found, it prints the error in the console, otherwise it doesn't do anything. *

Data = "4d657373616765"     -- The example means "Message" in HEX
Port = "200"                -- The port number
DevEUI = "6a5d4b89457dac89" -- The DevEUI of the node
AppEUI = "1684b596ad352c14" -- The AppEUI of the node
HexID = "69643d31"          -- The id that identifies the device
Reference = "abcdefgh"      -- When this particular transmission has been received. Can be left empty
Confirm = true              -- Allows the reference of the comunication
Command = ""                -- A string that is used to filter determinated messages. It can be left empty
GwEUI = "010FE2fc230304AA"  -- The GwEUI of the desired Gateway
Error = resiot_tx_gw(Data, Port, DevEUI, AppEUI, HexID, Reference, Confirm, Command, GwEUI, "{"p0":"10"}")
resiot_debug(Error)
-- 
-- Result Example:
-- 
-- If there aren't any errors:
-- 
-- Error = ""
-- 
-- Else:
-- 
-- Error = "Error Message"
-- 

Return to index


resiot_txraw_gw(String, String, String, String, String, String, Boolean, String, String, ...)

This function sends a message to a Broker/WebSocket.
It is best used when you are sending ascii characters because of its simple payload format.
Example
Error = resiot_txraw_gw(Data, Port, DevEUI, AppEUI, IdHex, Reference, AskConfirmation, Command, GwEUI)
Input Parameters
 - Data (String): * The message that you want to send. This message MUST NOT BE ENCODED.
 - Port (String): * The comunication port that you need to use to communicate with the Broker/WebSocket. (ex. 200)

 - DevEUI (String): * The Device EUI of the node you want to contact.
 - AppEUI (String): * The Application EUI connected to your node.

 - IdHex (String): * The Connector Id that identifies the Broker/WebSocket/LoRaServer you want to use to send your message.
 - AskConfirmation (Boolean): * If set to true, the network server will notify you this communication with reference Reference(see above) has been received with a tx_confirm message.

 - Reference (String): * Usually(this depends on your Connector) a 8 character long string used by the network server to notify you when this particular transmission has been received. Can be left empty.
 - Command (String): * A string that is used to filter only determinated messages. If not needed it can be left empty.


 - GwEUI (String): * The GwEUI of the desired Gateway.

 - Extra Params JSON (String): * 10 optional fields used to crete dynamic topics. For example if the server require to know the user's identity the "p0" field may be "User": "Admin".

Returns
 - Error (String): * If the DevEUI or the AppEUI aren't found or the desired connector is not found, it prints the error in the console, otherwise it doesn't do anything. *

Data = "Message"            -- This message MUST NOT BE ENCODED
Port = "200"                -- The port number
DevEUI = "6a5d4b89457dac89" -- The DevEUI of the node
AppEUI = "1684b596ad352c14" -- The AppEUI of the node
IdHex = "69643d31"          -- The id that identifies the device
Reference = "abcdefgh"      -- When this particular transmission has been received. Can be left empty
Confirm = true              -- Allows the reference of the comunication
Command = ""                -- A string that is used to filter determinated messages. It can be left empty
GwEUI = "010FE2fc230304AA"  -- The GwEUI of the desired Gateway
Error = resiot_txraw_gw(Data, Port, DevEUI, AppEUI, IdHex, Reference, Confirm, Command, GwEUI, "{"p0":"10"}")
resiot_debug(Error)
-- 
-- Result Example:
-- 
-- If there aren't any errors:
-- 
-- Error = ""
-- 
-- Else:
-- 
-- Error = "Error Message"
-- 

Return to index


This function set the Downlink counter of an ABP node.
If the node you are trying to set isn't an ABP or isn't connected no any LoRaServer, then this function will return an error.
Example
Error = resiot_setcounterdownlink(AppEUI, DevEUI, Downlink)
Input Parameters
 - AppEUI (String): * The Application EUI connected to your node.
 - DevEUI (String): * The Device EUI of your node.

 - Downlink (Integer): * The Downlink counter you want to set. It cannot have negative value.
Returns
 - Error (String): * If there is any type of error, like "wrong DevEUI" or "invalid Downlink value", it is specified here.

AppEUI = "1684b596ad352c14"     -- The Application EUI connected to your node
DevEUI = "6a5d4b89457dac89"     -- The Device EUI of your node
Downlink = 560                  -- The Downlink counter you want to set. It cannot have negative value
Error = resiot_setcounterdownlink(AppEUI,DevEUI,Downlink)
resiot_debug(Error)
-- 
-- Result Example:
-- 
-- If there aren't any errors:
-- 
-- Error = ""
-- 
-- Else:
-- 
-- Error = "Error Message"
-- 

Return to index


This function set the Uplink counter of an ABP node.
If the node you are trying to set isn't an ABP or isn't connected no any LoRaServer, then this function will return an error.
Example
Error = resiot_setcountetuplink(AppEUI, DevEUI, Uplink)
Input Parameters
 - AppEUI (String): * The Application EUI connected to your node.
 - DevEUI (String): * The Device EUI of your node.

 - Uplink (Integer): * The Uplink counter you want to set. It cannot have negative value.
Returns
 - Error (String): * If there is any type of error, like "wrong DevEUI" or "invalid Uplink value", it is specified here.

AppEUI = "1684b596ad352c14"     -- The Application EUI connected to your node
DevEUI = "6a5d4b89457dac89"     -- The Device EUI of your node
Uplink = 230                    -- The Uplink counter you want to set. It cannot have negative value
Error = resiot_setcountetuplink(AppEUI,DevEUI,Uplink)
resiot_debug(Error)
-- 
-- Result Example:
-- 
-- If there aren't any errors:
-- 
-- Error = ""
-- 
-- Else:
-- 
-- Error = "Error Message"
-- 

Return to index


resiot_downlinkqueue_deleteall (String, String)

This function delete the Downlink Queue. It returns an empty string if there is no error.
Example
Error = resiot_downlinkqueue_deleteall(AppEUI, DevEUI)
Input Parameters
 - AppEUI (String): * The Application EUI connected to your node.
 - DevEUI (String): * The Device EUI of your node.

Returns
 - Error (String): * If there is any type of error, like "Invalid LoRaServer", it is specified here. *

AppEUI = "1684b596ad352c14"     -- The Application EUI connected to your node
DevEUI = "6a5d4b89457dac89"     -- The Device EUI of your node
Error = resiot_downlinkqueue_deleteall(AppEUI, DevEUI)
resiot_debug(Error)
-- 
-- Result Example:
-- 
-- If there aren't any errors:
-- 
-- Error = ""
-- 
-- Else:
-- 
-- Error = "Error Message"
-- 

Return to index


resiot_setlatitudelongitude (String, String, Float, Float)

This function update the Latitude and the Longitude of a Node.
Example
Error = resiot_setlatitudelongitude (AppEUI, DevEUI, Latitude, Longitude)
Input Parameters
 - AppEUI (String): * The Application EUI connected to your node.
 - DevEUI (String): * The Device EUI of your node.

 - Latitude (Float): * The Latitude value you want to set.
 - Longitude (Float): * The Longitude value you want to set.

Returns
 - Error (String): * If there is any type of error, it is specified here. *

AppEUI = "1684b596ad352c14"     -- The Application EUI connected to your node
DevEUI = "6a5d4b89457dac89"     -- The Device EUI of your node
Latitude = 75.56                -- The Latitude value you want to set
Longitude = 14.28               -- The Longitude value you want to set
Error = resiot_setlatitudelongitude (AppEUI, DevEUI, Latitude, Longitude)
resiot_debug(Error)
-- 
-- Result Example:
-- 
-- If there aren't any errors:
-- 
-- Error = ""
-- 
-- Else:
-- 
-- Error = "Error Message"
-- 

Return to index


resiot_setlatitudelongitudewtime (String, String, Float, Float, Integer)

This function update the Latitude and the Longitude of a Node.
Example
Error = resiot_setlatitudelongitudewtime (AppEUI, DevEUI, Latitude, Longitude, Date)
Input Parameters
 - AppEUI (String): * The Application EUI connected to your node.
 - DevEUI (String): * The Device EUI of your node.

 - Latitude (Float): * The Latitude value you want to set.
 - Longitude (Float): * The Longitude value you want to set.

 - Date (Integer): * The date you want to set, express in seconds.
Returns
 - Error (String): * If there is any type of error, it is specified here.

AppEUI = "1684b596ad352c14"     -- The Application EUI connected to your node
DevEUI = "6a5d4b89457dac89"     -- The Device EUI of your node
Latitude = 75.56                -- The Latitude value you want to set
Longitude = 14.28               -- The Longitude value you want to set
Date = os.time() - 14400 -- today's date in seconds - 4 hours in seconds
Error = resiot_setlatitudelongitudewtime (AppEUI, DevEUI, Latitude, Longitude, Date)
resiot_debug(Error)
-- 
-- Result Example:
-- 
-- If there aren't any errors:
-- 
-- Error = ""
-- 
-- Else:
-- 
-- Error = "Error Message"
-- 

Return to index


resiot_getlastdatejoin (String, String)

This function retreive the date of the last Join of a Node.
Example
Date, Error = resiot_getlastdatejoin (AppEUI, DevEUI)
Input Parameters
 - AppEUI (String): * The Application EUI connected to your node.
 - DevEUI (String): * The Device EUI of your node.

Returns
 - Date (Integer): * The date of the last Join, the format is in Unix Timestamp.
 - Error (String): * If there is any type of error, it is specified here.

AppEUI = "1684b596ad352c14"     -- The Application EUI connected to your node
DevEUI = "6a5d4b89457dac89"     -- The Device EUI of your node
Date, Error = resiot_getlastdatejoin (AppEUI, DevEUI)
resiot_debug(Date)
resiot_debug(Error)
-- 
-- Result Example:
-- 
-- If there aren't any errors:
-- 
-- Date = 1515570904  -- Date in seconds
-- 
-- Error = ""
-- 
-- Else:
-- 
-- Date = 0
-- 
-- Error = "Error Message"
-- 

Return to index


resiot_getnodebyalias (String)

Retrieves the node appEui and devEui from its alias.
Example
AppEui, DevEui, Error = resiot_getnodebyalias(Alias)
Input Parameters
 - Alias (String): * The node alias.
Returns
 - AppEUI (String): * The Application EUI connected to your node.

 - DevEUI (String): * The Device EUI of your node.
 - Error (String): * If there is any type of error, it is specified here.

Alias = "pushbutton"
AppEUI, DevEUI, Error = resiot_getnodebyalias(Alias)
resiot_debug(AppEUI)
resiot_debug(DevEUI)
resiot_debug(Error)
-- 
-- Result Example:
-- 
-- If there aren't any errors:
-- AppEUI = "1684b596ad352c14"
-- DevEUI = "6a5d4b89457dac89"
-- Error = ""
-- 
-- Else:
-- AppEUI = ""
-- DevEUI = ""
-- Error = "Node not found."
-- 

Return to index


resiot_getnodebytag (String)

Retrieves the node appEui and devEui from its tag.
Example
AppEui, DevEui, Error = resiot_getnodebytag(Tag)
Input Parameters
 - Tag (String): * The node tag.
Returns
 - AppEUI (String): * The Application EUI connected to your node.

 - DevEUI (String): * The Device EUI of your node.
 - Error (String): * If there is any type of error, it is specified here.

Tag = "pushbutton"
AppEUI, DevEUI, Error = resiot_getnodebytag(Tag)
resiot_debug(AppEUI)
resiot_debug(DevEUI)
resiot_debug(Error)
-- 
-- Result Example:
-- 
-- If there aren't any errors:
-- AppEUI = "1684b596ad352c14"
-- DevEUI = "6a5d4b89457dac89"
-- Error = ""
-- 
-- Else:
-- AppEUI = ""
-- DevEUI = ""
-- Error = "Node not found."
-- 

Return to index


resiot_getnodealias (String, String)

Retrieves the node alias from its appEui and devEui.
Example
alias, Error = resiot_getnodealias(AppEUI, DevEUI)
Input Parameters
 - AppEUI (String): * The Application EUI connected to your node.
 - DevEUI (String): * The Device EUI of your node.

Returns
 - Alias (String): * The node alias.
 - Error (String): * If there is any type of error, it is specified here.

AppEUI = "1684b596ad352c14"     -- The Application EUI connected to your node
DevEUI = "6a5d4b89457dac89"     -- The Device EUI of your node
alias, Error = resiot_getnodealias(AppEUI, DevEUI)  -- Result Example: If there aren't any errors: alias = "pushbutton" Error = ""
resiot_debug(alias)
resiot_debug(Error)
-- Else:
-- alias = ""
-- Error = "Node not found."
-- 

Return to index


resiot_getnodetag (String, String)

Retrieves the node tag from its appEui and devEui.
Example
tag, Error = resiot_getnodetag(AppEUI, DevEUI)
Input Parameters
 - AppEUI (String): * The Application EUI connected to your node.
 - DevEUI (String): * The Device EUI of your node.

Returns
 - Alias (String): * The node tag.
 - Error (String): * If there is any type of error, it is specified here.

AppEUI = "1684b596ad352c14"     -- The Application EUI connected to your node
DevEUI = "6a5d4b89457dac89"     -- The Device EUI of your node
tag, Error = resiot_getnodetag(AppEUI, DevEUI)  -- Result Example: If there aren't any errors: tag = "pushbutton" Error = ""
resiot_debug(tag)
resiot_debug(Error)
-- Else:
-- tag = ""
-- Error = "Node not found."
-- 

Return to index