This Miniservice can be contacted every time an IoT authorised device needs to read the configuration currently stored in the BVRobotices infrastructure.
Every Pre-Defined Miniservice device has a specific configuration "blob" created once the device is
added the first time.
For example the PowerPlug device ( see the
one I built to test this function) has a specific configuration which can be requested
to validate the status of each plug every time you need to refresh the relays status.
This function can be used to store and retrieve service configuration parameters for any IoT module. In Order to store each single IoT parameter, users can call
SetIoTConfigParam REST service. This service will fill the Buonevacanze tables with parameters to download for a specific service.
Each IoT module is, always, identified with a specific device ID. This ID is the one activated by the "approver" engine and is the one that a call to this service must use to be identified by the infrastructure. The returned XML dataFlow is a flow which describes all configuration parameters used at runtime by the IoT device (the "blob" of info). Some parameters can be common for all devices but also specific for the caller module.
At the time this guide is written, the available device IDs are:
//Const Declaration
const String SVCTemperature = "1";
const String CTHMeteo = "1";
const String SVCGeoReeference = "2";
const String CTHGeographical = "2";
const String SVCBiomedical = "3";
const String CTHMedical = "3";
const String SVCConfiguration = "4";
const String CTHConfiguration = "4"; //5 is intentinally left blank for internal use
const String SVCPower = "6";
Each parameter is sent as a single group of values called "ConfValue" a node of this elements can represent a single value or more values. The name of the parameter is specified in the XML directly. If more than one parameter is sent with the same name (this can be caused by an overload of configuration for the same device) the IoT manifacturer can decide if to use the last one only or if to create an array of parameters with the same name.
NOTE: BVRobotics.com miniservice is an infrastructure able to store and manipulate data but those data are not generated by Buonevacanze.org infrastructure. This means that Buonevacanze.org is not responsible for the content of its database and for the quality of data sent by external IoT device.
PCC
This value represents the unique identifier assigned to the IoT object. It is released at configuration time by the IoT certification authority.
It is well known as "device name" (Letteral 3 or 4 chars) and to obtain it you can use the
IoT Manager web app or request it via Email
APP
In some conditions the device could have a different configuration to download based on the app it manages (MultiDevice for example). In this case it is required also to send the right service type associated with the request.
In case of a simple device this parameter can be any value or not entered
http://localhost:50646/GetIotconfig.aspx?PCC=74KM&APP=2