1. A wireless sensor network, comprising: a first node configured to receive a first script defining a new behavior for the network, the first node configured to wirelessly transmit the first script via the network; and a plurality of sensor nodes, each of the sensor nodes having a sensor for detecting an operational parameter of a device, wherein one of the sensor nodes is configured to receive the first script and to store event data indicative of when the first script is to be invoked, the one sensor node configured to perform a comparison between event data and sensor data from a sensor of the one sensor node and to invoke the first script based on the comparison thereby implementing the new behavior.