# An Efficient Interface for the Integration of IoT Devices with Smart Grids
## 4 Architecture
\begin{table}
\begin{tabular}{l l l l} \hline \hline
**Type** & **Method** & **Algorithm** & **Latency (us)** \\ \hline Request & PUT\(\rightarrow\)Partial Write & 1 & 30 \\ Request & POST\(\rightarrow\)Full Write & 2 & 16 \\ Request & GET\(\rightarrow\)Partial Read & 3 & 20 \\ Request & GET\(\rightarrow\)Full Read & 4 & 8 \\ Request & Partial Write\(\rightarrow\)PUT & 5 & 30 \\ Request & Full Write\(\rightarrow\)POST & 6 & 29 \\ Request & Partial Read\(\rightarrow\)GET & 7 & 30 \\ Request & Full Read\(\rightarrow\)GET & 8 & 19 \\ Response & Write\(\rightarrow\)PUT/POST & 9 & 9 \\ Response & Read\(\rightarrow\)GET & 10 & 24 \\ Response & PUT/POST\(\rightarrow\)Write & 11 & 9 \\ Response & GET\(\rightarrow\)Read & 12 & 9 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Latency of mapping methods running on the ESP-based platform. COIIoT was evaluated on an experimental scenario for proof of concept. It still must be evaluated in a real scenario composed of a large number of smart meters. ## 6 Conclusions

This work presented COIIoT, a mapping interface for the integration between CoAP and OSGP. The goal of this interface is to enable the data exchange between IoT devices used in home and industry applications and an SG infrastructure. The developed interface comprises a set of mapping functions that translates the methods used in each protocol and has a low cost that enables its use with low impact in communication. Furthermore, the mapping interface reduces the time necessary for application development as it abstracts the complexity involved in the communication between the protocols. It is noteworthy that while the technique used in this work maps packet directly to packet, other techniques for protocols integration result in an overhead of information and require the building of the URI, or even the use of a GUI, which restricts its use on platforms that have limited resources for storage and processing. In future work, we intend to apply COIIoT in a physical testbed to evaluate the embedded gateway when interfacing a smartphone with a real smart meter within an SG infrastructure. Conceptualization, F.V., L.S., V.R.Q.L., and C.A.Z. ; methodology, F.V. and L.A.S. ; validation, F.V. and L.A.S. ; writing, original draft preparation, F.V., L.A.S., V.R.Q.L., and C.A.Z. ; writing, review and editing, C.A.Z., R.C.G.T. and J.F.d.P.S. All authors have read and agreed to the published version of the manuscript. This research was funded in part by the Coordenacao de Aperfeicoamento de Pessoal de Nivel Superior, Brasil (CAPES)--Finance Code 001, Conselho Nacional de Desenvolvimento Cientifico e Tecnologico (CNPa)--Processes 315287/2018-7 and 436982/2018-8-8, and Fundacao de Amparo a Pesquisa do Estado de Santa Catarina (FAPES)--Grant-2019 TR169. Supported by project \"Plataforme de Vehiculos de Transporte de Materiales y Seguintiono Automo\" --Target. 463 AC03, SA063C19 Junta Castilla y Leon, Consejeria de Educacion and FEDER funds. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the funding agencies. The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.