Architectures and protocols for wireless sensor and actuator networks