The stages of the IoT architecture