Obtain network and connection information about an agent’s paired device
A table of device information
This method provides an agent with information about its paired device. The information is returned as a table with the following keys:
|id||String||The device’s unique ID. This is also available using the imp.configparams property’s deviceid key|
|ipaddress||String||The connected device’s IP address as seen by the impCloud, ie. it is the device’s, or its router’s WAN address, not its local network IP address. The address is presented in dotted quad notation, or an empty string (
You should note that the information is re-populated every time the agent detects a device connection.
The following snippet uses device.info() to determine whether a newly connected device has changed its IP address between connections.