Communication system of a sensor network for smart environments