Design and development of bi-directional smart IoT gateway with interoperability for heterogeneous devices