An edge-based approach to develop large-scale smart environments by leveraging SIoT