This library can be included in your IoT projects to define Service const used to extract Service name and cathegory to pass to the approver function.
Based on these values, approver is able to grant or not access to the miniservice required.
Constants starting with the prefix "SVC" represents service value definition. Staring with the prefix "CTH" represents the SET of the services.
Unfortunatelly not all boards accept the same object modules so we have been forced to create two different versions of the same library. The first version (the one described in this page) is used with the NodeMCu board while the
second one is used
togheter with the ESP module and the wifiesp library. You will find both in the
Download area
In the library you will have available also some functions that you can use to communicate directly with Miniservice platform.
For any Miniservice the activation process requires a call to authenticate the service and a call to pass the request to the server. Using this library you will simplify the development process.
//This is the constructor of the class
MiniService(String Obj, String IP);
//This is the function to request the authentication. It returns a valid token if the appliance has been authorised
String BVAuthenticate(String SVCCode);
//This is the function you can use to send meteo values to the platform (It requires a valid metod and to be authorised to use the meteo cat functions)
bool SendMeteoValues(String Token,int Temp,int Hum);
//This is the function you can use to send Biomedical values to the Miniservice infrastructure (It requires a valid token and to be authorised to use Medical cath functions)
bool SendBioMedicalValues(String Token, int Temp, int Beat, int Oxy);
The following code can be used to create an approval string (to be used by the IoT device) passing the value related to the Temperature functions (SVCTemperature).
SendString = "http://www.buonevacanze.org/approver/default.aspx?PCC=" + ObjectCode + "&&APP=" +
SVCTemperature + "&&TAG=0&&LANIP=" + WiFi.localIP().toString();