functionnal code with power and sensor, zigbee to be assessed