diff --git a/libraries/MySensors/examples/BatteryPoweredSensor/BatteryPoweredSensor.ino b/libraries/MySensors/examples/BatteryPoweredSensor/BatteryPoweredSensor.ino index 4449531..fd320eb 100644 --- a/libraries/MySensors/examples/BatteryPoweredSensor/BatteryPoweredSensor.ino +++ b/libraries/MySensors/examples/BatteryPoweredSensor/BatteryPoweredSensor.ino @@ -1,5 +1,5 @@ -// This is an example on how to send in battery measurement for a sensor -// For instruction how to measure battery power on A0 see the follwoing forum +// This is an example that demonstrates how to report the battery level for a sensor +// Instructions for measuring battery capacity on A0 are available in the follwoing forum // thread: http://forum.micasaverde.com/index.php/topic,20078.0.html @@ -21,6 +21,9 @@ void setup() // use the 1.1 V internal reference analogReference(INTERNAL); gw.begin(); + + // Send the sketch version information to the gateway and Controller + gw.sendSketchInfo("Battery Meter", "1.0"); } void loop() diff --git a/libraries/MySensors/examples/DallasTemperatureSensor/DallasTemperatureSensor.ino b/libraries/MySensors/examples/DallasTemperatureSensor/DallasTemperatureSensor.ino index 8027a4f..6d6252c 100644 --- a/libraries/MySensors/examples/DallasTemperatureSensor/DallasTemperatureSensor.ino +++ b/libraries/MySensors/examples/DallasTemperatureSensor/DallasTemperatureSensor.ino @@ -23,6 +23,9 @@ void setup() sensors.begin(); gw.begin(); + // Send the sketch version information to the gateway and Controller + gw.sendSketchInfo("Temperature Sensor", "1.0"); + // Fetch the number of attached sensors numSensors = sensors.getDeviceCount(); // Register all sensors to gw (they will be created as child devices) diff --git a/libraries/MySensors/examples/DistanceSensor/DistanceSensor.ino b/libraries/MySensors/examples/DistanceSensor/DistanceSensor.ino index 3693509..c0bb6ce 100644 --- a/libraries/MySensors/examples/DistanceSensor/DistanceSensor.ino +++ b/libraries/MySensors/examples/DistanceSensor/DistanceSensor.ino @@ -21,6 +21,9 @@ void setup() { gw.begin(); + // Send the sketch version information to the gateway and Controller + gw.sendSketchInfo("Distance Sensor", "1.0"); + // Register all sensors to gw (they will be created as child devices) gw.sendSensorPresentation(0, S_DISTANCE); metric = gw.isMetricSystem(); diff --git a/libraries/MySensors/examples/EnergyMeterPulseSensor/EnergyMeterPulseSensor.ino b/libraries/MySensors/examples/EnergyMeterPulseSensor/EnergyMeterPulseSensor.ino index 6492b92..526714d 100644 --- a/libraries/MySensors/examples/EnergyMeterPulseSensor/EnergyMeterPulseSensor.ino +++ b/libraries/MySensors/examples/EnergyMeterPulseSensor/EnergyMeterPulseSensor.ino @@ -39,6 +39,9 @@ void setup() { gw.begin(); + // Send the sketch version information to the gateway and Controller + gw.sendSketchInfo("Energy Meter", "1.0"); + // Register this device as power sensor gw.sendSensorPresentation(CHILD_ID, S_POWER); diff --git a/libraries/MySensors/examples/IrSensor/IrSensor.ino b/libraries/MySensors/examples/IrSensor/IrSensor.ino index 277cf31..2abe096 100644 --- a/libraries/MySensors/examples/IrSensor/IrSensor.ino +++ b/libraries/MySensors/examples/IrSensor/IrSensor.ino @@ -26,6 +26,9 @@ void setup() irrecv.enableIRIn(); // Start the ir receiver gw.begin(); + // Send the sketch version information to the gateway and Controller + gw.sendSketchInfo("IR Sensor", "1.0"); + // Register a sensors to gw. Use binary light for test purposes. gw.sendSensorPresentation(CHILD_1, S_LIGHT); } diff --git a/libraries/MySensors/examples/LightLuxSensor/LightLuxSensor.ino b/libraries/MySensors/examples/LightLuxSensor/LightLuxSensor.ino index 579d13e..b92efad 100644 --- a/libraries/MySensors/examples/LightLuxSensor/LightLuxSensor.ino +++ b/libraries/MySensors/examples/LightLuxSensor/LightLuxSensor.ino @@ -38,6 +38,9 @@ void setup() { gw.begin(); + // Send the sketch version information to the gateway and Controller + gw.sendSketchInfo("Light Lux Sensor", "1.0"); + // Register all sensors to gateway (they will be created as child devices) gw.sendSensorPresentation(CHILD_ID_LIGHT, S_LIGHT_LEVEL); diff --git a/libraries/MySensors/examples/LightSensor/LightSensor.ino b/libraries/MySensors/examples/LightSensor/LightSensor.ino index 43f14d6..671b0c5 100644 --- a/libraries/MySensors/examples/LightSensor/LightSensor.ino +++ b/libraries/MySensors/examples/LightSensor/LightSensor.ino @@ -17,6 +17,9 @@ void setup() { gw.begin(); + // Send the sketch version information to the gateway and Controller + gw.sendSketchInfo("Light Sensor", "1.0"); + // Register all sensors to gateway (they will be created as child devices) gw.sendSensorPresentation(CHILD_ID_LIGHT, S_LIGHT_LEVEL); } diff --git a/libraries/MySensors/examples/MotionSensor/MotionSensor.ino b/libraries/MySensors/examples/MotionSensor/MotionSensor.ino index dfb48c5..81ce66b 100644 --- a/libraries/MySensors/examples/MotionSensor/MotionSensor.ino +++ b/libraries/MySensors/examples/MotionSensor/MotionSensor.ino @@ -14,6 +14,10 @@ Sleep sleep; void setup() { gw.begin(); + + // Send the sketch version information to the gateway and Controller + gw.sendSketchInfo("Motion Sensor", "1.0"); + pinMode(DIGITAL_INPUT_SENSOR, INPUT); // sets the motion sensor digital pin as input // Register all sensors to gw (they will be created as child devices) gw.sendSensorPresentation(CHILD_ID, S_MOTION); diff --git a/libraries/MySensors/examples/PressureSensor/PressureSensor.ino b/libraries/MySensors/examples/PressureSensor/PressureSensor.ino index 6d49d20..64a484a 100644 --- a/libraries/MySensors/examples/PressureSensor/PressureSensor.ino +++ b/libraries/MySensors/examples/PressureSensor/PressureSensor.ino @@ -27,6 +27,10 @@ boolean metric; void setup() { gw.begin(); + + // Send the sketch version information to the gateway and Controller + gw.sendSketchInfo("Pressure Sensor", "1.0"); + if (!bmp.begin()) { Serial.println("Could not find a valid BMP085 sensor, check wiring!"); while (1) { } diff --git a/libraries/MySensors/examples/RelayActuator/RelayActuator.ino b/libraries/MySensors/examples/RelayActuator/RelayActuator.ino index 61d31f9..98fcb4f 100644 --- a/libraries/MySensors/examples/RelayActuator/RelayActuator.ino +++ b/libraries/MySensors/examples/RelayActuator/RelayActuator.ino @@ -16,6 +16,9 @@ void setup() { gw.begin(); + // Send the sketch version information to the gateway and Controller + gw.sendSketchInfo("Relay", "1.0"); + // Register all sensors to gw (they will be created as child devices) for (int i=0; i