IOT devices usually
need to be modifiable with variables such as elevation for calculating
air pressure or
Thingspeak tokens for uploading measurements. The IOT Configurator service supplies device parameters as
a set of name value pairs in JSON format that are used for configuring variables in an
IOT device. The examples are for devices based on an ESP8266.
A device requests parameters by supplying a token as part of the URL http://configure.urremote.com/config/Token .
Tokens are 20 random characters made up of upper and lower case letters and numbers so as to be unguessable.
For demonstration purposes there is a special short token of abcd so that the
URL http://configure.urremote.com/config/abcd will return some parameters.
Getting Device Tokens
A token is supplied at the URL http://configure.urremote.com/config/device/DeviceID .
For demonstration purposes there is a special DeviceID of 1234
that will return the special short token every time at the URL
Users register a Device ID through human interface. This is the number component of the device WiFi network SSID when
using WiFi manager in an ESP8266 device. In that case it is a serial number unique to each ESP8266 device assigned
during manufacture. The device requests a token using this number and stores the token in flash memory.
A token will be supplied only once for each device for a particular user. Subsequent requests for that device receive a device unknown
This is so that tokens can not be discovered by third parties who know or can guess the Device ID.
Even though the device has no knowledge of user accounts, one device
can get seperate tokens associated with seperate user accounts or a device token can be reset on the server.
A device would normally request a token only once so would also have to be reset to get a new token.