From caaadf44cf644b4d0432effaed9130957a75aec6 Mon Sep 17 00:00:00 2001 From: Henrik Ekblad Date: Wed, 8 Apr 2015 21:14:52 +0200 Subject: [PATCH] Update file headers. --- libraries/MySensors/MyConfig.h | 20 +++ libraries/MySensors/MyHw.cpp | 19 +++ libraries/MySensors/MyHw.h | 19 +++ libraries/MySensors/MyHwATMega328.cpp | 19 +++ libraries/MySensors/MyHwATMega328.h | 19 +++ libraries/MySensors/MyMessage.cpp | 20 +++ libraries/MySensors/MyMessage.h | 27 ++-- libraries/MySensors/MyParser.cpp | 19 +++ libraries/MySensors/MyParser.h | 21 ++- libraries/MySensors/MyParserSerial.cpp | 19 +++ libraries/MySensors/MyParserSerial.h | 21 ++- libraries/MySensors/MySensor.cpp | 31 ++-- libraries/MySensors/MySensor.h | 27 ++-- libraries/MySensors/MySigning.cpp | 19 +++ libraries/MySensors/MySigning.h | 32 ++++- libraries/MySensors/MySigningAtsha204.cpp | 33 ++++- libraries/MySensors/MySigningAtsha204.h | 33 ++++- libraries/MySensors/MySigningAtsha204Soft.cpp | 39 ++++-- libraries/MySensors/MySigningAtsha204Soft.h | 39 ++++-- libraries/MySensors/MySigningNone.cpp | 32 ++++- libraries/MySensors/MySigningNone.h | 32 ++++- libraries/MySensors/MyTransport.cpp | 19 +++ libraries/MySensors/MyTransport.h | 19 +++ libraries/MySensors/MyTransportNRF24.cpp | 19 +++ libraries/MySensors/MyTransportNRF24.h | 19 +++ libraries/MySensors/MyTransportRFM69.cpp | 19 +++ libraries/MySensors/MyTransportRFM69.h | 19 +++ libraries/MySensors/Version.h | 4 +- .../AirQualitySensor/AirQualitySensor.ino | 52 ++++--- .../BatteryPoweredSensor.ino | 31 +++- .../BinarySwitchSensor/BinarySwitchSensor.ino | 31 +++- .../BinarySwitchSleepSensor.ino | 37 ++++- .../ClearEepromConfig/ClearEepromConfig.ino | 30 +++- .../DallasTemperatureSensor.ino | 27 +++- .../DimmableLEDActuator.ino | 32 +++-- .../examples/DimmableLight/DimmableLight.ino | 27 +++- .../DistanceSensor/DistanceSensor.ino | 28 ++++ .../examples/DustSensor/DustSensor.ino | 57 +++++--- .../EnergyMeterPulseSensor.ino | 43 ++++-- .../EthernetGateway/EthernetGateway.ino | 29 +++- .../examples/EthernetGateway/GatewayUtil.h | 3 +- .../HumiditySensor/HumiditySensor.ino | 29 ++++ .../MySensors/examples/IrSensor/IrSensor.ino | 38 ++++- .../LightLuxSensor/LightLuxSensor.ino | 55 +++++--- .../examples/LightSensor/LightSensor.ino | 28 ++++ .../MAX6875TemperatureSensor.ino | 47 +++++-- .../examples/MQTTGateway/MQTTGateway.ino | 132 ++++++++++-------- .../examples/MotionSensor/MotionSensor.ino | 29 ++++ .../examples/MysensorMicro/MysensorMicro.ino | 39 +++++- .../PressureSensor/PressureSensor.ino | 29 ++++ .../RF433MhzSensor/RF433MhzSensor.ino | 26 +++- .../RFIDLockSensor/RFIDLockSensor.ino | 67 ++++++--- .../RealTimeClockDisplaySensor.ino | 55 ++++++-- .../examples/RelayActuator/RelayActuator.ino | 30 +++- .../RelayWithButtonActuator.ino | 34 ++++- .../examples/RepeaterNode/RepeaterNode.ino | 33 ++++- .../SecretKnockSensor/SecretKnockSensor.ino | 76 ++++++---- .../SecureActuator/SecureActuator.ino | 30 +++- .../examples/SerialGateway/GatewayUtil.h | 24 +++- .../examples/SerialGateway/SerialGateway.ino | 27 +++- .../examples/ServoActuator/ServoActuator.ino | 38 ++++- .../Sha204Personalizer/Sha204Personalizer.ino | 63 ++++++--- .../SoilMoistSensor/SoilMoistSensor.ino | 28 ++++ .../TimeAwareSensor/TimeAwareSensor.ino | 28 +++- .../TouchDisplaySceneControllerSensor.ino | 27 +++- .../MySensors/examples/UVSensor/UVSensor.ino | 55 +++++--- .../WaterMeterPulseSensor.ino | 44 ++++-- 67 files changed, 1795 insertions(+), 401 deletions(-) diff --git a/libraries/MySensors/MyConfig.h b/libraries/MySensors/MyConfig.h index d274fe0..437ef3e 100644 --- a/libraries/MySensors/MyConfig.h +++ b/libraries/MySensors/MyConfig.h @@ -1,3 +1,23 @@ +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + */ + + #ifndef MyConfig_h #define MyConfig_h #include diff --git a/libraries/MySensors/MyHw.cpp b/libraries/MySensors/MyHw.cpp index 75f020d..3016a6b 100644 --- a/libraries/MySensors/MyHw.cpp +++ b/libraries/MySensors/MyHw.cpp @@ -1,3 +1,22 @@ +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + */ + #include "MyHw.h" MyHw::MyHw() { diff --git a/libraries/MySensors/MyHw.h b/libraries/MySensors/MyHw.h index 14857c6..74ceb13 100644 --- a/libraries/MySensors/MyHw.h +++ b/libraries/MySensors/MyHw.h @@ -1,3 +1,22 @@ +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + */ + #ifndef MyHw_h #define MyHw_h diff --git a/libraries/MySensors/MyHwATMega328.cpp b/libraries/MySensors/MyHwATMega328.cpp index f7e58a4..2281e6c 100644 --- a/libraries/MySensors/MyHwATMega328.cpp +++ b/libraries/MySensors/MyHwATMega328.cpp @@ -1,3 +1,22 @@ +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + */ + #include "MyHw.h" #include "MyHwATMega328.h" diff --git a/libraries/MySensors/MyHwATMega328.h b/libraries/MySensors/MyHwATMega328.h index 8610f1b..ccb35ba 100644 --- a/libraries/MySensors/MyHwATMega328.h +++ b/libraries/MySensors/MyHwATMega328.h @@ -1,3 +1,22 @@ +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + */ + #ifndef MyHwATMega328_h #define MyHwATMega328_h diff --git a/libraries/MySensors/MyMessage.cpp b/libraries/MySensors/MyMessage.cpp index 7143e9c..a0fab36 100755 --- a/libraries/MySensors/MyMessage.cpp +++ b/libraries/MySensors/MyMessage.cpp @@ -1,3 +1,23 @@ +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + */ + + #include "MyMessage.h" #include #include diff --git a/libraries/MySensors/MyMessage.h b/libraries/MySensors/MyMessage.h index e552f13..c5b8612 100644 --- a/libraries/MySensors/MyMessage.h +++ b/libraries/MySensors/MyMessage.h @@ -1,14 +1,23 @@ -/* - The MySensors library adds a new layer on top of the RF24 library. - It handles radio network routing, relaying and ids. - - Created by Henrik Ekblad - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - version 2 as published by the Free Software Foundation. +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. */ + #ifndef MyMessage_h #define MyMessage_h diff --git a/libraries/MySensors/MyParser.cpp b/libraries/MySensors/MyParser.cpp index dacd32b..2011d16 100644 --- a/libraries/MySensors/MyParser.cpp +++ b/libraries/MySensors/MyParser.cpp @@ -1,3 +1,22 @@ +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + */ + #include "MyParser.h" MyParser::MyParser() { diff --git a/libraries/MySensors/MyParser.h b/libraries/MySensors/MyParser.h index e606a0d..39e2975 100644 --- a/libraries/MySensors/MyParser.h +++ b/libraries/MySensors/MyParser.h @@ -1,3 +1,22 @@ +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + */ + #ifndef MyParser_h #define MyParser_h @@ -13,4 +32,4 @@ public: // returns true if successfully parsed the input string virtual bool parse(MyMessage &message, char *inputString) = 0; }; -#endif \ No newline at end of file +#endif diff --git a/libraries/MySensors/MyParserSerial.cpp b/libraries/MySensors/MyParserSerial.cpp index 9c1aa88..e2ee52a 100644 --- a/libraries/MySensors/MyParserSerial.cpp +++ b/libraries/MySensors/MyParserSerial.cpp @@ -1,3 +1,22 @@ +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + */ + #include "MyParser.h" #include "MyParserSerial.h" #include "MyTransport.h" diff --git a/libraries/MySensors/MyParserSerial.h b/libraries/MySensors/MyParserSerial.h index e7baf9b..80d315d 100644 --- a/libraries/MySensors/MyParserSerial.h +++ b/libraries/MySensors/MyParserSerial.h @@ -1,3 +1,22 @@ +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + */ + #ifndef MyParserSerial_h #define MyParserSerial_h @@ -12,4 +31,4 @@ public: private: uint8_t h2i(char c); }; -#endif \ No newline at end of file +#endif diff --git a/libraries/MySensors/MySensor.cpp b/libraries/MySensors/MySensor.cpp index a8e42ea..2f98b9e 100755 --- a/libraries/MySensors/MySensor.cpp +++ b/libraries/MySensors/MySensor.cpp @@ -1,14 +1,23 @@ - /* - The MySensors library adds a new layer on top of the RF24 library. - It handles radio network routing, relaying and ids. - - Created by Henrik Ekblad - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - version 2 as published by the Free Software Foundation. +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. */ + #include "MySensor.h" #define DISTANCE_INVALID (0xFF) @@ -101,9 +110,9 @@ void MySensor::begin(void (*_msgCallback)(const MyMessage &), uint8_t _nodeId, b if (isGateway) { // Set configuration for gateway - nc.parentNodeId = 0; + nc.parentNodeId = GATEWAY_ADDRESS; nc.distance = 0; - nc.nodeId = 0; + nc.nodeId = GATEWAY_ADDRESS; } else { // Read settings from eeprom hw_readConfigBlock((void*)&nc, (void*)EEPROM_NODE_ID_ADDRESS, sizeof(NodeConfig)); diff --git a/libraries/MySensors/MySensor.h b/libraries/MySensors/MySensor.h index 40b44bb..0081b90 100644 --- a/libraries/MySensors/MySensor.h +++ b/libraries/MySensors/MySensor.h @@ -1,13 +1,22 @@ -/* - The MySensors library adds a new layer on top of the RF24 library. - It handles radio network routing, relaying and ids. +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + */ - Created by Henrik Ekblad - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - version 2 as published by the Free Software Foundation. -*/ #ifndef MySensor_h #define MySensor_h diff --git a/libraries/MySensors/MySigning.cpp b/libraries/MySensors/MySigning.cpp index 835b947..03c3ee3 100644 --- a/libraries/MySensors/MySigning.cpp +++ b/libraries/MySensors/MySigning.cpp @@ -1,3 +1,22 @@ +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + */ + #include "MySigning.h" MySigning::MySigning(bool requestSignatures) : _requestSignatures(requestSignatures) { diff --git a/libraries/MySensors/MySigning.h b/libraries/MySensors/MySigning.h index dc4407d..e65d546 100644 --- a/libraries/MySensors/MySigning.h +++ b/libraries/MySensors/MySigning.h @@ -1,9 +1,29 @@ -/* - The MySigning driver provides a generic API for various signing backends to offer - signing of MySensors messages. - - Created by Patrick "Anticimex" Fallberg -*/ +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + ******************************* + * + * DESCRIPTION + * Signing support created by Patrick "Anticimex" Fallberg + * The MySigning driver provides a generic API for various signing backends to offer + * signing of MySensors messages. + * + */ #ifndef MySigning_h #define MySigning_h diff --git a/libraries/MySensors/MySigningAtsha204.cpp b/libraries/MySensors/MySigningAtsha204.cpp index 07dca5f..2baa0dd 100644 --- a/libraries/MySensors/MySigningAtsha204.cpp +++ b/libraries/MySensors/MySigningAtsha204.cpp @@ -1,9 +1,30 @@ -/* - ATSHA204 signing backend. The Atmel ATSHA204 offers true random number generation and - HMAC-SHA256 authentication with a readout-protected key. - - Created by Patrick "Anticimex" Fallberg -*/ +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + ******************************* + * + * DESCRIPTION + * Signing support created by Patrick "Anticimex" Fallberg + * ATSHA204 signing backend. The Atmel ATSHA204 offers true random number generation and + * HMAC-SHA256 authentication with a readout-protected key. + * + */ + #include "MySigning.h" #include "MySigningAtsha204.h" diff --git a/libraries/MySensors/MySigningAtsha204.h b/libraries/MySensors/MySigningAtsha204.h index 1ebf386..56342e9 100644 --- a/libraries/MySensors/MySigningAtsha204.h +++ b/libraries/MySensors/MySigningAtsha204.h @@ -1,9 +1,30 @@ -/* - ATSHA204 signing backend. The Atmel ATSHA204 offers true random number generation and - HMAC-SHA256 authentication with a readout-protected key. - - Created by Patrick "Anticimex" Fallberg -*/ +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + ******************************* + * + * DESCRIPTION + * Signing support created by Patrick "Anticimex" Fallberg + * ATSHA204 signing backend. The Atmel ATSHA204 offers true random number generation and + * HMAC-SHA256 authentication with a readout-protected key. + * + */ + #ifndef MySigningAtsha204_h #define MySigningAtsha204_h diff --git a/libraries/MySensors/MySigningAtsha204Soft.cpp b/libraries/MySensors/MySigningAtsha204Soft.cpp index d5aa8aa..d552c17 100644 --- a/libraries/MySensors/MySigningAtsha204Soft.cpp +++ b/libraries/MySensors/MySigningAtsha204Soft.cpp @@ -1,12 +1,33 @@ -/* - ATSHA204 emulated signing backend. The emulated ATSHA204 implementation offers pseudo random - number generation and HMAC-SHA256 authentication compatible with a "physical" ATSHA204. - NOTE: Key is stored in clear text in the Arduino firmware. Therefore, the use of this back-end - could compromise the key used in the signed message infrastructure if device is lost and its memory - dumped. - - Created by Patrick "Anticimex" Fallberg -*/ +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + ******************************* + * + * DESCRIPTION + * Signing support created by Patrick "Anticimex" Fallberg + * ATSHA204 emulated signing backend. The emulated ATSHA204 implementation offers pseudo random + * number generation and HMAC-SHA256 authentication compatible with a "physical" ATSHA204. + * NOTE: Key is stored in clear text in the Arduino firmware. Therefore, the use of this back-end + * could compromise the key used in the signed message infrastructure if device is lost and its memory + * dumped. + * + */ + #include "MyConfig.h" #include "MySigning.h" #include "MySigningAtsha204Soft.h" diff --git a/libraries/MySensors/MySigningAtsha204Soft.h b/libraries/MySensors/MySigningAtsha204Soft.h index fdc1371..e516618 100644 --- a/libraries/MySensors/MySigningAtsha204Soft.h +++ b/libraries/MySensors/MySigningAtsha204Soft.h @@ -1,12 +1,33 @@ -/* - ATSHA204 emulated signing backend. The emulated ATSHA204 implementation offers pseudo random - number generation and HMAC-SHA256 authentication compatible with a "physical" ATSHA204. - NOTE: Key is stored in clear text in the Arduino firmware. Therefore, the use of this back-end - could compromise the key used in the signed message infrastructure if device is lost and its memory - dumped. - - Created by Patrick "Anticimex" Fallberg -*/ +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + ******************************* + * + * DESCRIPTION + * Signing support created by Patrick "Anticimex" Fallberg + * ATSHA204 emulated signing backend. The emulated ATSHA204 implementation offers pseudo random + * number generation and HMAC-SHA256 authentication compatible with a "physical" ATSHA204. + * NOTE: Key is stored in clear text in the Arduino firmware. Therefore, the use of this back-end + * could compromise the key used in the signed message infrastructure if device is lost and its memory + * dumped. + * + */ + #ifndef MySigningHmac256Soft_h #define MySigningHmac256Soft_h diff --git a/libraries/MySensors/MySigningNone.cpp b/libraries/MySensors/MySigningNone.cpp index 93e2aa5..a73a375 100644 --- a/libraries/MySensors/MySigningNone.cpp +++ b/libraries/MySensors/MySigningNone.cpp @@ -1,8 +1,30 @@ -/* - Disabled signing backend. Does not provide any security measures. - - Created by Patrick "Anticimex" Fallberg -*/ +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + ******************************* + * + * DESCRIPTION + * Signing support created by Patrick "Anticimex" Fallberg + * Disabled signing backend. Does not provide any security measures. + * + */ + + #include "MyConfig.h" #include "MySigning.h" #include "MySigningNone.h" diff --git a/libraries/MySensors/MySigningNone.h b/libraries/MySensors/MySigningNone.h index dd8f319..b024b41 100644 --- a/libraries/MySensors/MySigningNone.h +++ b/libraries/MySensors/MySigningNone.h @@ -1,8 +1,30 @@ -/* - Disabled signing backend. Does not provide any security measures. - - Created by Patrick "Anticimex" Fallberg -*/ +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + ******************************* + * + * DESCRIPTION + * Signing support created by Patrick "Anticimex" Fallberg + * Disabled signing backend. Does not provide any security measures. + * + */ + + #ifndef MySigningNone_h #define MySigningNone_h diff --git a/libraries/MySensors/MyTransport.cpp b/libraries/MySensors/MyTransport.cpp index 56cfdf9..05627de 100644 --- a/libraries/MySensors/MyTransport.cpp +++ b/libraries/MySensors/MyTransport.cpp @@ -1,3 +1,22 @@ +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + */ + #include "MyTransport.h" MyTransport::MyTransport() { diff --git a/libraries/MySensors/MyTransport.h b/libraries/MySensors/MyTransport.h index 08ba0c6..839dbbd 100644 --- a/libraries/MySensors/MyTransport.h +++ b/libraries/MySensors/MyTransport.h @@ -1,3 +1,22 @@ +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + */ + #ifndef MyTransport_h #define MyTransport_h diff --git a/libraries/MySensors/MyTransportNRF24.cpp b/libraries/MySensors/MyTransportNRF24.cpp index 9cc63fb..5635e18 100644 --- a/libraries/MySensors/MyTransportNRF24.cpp +++ b/libraries/MySensors/MyTransportNRF24.cpp @@ -1,3 +1,22 @@ +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + */ + #include "MyTransport.h" #include "MyTransportNRF24.h" diff --git a/libraries/MySensors/MyTransportNRF24.h b/libraries/MySensors/MyTransportNRF24.h index c5ac75e..5f9b7b7 100644 --- a/libraries/MySensors/MyTransportNRF24.h +++ b/libraries/MySensors/MyTransportNRF24.h @@ -1,3 +1,22 @@ +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + */ + #ifndef MyTransportNRF24_h #define MyTransportNRF24_h diff --git a/libraries/MySensors/MyTransportRFM69.cpp b/libraries/MySensors/MyTransportRFM69.cpp index c387816..d9b4a9f 100644 --- a/libraries/MySensors/MyTransportRFM69.cpp +++ b/libraries/MySensors/MyTransportRFM69.cpp @@ -1,3 +1,22 @@ +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + */ + #include "MyTransport.h" #include "MyTransportRFM69.h" diff --git a/libraries/MySensors/MyTransportRFM69.h b/libraries/MySensors/MyTransportRFM69.h index 7b3821a..c564986 100644 --- a/libraries/MySensors/MyTransportRFM69.h +++ b/libraries/MySensors/MyTransportRFM69.h @@ -1,3 +1,22 @@ +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + */ + #ifndef MyTransportRF69_h #define MyTransportRF69_h diff --git a/libraries/MySensors/Version.h b/libraries/MySensors/Version.h index 82462b7..437cd2c 100644 --- a/libraries/MySensors/Version.h +++ b/libraries/MySensors/Version.h @@ -1,11 +1,11 @@ /*** * This file defines the Sensor library version number * Normally, contributors should not modify this directly - * as it is manaaged by the MySensors Bot. + * as it is managed by the MySensors Bot. */ #ifndef Version_h #define Version_h -#define LIBRARY_VERSION "1.4.1" +#define LIBRARY_VERSION "1.5 b1" #endif diff --git a/libraries/MySensors/examples/AirQualitySensor/AirQualitySensor.ino b/libraries/MySensors/examples/AirQualitySensor/AirQualitySensor.ino index efe12f3..014ce3d 100644 --- a/libraries/MySensors/examples/AirQualitySensor/AirQualitySensor.ino +++ b/libraries/MySensors/examples/AirQualitySensor/AirQualitySensor.ino @@ -1,20 +1,38 @@ -/* - Vera Arduino MQ2 - - connect the MQ2 sensor as follows : - - A H A >>> 5V - B >>> A0 - H >>> GND - B >>> 10K ohm >>> GND - - Contribution: epierre - Based on http://sandboxelectronics.com/?p=165 - - License: Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0) - - Modified by HEK to work in 1.4 -*/ +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + ******************************* + * + * DESCRIPTION + * + * Connect the MQ2 sensor as follows : + * + * A H A >>> 5V + * B >>> A0 + * H >>> GND + * B >>> 10K ohm >>> GND + * + * Contribution: epierre + * Based on http://sandboxelectronics.com/?p=165 + * License: Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0) + * Modified by HEK to work in 1.4 + * + */ #include #include diff --git a/libraries/MySensors/examples/BatteryPoweredSensor/BatteryPoweredSensor.ino b/libraries/MySensors/examples/BatteryPoweredSensor/BatteryPoweredSensor.ino index 97bc0c1..7dbd93b 100644 --- a/libraries/MySensors/examples/BatteryPoweredSensor/BatteryPoweredSensor.ino +++ b/libraries/MySensors/examples/BatteryPoweredSensor/BatteryPoweredSensor.ino @@ -1,6 +1,31 @@ -// 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 +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + ******************************* + * + * DESCRIPTION + * + * This is an example that demonstrates how to report the battery level for a sensor + * Instructions for measuring battery capacity on A0 are available here: + * http://www.mysensors.org/build/battery + * + */ + #include #include diff --git a/libraries/MySensors/examples/BinarySwitchSensor/BinarySwitchSensor.ino b/libraries/MySensors/examples/BinarySwitchSensor/BinarySwitchSensor.ino index 6ca5886..d22b629 100644 --- a/libraries/MySensors/examples/BinarySwitchSensor/BinarySwitchSensor.ino +++ b/libraries/MySensors/examples/BinarySwitchSensor/BinarySwitchSensor.ino @@ -1,6 +1,31 @@ -// Simple binary switch example -// Connect button or door/window reed switch between -// digitial I/O pin 3 (BUTTON_PIN below) and GND. +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + ******************************* + * + * DESCRIPTION + * + * Simple binary switch example + * Connect button or door/window reed switch between + * digitial I/O pin 3 (BUTTON_PIN below) and GND. + * http://www.mysensors.org/build/binary + */ + #include #include diff --git a/libraries/MySensors/examples/BinarySwitchSleepSensor/BinarySwitchSleepSensor.ino b/libraries/MySensors/examples/BinarySwitchSleepSensor/BinarySwitchSleepSensor.ino index ff8637a..34e0a17 100644 --- a/libraries/MySensors/examples/BinarySwitchSleepSensor/BinarySwitchSleepSensor.ino +++ b/libraries/MySensors/examples/BinarySwitchSleepSensor/BinarySwitchSleepSensor.ino @@ -1,9 +1,34 @@ -// Interrupt driven binary switch example with dual interrupts -// Author: Patrick 'Anticimex' Fallberg -// Connect one button or door/window reed switch between -// digitial I/O pin 3 (BUTTON_PIN below) and GND and the other -// one in similar fashion on digital I/O pin 2. -// This example is designed to fit Arduino Nano/Pro Mini +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + ******************************* + * + * DESCRIPTION + * + * Interrupt driven binary switch example with dual interrupts + * Author: Patrick 'Anticimex' Fallberg + * Connect one button or door/window reed switch between + * digitial I/O pin 3 (BUTTON_PIN below) and GND and the other + * one in similar fashion on digital I/O pin 2. + * This example is designed to fit Arduino Nano/Pro Mini + * + */ + #include #include diff --git a/libraries/MySensors/examples/ClearEepromConfig/ClearEepromConfig.ino b/libraries/MySensors/examples/ClearEepromConfig/ClearEepromConfig.ino index ddbaaba..ae8debf 100644 --- a/libraries/MySensors/examples/ClearEepromConfig/ClearEepromConfig.ino +++ b/libraries/MySensors/examples/ClearEepromConfig/ClearEepromConfig.ino @@ -1,8 +1,28 @@ -/* -* -* This sketch clears radioId, relayId and routing info in EEPROM -* -*/ +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + ******************************* + * + * DESCRIPTION + * + * This sketch clears radioId, relayId and other routing information in EEPROM back to factory default + * + */ #include #include diff --git a/libraries/MySensors/examples/DallasTemperatureSensor/DallasTemperatureSensor.ino b/libraries/MySensors/examples/DallasTemperatureSensor/DallasTemperatureSensor.ino index 3c6c2c0..5ac41b4 100644 --- a/libraries/MySensors/examples/DallasTemperatureSensor/DallasTemperatureSensor.ino +++ b/libraries/MySensors/examples/DallasTemperatureSensor/DallasTemperatureSensor.ino @@ -1,4 +1,29 @@ -// Example sketch showing how to send in OneWire temperature readings +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + ******************************* + * + * DESCRIPTION + * + * Example sketch showing how to send in DS1820B OneWire temperature readings back to the controller + * http://www.mysensors.org/build/temp + */ + #include #include #include diff --git a/libraries/MySensors/examples/DimmableLEDActuator/DimmableLEDActuator.ino b/libraries/MySensors/examples/DimmableLEDActuator/DimmableLEDActuator.ino index 6c6a140..d0ecb92 100644 --- a/libraries/MySensors/examples/DimmableLEDActuator/DimmableLEDActuator.ino +++ b/libraries/MySensors/examples/DimmableLEDActuator/DimmableLEDActuator.ino @@ -1,8 +1,27 @@ -/*** +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 as published by the Free Software Foundation. - * + * + ******************************* + * + * REVISION HISTORY + * Version 1.0 - February 15, 2014 - Bruce Lacey + * Version 1.1 - August 13, 2014 - Converted to 1.4 (hek) + * * DESCRIPTION * This sketch provides a Dimmable LED Light using PWM and based Henrik Ekblad * Vera Arduino Sensor project. @@ -13,12 +32,9 @@ * to the LED negative terminal and the MOSFET Source pin is connected to ground. * * This sketch is extensible to support more than one MOSFET/PWM dimmer per circuit. - * - * REVISION HISTORY - * Version 1.0 - February 15, 2014 - Bruce Lacey - * Version 1.1 - August 13, 2014 - Converted to 1.4 (hek) - * - ***/ + * http://www.mysensors.org/build/dimmer + */ + #define SN "DimmableLED" #define SV "1.1" diff --git a/libraries/MySensors/examples/DimmableLight/DimmableLight.ino b/libraries/MySensors/examples/DimmableLight/DimmableLight.ino index d396d37..d2e0812 100644 --- a/libraries/MySensors/examples/DimmableLight/DimmableLight.ino +++ b/libraries/MySensors/examples/DimmableLight/DimmableLight.ino @@ -1,7 +1,25 @@ -/*** +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 as published by the Free Software Foundation. + * + ******************************* + * + * REVISION HISTORY + * Version 1.0 - January 30, 2015 - Developed by GizMoCuz (Domoticz) * * DESCRIPTION * This sketch provides an example how to implement a Dimmable Light @@ -9,12 +27,7 @@ * It can be used as a base sketch for actual hardware. * Stores the last light state and level in eeprom. * - * Developed by GizMoCuz (Domoticz) - * - * REVISION HISTORY - * Version 1.0 - January 30, 2015 - * - ***/ + */ #include #include diff --git a/libraries/MySensors/examples/DistanceSensor/DistanceSensor.ino b/libraries/MySensors/examples/DistanceSensor/DistanceSensor.ino index abd0530..a21e86a 100644 --- a/libraries/MySensors/examples/DistanceSensor/DistanceSensor.ino +++ b/libraries/MySensors/examples/DistanceSensor/DistanceSensor.ino @@ -1,3 +1,31 @@ +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + ******************************* + * + * REVISION HISTORY + * Version 1.0 - Henrik EKblad + * + * DESCRIPTION + * This sketch provides an example how to implement a distance sensor using HC-SR04 + * http://www.mysensors.org/build/distance + */ + #include #include #include diff --git a/libraries/MySensors/examples/DustSensor/DustSensor.ino b/libraries/MySensors/examples/DustSensor/DustSensor.ino index 4ebe804..38f6682 100644 --- a/libraries/MySensors/examples/DustSensor/DustSensor.ino +++ b/libraries/MySensors/examples/DustSensor/DustSensor.ino @@ -1,21 +1,42 @@ -/* - Arduino Dust Sensort - - connect the sensor as follows : - - VCC >>> 5V - A >>> A0 - GND >>> GND - - Based on: http://www.dfrobot.com/wiki/index.php/Sharp_GP2Y1010AU - Authors: Cyrille Médard de Chardon (serialC), Christophe Trefois (Trefex) - Contribution: epierre - COnverted to 1.4 by Henrik Ekblad - - The dust sensor used (see purchase guide for latest link): - http://rover.ebay.com/rover/1/711-53200-19255-0/1?icep_ff3=2&pub=5575069610&toolid=10001&campid=5337433187&customid=&icep_item=171259125886&ipn=psmain&icep_vectorid=229466&kwid=902099&mtid=824&kw=lg - -*/ +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + ******************************* + * + * REVISION HISTORY + * Version 1.0 - epierre + * Converted to 1.4 by Henrik Ekblad + * + * DESCRIPTION + * Arduino Dust Sensort + * + * connect the sensor as follows : + * + * VCC >>> 5V + * A >>> A0 + * GND >>> GND + * + * Based on: http://www.dfrobot.com/wiki/index.php/Sharp_GP2Y1010AU + * Authors: Cyrille Médard de Chardon (serialC), Christophe Trefois (Trefex) + * + * http://www.mysensors.org/build/dust + * + */ #include #include diff --git a/libraries/MySensors/examples/EnergyMeterPulseSensor/EnergyMeterPulseSensor.ino b/libraries/MySensors/examples/EnergyMeterPulseSensor/EnergyMeterPulseSensor.ino index 01f3e66..b146a3b 100644 --- a/libraries/MySensors/examples/EnergyMeterPulseSensor/EnergyMeterPulseSensor.ino +++ b/libraries/MySensors/examples/EnergyMeterPulseSensor/EnergyMeterPulseSensor.ino @@ -1,11 +1,38 @@ -// Use this sensor to measure KWH and Watt of your house meeter -// You need to set the correct pulsefactor of your meeter (blinks per KWH). -// The sensor starts by fetching current KWH value from gateway. -// Reports both KWH and Watt back to gateway. -// -// Unfortunately millis() won't increment when the Arduino is in -// sleepmode. So we cannot make this sensor sleep if we also want -// to calculate/report watt-number. +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + ******************************* + * + * REVISION HISTORY + * Version 1.0 - Henrik EKblad + * + * DESCRIPTION + * This sketch provides an example how to implement a distance sensor using HC-SR04 + * Use this sensor to measure KWH and Watt of your house meeter + * You need to set the correct pulsefactor of your meeter (blinks per KWH). + * The sensor starts by fetching current KWH value from gateway. + * Reports both KWH and Watt back to gateway. + * + * Unfortunately millis() won't increment when the Arduino is in + * sleepmode. So we cannot make this sensor sleep if we also want + * to calculate/report watt-number. + * http://www.mysensors.org/build/pulse_power + */ #include #include diff --git a/libraries/MySensors/examples/EthernetGateway/EthernetGateway.ino b/libraries/MySensors/examples/EthernetGateway/EthernetGateway.ino index c653ab4..562b28d 100644 --- a/libraries/MySensors/examples/EthernetGateway/EthernetGateway.ino +++ b/libraries/MySensors/examples/EthernetGateway/EthernetGateway.ino @@ -1,13 +1,28 @@ - -/* - * Copyright (C) 2013 Henrik Ekblad - * - * Contribution by a-lurker and Anticimex, - * Contribution by Norbert Truchsess +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 as published by the Free Software Foundation. + * + ******************************* + * + * REVISION HISTORY + * Version 1.0 - Henrik EKblad + * Contribution by a-lurker and Anticimex, + * Contribution by Norbert Truchsess + * * * DESCRIPTION * The EthernetGateway sends data received from sensors to the ethernet link. @@ -35,7 +50,7 @@ * - TX (yellow) - blink fast on radio message transmitted. In inclusion mode will blink slowly * - ERR (red) - fast blink on error during transmission error or recieve crc error * - * See http://www.mysensors.org/build/ethernet_gateway for wiring instructions. + * See http://www.mysensors.org/build/ethernet_gateway for wiring instructions. * */ #define NO_PORTB_PINCHANGES diff --git a/libraries/MySensors/examples/EthernetGateway/GatewayUtil.h b/libraries/MySensors/examples/EthernetGateway/GatewayUtil.h index 6f006df..2c1b22c 100644 --- a/libraries/MySensors/examples/EthernetGateway/GatewayUtil.h +++ b/libraries/MySensors/examples/EthernetGateway/GatewayUtil.h @@ -133,7 +133,7 @@ void parseAndSend(MySensor gw, char *commandBuffer) { } void setInclusionMode(boolean newMode) { - if (newMode != inclusionMode) + if (newMode != inclusionMode) { inclusionMode = newMode; // Send back mode change on serial line to ack command serial(PSTR("0;0;%d;0;%d;%d\n"), C_INTERNAL, I_INCLUSION_MODE, inclusionMode?1:0); @@ -141,6 +141,7 @@ void setInclusionMode(boolean newMode) { if (inclusionMode) { inclusionStartTime = millis(); } + } } diff --git a/libraries/MySensors/examples/HumiditySensor/HumiditySensor.ino b/libraries/MySensors/examples/HumiditySensor/HumiditySensor.ino index 54dc5eb..f5020cd 100644 --- a/libraries/MySensors/examples/HumiditySensor/HumiditySensor.ino +++ b/libraries/MySensors/examples/HumiditySensor/HumiditySensor.ino @@ -1,3 +1,32 @@ +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + ******************************* + * + * REVISION HISTORY + * Version 1.0 - Henrik EKblad + * + * DESCRIPTION + * This sketch provides an example how to implement a humidity/temperature + * sensor using DHT11/DHT-22 + * http://www.mysensors.org/build/humidity + */ + #include #include #include diff --git a/libraries/MySensors/examples/IrSensor/IrSensor.ino b/libraries/MySensors/examples/IrSensor/IrSensor.ino index e954fcd..6c8d87e 100644 --- a/libraries/MySensors/examples/IrSensor/IrSensor.ino +++ b/libraries/MySensors/examples/IrSensor/IrSensor.ino @@ -1,9 +1,35 @@ -// Example sketch showing how to control ir devices -// An IR LED must be connected to Arduino PWM pin 3. -// An optional ir receiver can be connected to PWM pin 8. -// All receied ir signals will be sent to gateway device stored in VAR_1. -// When binary light on is clicked - sketch will send volume up ir command -// When binary light off is clicked - sketch will send volume down ir command +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + ******************************* + * + * REVISION HISTORY + * Version 1.0 - Henrik EKblad + * + * DESCRIPTION + * Example sketch showing how to control ir devices + * An IR LED must be connected to Arduino PWM pin 3. + * An optional ir receiver can be connected to PWM pin 8. + * All receied ir signals will be sent to gateway device stored in VAR_1. + * When binary light on is clicked - sketch will send volume up ir command + * When binary light off is clicked - sketch will send volume down ir command + * http://www.mysensors.org/build/ir + */ #include #include diff --git a/libraries/MySensors/examples/LightLuxSensor/LightLuxSensor.ino b/libraries/MySensors/examples/LightLuxSensor/LightLuxSensor.ino index 2896056..2b57de3 100644 --- a/libraries/MySensors/examples/LightLuxSensor/LightLuxSensor.ino +++ b/libraries/MySensors/examples/LightLuxSensor/LightLuxSensor.ino @@ -1,20 +1,41 @@ -/* - Vera Arduino BH1750FVI Light sensor - communicate using I2C Protocol - this library enable 2 slave device addresses - Main address 0x23 - secondary address 0x5C - connect the sensor as follows : - - VCC >>> 5V - Gnd >>> Gnd - ADDR >>> NC or GND - SCL >>> A5 - SDA >>> A4 - - Contribution: idefix - -*/ +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + ******************************* + * + * REVISION HISTORY + * Version 1.0 - idefix + * + * DESCRIPTION + * Arduino BH1750FVI Light sensor + * communicate using I2C Protocol + * this library enable 2 slave device addresses + * Main address 0x23 + * secondary address 0x5C + * connect the sensor as follows : + * + * VCC >>> 5V + * Gnd >>> Gnd + * ADDR >>> NC or GND + * SCL >>> A5 + * SDA >>> A4 + * http://www.mysensors.org/build/light + */ #include #include diff --git a/libraries/MySensors/examples/LightSensor/LightSensor.ino b/libraries/MySensors/examples/LightSensor/LightSensor.ino index 534f8bb..b63c96b 100644 --- a/libraries/MySensors/examples/LightSensor/LightSensor.ino +++ b/libraries/MySensors/examples/LightSensor/LightSensor.ino @@ -1,3 +1,31 @@ +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + ******************************* + * + * REVISION HISTORY + * Version 1.0 - Henrik EKblad + * + * DESCRIPTION + * Example sketch showing how to measue light level using a LM393 photo-resistor + * http://www.mysensors.org/build/light + */ + #include #include diff --git a/libraries/MySensors/examples/MAX6875TemperatureSensor/MAX6875TemperatureSensor.ino b/libraries/MySensors/examples/MAX6875TemperatureSensor/MAX6875TemperatureSensor.ino index 553b840..d153c24 100644 --- a/libraries/MySensors/examples/MAX6875TemperatureSensor/MAX6875TemperatureSensor.ino +++ b/libraries/MySensors/examples/MAX6875TemperatureSensor/MAX6875TemperatureSensor.ino @@ -1,14 +1,39 @@ -// MAX6875 Hight temperature sensor with range: -200 degC - +1300 degC -// Contribution by MrLynx -// http://forum.mysensors.org/topic/641/max6675 -// -// Connect: -// MAX6675 - Arduino -// CS0 - 4 -// SO - 3 -// SCLK - 5 -// VCC - 5V -// GND - GND +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + ******************************* + * + * REVISION HISTORY + * Version 1.0 - MrLynx + * + * DESCRIPTION + * MAX6875 High temperature sensor with range: -200 degC - +1300 degC + * http://forum.mysensors.org/topic/641/max6675 + * + * Connect MAX6675 - Arduino + * CS0 - 4 + * SO - 3 + * SCLK - 5 + * VCC - 5V + * GND - GND + * + */ + #include #include diff --git a/libraries/MySensors/examples/MQTTGateway/MQTTGateway.ino b/libraries/MySensors/examples/MQTTGateway/MQTTGateway.ino index 24e25eb..867c8be 100644 --- a/libraries/MySensors/examples/MQTTGateway/MQTTGateway.ino +++ b/libraries/MySensors/examples/MQTTGateway/MQTTGateway.ino @@ -1,60 +1,78 @@ -/* MyMQTT Broker Gateway 0.1b - -Created by Daniel Wiegert -Based on MySensors Ethernet Gateway by Henrik Ekblad -http://www.mysensors.org - -Requires MySensors lib 1.4b - -* Change below; TCP_IP, TCP_PORT, TCP_MAC -This will listen on your selected TCP_IP:TCP_PORT below, Please change TCP_MAC your liking also. -*1 -> NOTE: Keep first byte at x2, x6, xA or xE (replace x with any hex value) for using Local Ranges. - -*2 You can use standard pin set-up as MySensors recommends or if you own a IBOARD you may change - the radio-pins below if you hardware mod your iBoard. see [URL BELOW] for more details. - http://forum.mysensors.org/topic/224/iboard-cheap-single-board-ethernet-arduino-with-radio/5 - -* Don't forget to look at the definitions in libraries\MySensors\MyMQTT.h! - - define TCPDUMP and connect serial interface if you have problems, please write on - http://forum.mysensors.org/ and explain your problem, include serial output. Don't forget to - turn on DEBUG in libraries\MySensors\MyConfig.h also. - - MQTT_FIRST_SENSORID is for 'DHCP' server in MyMQTT. You may limit the ID's with FIRST and LAST definition. - If you want your manually configured below 20 set MQTT_FIRST_SENSORID to 20. - To disable: set MQTT_FIRST_SENSORID to 255. - - MQTT_BROKER_PREFIX is the leading prefix for your nodes. This can be only one char if like. - - MQTT_SEND_SUBSCRIPTION is if you want the MyMQTT to send a empty payload message to your nodes. - This can be useful if you want to send latest state back to the MQTT client. Just check if incoming - message has any length or not. - Example: if (msg.type==V_LIGHT && strlen(msg.getString())>0) otherwise the code might do strange things. - -* Address-layout is : [MQTT_BROKER_PREFIX]/[NodeID]/[SensorID]/V_[SensorType] - NodeID and SensorID is uint8 (0-255) number. - Last segment is translation of the sensor type, look inside MyMQTT.cpp for the definitions. - User can change this to their needs. We have also left some space for custom types. - -Special: (sensor 255 reserved for special commands) -You can receive a node sketch name with MyMQTT/20/255/V_Sketch_name (or version with _version) - -To-do: -Special commands : clear or set EEPROM Values, Send REBOOT and Receive reboot for MyMQTT itself. -Be able to send ACK so client returns the data being sent. -... Please come with ideas! -What to do with publish messages. - -Test in more MQTT clients, So far tested in openhab and MyMQTT for Android (Not my creation) -- http://www.openhab.org/ -- https://play.google.com/store/apps/details?id=at.tripwire.mqtt.client&hl=en -... Please notify me if you use this broker with other software. - - -* How to set-up Openhab and MQTTGateway: -http://forum.mysensors.org/topic/303/mqtt-broker-gateway - -*/ +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + ******************************* + * + * REVISION HISTORY + * Version 1.0 - Created by Daniel Wiegert + * + * DESCRIPTION + * MyMQTT Broker Gateway 0.1b + * Latest instructions found here: + * http://www.mysensors.org/build/mqtt_gateway + * http://www.mysensors.org/build/ethernet_gateway + * + * Change below; TCP_IP, TCP_PORT, TCP_MAC + * This will listen on your selected TCP_IP:TCP_PORT below, Please change TCP_MAC your liking also. + * 1 -> NOTE: Keep first byte at x2, x6, xA or xE (replace x with any hex value) for using Local Ranges. + * 2 You can use standard pin set-up as MySensors recommends or if you own a IBOARD you may change + * the radio-pins below if you hardware mod your iBoard. see [URL BELOW] for more details. + * http://forum.mysensors.org/topic/224/iboard-cheap-single-board-ethernet-arduino-with-radio/5 + * + * Don't forget to look at the definitions in MyMQTT.h! + * + * define TCPDUMP and connect serial interface if you have problems, please write on + * http://forum.mysensors.org/ and explain your problem, include serial output. Don't forget to + * turn on DEBUG in libraries\MySensors\MyConfig.h also. + * + * MQTT_FIRST_SENSORID is for 'DHCP' server in MyMQTT. You may limit the ID's with FIRST and LAST definition. + * If you want your manually configured below 20 set MQTT_FIRST_SENSORID to 20. + * To disable: set MQTT_FIRST_SENSORID to 255. + * + * MQTT_BROKER_PREFIX is the leading prefix for your nodes. This can be only one char if like. + * + * MQTT_SEND_SUBSCRIPTION is if you want the MyMQTT to send a empty payload message to your nodes. + * This can be useful if you want to send latest state back to the MQTT client. Just check if incoming + * message has any length or not. + * Example: if (msg.type==V_LIGHT && strlen(msg.getString())>0) otherwise the code might do strange things. + * + * (*) Address-layout is : [MQTT_BROKER_PREFIX]/[NodeID]/[SensorID]/V_[SensorType] + * NodeID and SensorID is uint8 (0-255) number. + * Last segment is translation of the sensor type, look inside MyMQTT.cpp for the definitions. + * User can change this to their needs. We have also left some space for custom types. + * + * Special: (sensor 255 reserved for special commands) + * You can receive a node sketch name with MyMQTT/20/255/V_Sketch_name (or version with _version) + * + * To-do: + * Special commands : clear or set EEPROM Values, Send REBOOT and Receive reboot for MyMQTT itself. + * Be able to send ACK so client returns the data being sent. + * ... Please come with ideas! + * What to do with publish messages. + * + * Test in more MQTT clients, So far tested in openhab and MyMQTT for Android (Not my creation) + * - http://www.openhab.org/ + * - https://play.google.com/store/apps/details?id=at.tripwire.mqtt.client&hl=en + * ... Please notify me if you use this broker with other software. + * + * How to set-up Openhab and MQTTGateway: + * http://forum.mysensors.org/topic/303/mqtt-broker-gateway + */ #include #include diff --git a/libraries/MySensors/examples/MotionSensor/MotionSensor.ino b/libraries/MySensors/examples/MotionSensor/MotionSensor.ino index db8373f..0c9179b 100644 --- a/libraries/MySensors/examples/MotionSensor/MotionSensor.ino +++ b/libraries/MySensors/examples/MotionSensor/MotionSensor.ino @@ -1,3 +1,32 @@ +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + ******************************* + * + * REVISION HISTORY + * Version 1.0 - Henrik Ekblad + * + * DESCRIPTION + * Motion Sensor example using HC-SR501 + * http://www.mysensors.org/build/motion + * + */ + #include #include diff --git a/libraries/MySensors/examples/MysensorMicro/MysensorMicro.ino b/libraries/MySensors/examples/MysensorMicro/MysensorMicro.ino index c25fac2..9f98b3e 100644 --- a/libraries/MySensors/examples/MysensorMicro/MysensorMicro.ino +++ b/libraries/MySensors/examples/MysensorMicro/MysensorMicro.ino @@ -1,9 +1,36 @@ -// Default sensor sketch for MySensor Micro module -// Act as a temperature / humidity sensor by default. -// -// If A0 is held low while powering on, it will enter testmode, which verifies all on-board peripherals -// -// Battery voltage is repported as child sensorId 199, as well as battery percentage +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + ******************************* + * + * REVISION HISTORY + * Version 1.0 - Thomas Bowman Mørch + * + * DESCRIPTION + * Default sensor sketch for MySensor Sensebender Micro module + * Act as a temperature / humidity sensor by default. + * + * If A0 is held low while powering on, it will enter testmode, which verifies all on-board peripherals + * + * Battery voltage is repported as child sensorId 199, as well as battery percentage + * + */ + #include diff --git a/libraries/MySensors/examples/PressureSensor/PressureSensor.ino b/libraries/MySensors/examples/PressureSensor/PressureSensor.ino index c5743e6..4c8ff9b 100644 --- a/libraries/MySensors/examples/PressureSensor/PressureSensor.ino +++ b/libraries/MySensors/examples/PressureSensor/PressureSensor.ino @@ -1,3 +1,32 @@ +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + ******************************* + * + * REVISION HISTORY + * Version 1.0 - Henrik Ekblad + * + * DESCRIPTION + * Pressure sensor example using BMP085 module + * http://www.mysensors.org/build/pressure + * + */ + #include #include #include diff --git a/libraries/MySensors/examples/RF433MhzSensor/RF433MhzSensor.ino b/libraries/MySensors/examples/RF433MhzSensor/RF433MhzSensor.ino index 682e4d7..ec21834 100644 --- a/libraries/MySensors/examples/RF433MhzSensor/RF433MhzSensor.ino +++ b/libraries/MySensors/examples/RF433MhzSensor/RF433MhzSensor.ino @@ -1,4 +1,27 @@ -/* +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + ******************************* + * + * REVISION HISTORY + * Version 1.0 - Henrik Ekblad + * + * DESCRIPTION * This sketch demonstrates how to use InterruptChain to receive and * decode remote switches (old and new) and remote sensors. * @@ -15,7 +38,6 @@ * Setup: * - connect a 433MHz receiver on digital pin 2. * - * * MySensor note: This example has not yet been adopted but can be used as an example * of receiving 433Mhz stuff. * diff --git a/libraries/MySensors/examples/RFIDLockSensor/RFIDLockSensor.ino b/libraries/MySensors/examples/RFIDLockSensor/RFIDLockSensor.ino index ecb9756..7b0880c 100644 --- a/libraries/MySensors/examples/RFIDLockSensor/RFIDLockSensor.ino +++ b/libraries/MySensors/examples/RFIDLockSensor/RFIDLockSensor.ino @@ -1,26 +1,47 @@ -/* - RFID Lock sensor/actuator - - Henrik Ekblad - - Use RFID tag to lock/unlock a door or trigger a scene on your controller. - This example sketch allows you to add an optional relay or solenoid - which can be activated/opened by RFID or controller. - - Use the I2C wiring option for your RFID module and connect to the following Arduino pins. - - RFID Arduino - ----- ------- - GND -> GND - VCC -> +5V - SCL -> A5 - SDA -> A4 - - Use normal wiring for NRF24L01 radio - - Attach a optional relay or solonoid lock to pin 4 - -*/ +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + ******************************* + * + * REVISION HISTORY + * Version 1.0 - Henrik Ekblad + * + * DESCRIPTION + * RFID Lock sensor/actuator + * + * Use RFID tag to lock/unlock a door or trigger a scene on your controller. + * This example sketch allows you to add an optional relay or solenoid + * which can be activated/opened by RFID or controller. + * + * Use the I2C wiring option for your RFID module and connect to the following Arduino pins. + * + * RFID Arduino + * ----- ------- + * GND -> GND + * VCC -> +5V + * SCL -> A5 + * SDA -> A4 + * + * Use normal wiring for NRF24L01 radio + * + * Attach a optional relay or solonoid lock to pin 4 + * http://www.mysensors.org/build/rfid + */ #include #include diff --git a/libraries/MySensors/examples/RealTimeClockDisplaySensor/RealTimeClockDisplaySensor.ino b/libraries/MySensors/examples/RealTimeClockDisplaySensor/RealTimeClockDisplaySensor.ino index 32e17fa..a4c5944 100644 --- a/libraries/MySensors/examples/RealTimeClockDisplaySensor/RealTimeClockDisplaySensor.ino +++ b/libraries/MySensors/examples/RealTimeClockDisplaySensor/RealTimeClockDisplaySensor.ino @@ -1,18 +1,43 @@ - -// Example sketch showing how to request time from controller which is stored in RTC module -// The time and temperature (DS3231/DS3232) is shown on an attached Crystal LCD display -// -// Created by Henrik Ekblad -// Inspired by Gregl - -// Wiring (radio wiring on www.mysensors.org) -// ------------------------------------ -// Arduino RTC-Module I2C Display -// ------------------------------------ -// GND GND GND -// +5V VCC VCC -// A4 SDA SDA -// A5 SCL SCL +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + ******************************* + * + * REVISION HISTORY + * Version 1.0 - Henrik Ekblad + * + * DESCRIPTION + * Example sketch showing how to request time from controller which is stored in RTC module + * The time and temperature (DS3231/DS3232) is shown on an attached Crystal LCD display + * + * + * Wiring (radio wiring on www.mysensors.org) + * ------------------------------------ + * Arduino RTC-Module I2C Display + * ------------------------------------ + * GND GND GND + * +5V VCC VCC + * A4 SDA SDA + * A5 SCL SCL + * + * http://www.mysensors.org/build/display + * + */ #include diff --git a/libraries/MySensors/examples/RelayActuator/RelayActuator.ino b/libraries/MySensors/examples/RelayActuator/RelayActuator.ino index 93e93c2..db05836 100644 --- a/libraries/MySensors/examples/RelayActuator/RelayActuator.ino +++ b/libraries/MySensors/examples/RelayActuator/RelayActuator.ino @@ -1,5 +1,31 @@ -// Example sketch showing how to control physical relays. -// This example will remember relay state even after power failure. +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + ******************************* + * + * REVISION HISTORY + * Version 1.0 - Henrik Ekblad + * + * DESCRIPTION + * Example sketch showing how to control physical relays. + * This example will remember relay state after power failure. + * http://www.mysensors.org/build/relay + */ #include #include diff --git a/libraries/MySensors/examples/RelayWithButtonActuator/RelayWithButtonActuator.ino b/libraries/MySensors/examples/RelayWithButtonActuator/RelayWithButtonActuator.ino index 7cc2a77..07781d6 100644 --- a/libraries/MySensors/examples/RelayWithButtonActuator/RelayWithButtonActuator.ino +++ b/libraries/MySensors/examples/RelayWithButtonActuator/RelayWithButtonActuator.ino @@ -1,7 +1,33 @@ -// Example sketch för a "light switch" where you can control light or something -// else from both vera and a local physical button (connected between digital -// pin 3 and GND). -// This node also works as a repeader for other nodes +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + ******************************* + * + * REVISION HISTORY + * Version 1.0 - Henrik Ekblad + * + * DESCRIPTION + * Example sketch for a "light switch" where you can control light or something + * else from both HA controller and a local physical button + * (connected between digital pin 3 and GND). + * This node also works as a repeader for other nodes + * http://www.mysensors.org/build/relay + */ #include #include diff --git a/libraries/MySensors/examples/RepeaterNode/RepeaterNode.ino b/libraries/MySensors/examples/RepeaterNode/RepeaterNode.ino index 8ada2de..223f29b 100644 --- a/libraries/MySensors/examples/RepeaterNode/RepeaterNode.ino +++ b/libraries/MySensors/examples/RepeaterNode/RepeaterNode.ino @@ -1,7 +1,32 @@ -// Example sketch showing how to create a node thay repeates messages -// from nodes far from gateway back to gateway. -// It is important that nodes that has enabled repeater mode calls -// gw.preocess() frequently. This node should never sleep. +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + ******************************* + * + * REVISION HISTORY + * Version 1.0 - Henrik Ekblad + * + * DESCRIPTION + * Example sketch showing how to create a node thay repeates messages + * from nodes far from gateway back to gateway. + * It is important that nodes that has enabled repeater mode calls + * gw.process() frequently. Repeaters should never sleep. + */ #include #include diff --git a/libraries/MySensors/examples/SecretKnockSensor/SecretKnockSensor.ino b/libraries/MySensors/examples/SecretKnockSensor/SecretKnockSensor.ino index 9f5f00f..ec2a4ef 100644 --- a/libraries/MySensors/examples/SecretKnockSensor/SecretKnockSensor.ino +++ b/libraries/MySensors/examples/SecretKnockSensor/SecretKnockSensor.ino @@ -1,28 +1,54 @@ -/* Secret Knock Sensor - - See original instructions here (note: The MySensors adopted code might differ in wiring. The instructions below is correct): - https://learn.adafruit.com/secret-knock-activated-drawer-lock/ - Version 13.10.31 Built with Arduino IDE 1.0.5 - - By Steve Hoefer http://grathio.com - Adapted to MySensors by Henrik Ekblad - - Licensed under Creative Commons Attribution-Noncommercial-Share Alike 3.0 - http://creativecommons.org/licenses/by-nc-sa/3.0/us/ - (In short: Do what you want, as long as you credit me, don't relicense it, and don't sell it or use it in anything you sell without contacting me.) - - ------Wiring------ - Pin 0: Program button used for recording a new Knock (connect Pin0 -> button -> GND) - Pin 1: Optional: Connect LED here (remember resisor in series) - Pin 2: Optional: Piezo element (for beeps). - Pin 5: A sound sensor (digital output) for sensing knocks. See MySensors purchase guide. I used this: http://rover.ebay.com/rover/1/711-53200-19255-0/1?icep_ff3=2&pub=5575069610&toolid=10001&campid=5337433187&customid=&icep_item=200941260251&ipn=psmain&icep_vectorid=229466&kwid=902099&mtid=824&kw=lg - Pin 4: Connects to either 1. Relay which open door or lock or - 2. transistor that opens a solenoid lock when HIGH (see adafruit guide for this option). - - - Connect radio according as usual(you can skip IRQ pin) - http://www.mysensors.org/build/connect_radio -*/ +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + ******************************* + * + * REVISION HISTORY + * Version 1.0 - Henrik Ekblad + * + * DESCRIPTION + * + * Secret Knock Sensor + * http://www.mysensors.org/build/knock + * + * See original instructions here (note: The MySensors adopted code might differ in wiring. The instructions below is correct): + * https://learn.adafruit.com/secret-knock-activated-drawer-lock/ + * Version 13.10.31 Built with Arduino IDE 1.0.5 + * + * By Steve Hoefer http://grathio.com + * Adapted to MySensors by Henrik Ekblad + * + * Licensed under Creative Commons Attribution-Noncommercial-Share Alike 3.0 + * http://creativecommons.org/licenses/by-nc-sa/3.0/us/ + * (In short: Do what you want, as long as you credit me, don't relicense it, and don't sell it or use it in anything you sell without contacting me.) + * + * ------Wiring------ + * Pin 0: Program button used for recording a new Knock (connect Pin0 -> button -> GND) + * Pin 1: Optional: Connect LED here (remember resisor in series) + * Pin 2: Optional: Piezo element (for beeps). + * Pin 5: A sound sensor (digital output) for sensing knocks. See MySensors purchase guide. I used this: http://rover.ebay.com/rover/1/711-53200-19255-0/1?icep_ff3=2&pub=5575069610&toolid=10001&campid=5337433187&customid=&icep_item=200941260251&ipn=psmain&icep_vectorid=229466&kwid=902099&mtid=824&kw=lg + * Pin 4: Connects to either 1. Relay which open door or lock or + * 2. transistor that opens a solenoid lock when HIGH (see adafruit guide for this option). + * + * + * Connect radio according as usual(you can skip IRQ pin) + * http://www.mysensors.org/build/connect_radio + */ #include #include diff --git a/libraries/MySensors/examples/SecureActuator/SecureActuator.ino b/libraries/MySensors/examples/SecureActuator/SecureActuator.ino index 73bf57d..cae4b81 100644 --- a/libraries/MySensors/examples/SecureActuator/SecureActuator.ino +++ b/libraries/MySensors/examples/SecureActuator/SecureActuator.ino @@ -1,5 +1,31 @@ -// Example sketch showing how to securely control locks. -// This example will remember lock state even after power failure. +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + ******************************* + * + * REVISION HISTORY + * Version 1.0 - Patrick "Anticimex" Fallberg + * + * DESCRIPTION + * Example sketch showing how to securely control locks. + * This example will remember lock state even after power failure. + */ + #define USE_SOFTWARE_ATSHA // Disable to use ATSHA204A circuit diff --git a/libraries/MySensors/examples/SerialGateway/GatewayUtil.h b/libraries/MySensors/examples/SerialGateway/GatewayUtil.h index 6f006df..532d9ca 100644 --- a/libraries/MySensors/examples/SerialGateway/GatewayUtil.h +++ b/libraries/MySensors/examples/SerialGateway/GatewayUtil.h @@ -1,3 +1,23 @@ +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + */ + #ifndef __GATEWAYUTIL_H__ #define __GATEWAYUTIL_H__ @@ -133,7 +153,7 @@ void parseAndSend(MySensor gw, char *commandBuffer) { } void setInclusionMode(boolean newMode) { - if (newMode != inclusionMode) + if (newMode != inclusionMode) { inclusionMode = newMode; // Send back mode change on serial line to ack command serial(PSTR("0;0;%d;0;%d;%d\n"), C_INTERNAL, I_INCLUSION_MODE, inclusionMode?1:0); @@ -141,6 +161,7 @@ void setInclusionMode(boolean newMode) { if (inclusionMode) { inclusionStartTime = millis(); } + } } @@ -193,3 +214,4 @@ void errBlink(uint8_t cnt) { #endif // ARDUINO #endif + diff --git a/libraries/MySensors/examples/SerialGateway/SerialGateway.ino b/libraries/MySensors/examples/SerialGateway/SerialGateway.ino index 266fdb7..9bfa910 100644 --- a/libraries/MySensors/examples/SerialGateway/SerialGateway.ino +++ b/libraries/MySensors/examples/SerialGateway/SerialGateway.ino @@ -1,10 +1,23 @@ - /* - * Copyright (C) 2013-2014 Henrik Ekblad - * +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 as published by the Free Software Foundation. - * + * + ******************************* + * * DESCRIPTION * The ArduinoGateway prints data received from sensors on the serial link. * The gateway accepts input on seral which will be sent out on radio network. @@ -12,13 +25,14 @@ * The GW code is designed for Arduino Nano 328p / 16MHz * * Wire connections (OPTIONAL): - * - Inclusion button should be connected between digital pin 3 and GND + * - Inclusion button should be connected between digital pin 3 and GND * - RX/TX/ERR leds need to be connected between +5V (anode) and digital pin 6/5/4 with resistor 270-330R in a series * * LEDs (OPTIONAL): * - RX (green) - blink fast on radio message recieved. In inclusion mode will blink fast only on presentation recieved * - TX (yellow) - blink fast on radio message transmitted. In inclusion mode will blink slowly - * - ERR (red) - fast blink on error during transmission error or recieve crc error + * - ERR (red) - fast blink on error during transmission error or recieve crc error + * */ #define NO_PORTB_PINCHANGES @@ -139,3 +153,4 @@ void serialEvent() { + diff --git a/libraries/MySensors/examples/ServoActuator/ServoActuator.ino b/libraries/MySensors/examples/ServoActuator/ServoActuator.ino index 561fc73..8092412 100644 --- a/libraries/MySensors/examples/ServoActuator/ServoActuator.ino +++ b/libraries/MySensors/examples/ServoActuator/ServoActuator.ino @@ -1,9 +1,35 @@ -// Example showing how to create an atuator for a servo. -// Connect red to +5V, Black or brown to GND and the last cable to Digital pin 3. -// The servo consumes much power and should probably have its own powersource.' -// The arduino might spontanally restart if too much power is used (happend -// to me when servo tried to pass the extreme positions = full load). -// Contribution by: Derek Macias +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + ******************************* + * + * REVISION HISTORY + * Version 1.0 - Henrik Ekblad + * Contribution by: Derek Macias + * + * DESCRIPTION + * Example showing how to create an atuator for a servo. + * Connect red to +5V, Black or brown to GND and the last cable to Digital pin 3. + * The servo consumes much power and should probably have its own powersource.' + * The arduino might spontanally restart if too much power is used (happend + * to me when servo tried to pass the extreme positions = full load). + * http://www.mysensors.org/build/servo + */ #include diff --git a/libraries/MySensors/examples/Sha204Personalizer/Sha204Personalizer.ino b/libraries/MySensors/examples/Sha204Personalizer/Sha204Personalizer.ino index 4b7017f..92acedf 100644 --- a/libraries/MySensors/examples/Sha204Personalizer/Sha204Personalizer.ino +++ b/libraries/MySensors/examples/Sha204Personalizer/Sha204Personalizer.ino @@ -1,24 +1,47 @@ -/* SHA204 personalization sketch - by: Patrick Fallberg - date: January 10, 2015 - - This sketch will write factory default settings to the configuration zone - and then lock it. - It will then either - a. Generate a random value to use as a key which will be stored in - slot 0. The key is printed on UART (115200) in clear text for the user to be - able to use it as a user-supplied key in other personalization executions - where the same key is needed. - b. Use a user-supplied value to use as a key which will be stored in - slot 0. - Finally it will lock the data zone. +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + ******************************* + * + * REVISION HISTORY + * Version 1.0 - Patrick Fallberg, January 10, 2015 + * + * DESCRIPTION + * SHA204 personalization sketch + * + * This sketch will write factory default settings to the configuration zone + * and then lock it. + * It will then either + * a. Generate a random value to use as a key which will be stored in + * slot 0. The key is printed on UART (115200) in clear text for the user to be + * able to use it as a user-supplied key in other personalization executions + * where the same key is needed. + * b. Use a user-supplied value to use as a key which will be stored in + * slot 0. + * Finally it will lock the data zone. + * + * By default, no locking is performed. User have to manually enable the flags that + * turn on the locking. Furthermore, user have to send a SPACE character on serial + * console when prompted to do any locking. On boards that does not provide UART + * input it is possible to configure the sketch to skip this confirmation. + * Default settings use ATSHA204 on pin 17 (A3). + */ - By default, no locking is performed. User have to manually enable the flags that - turn on the locking. Furthermore, user have to send a SPACE character on serial - console when prompted to do any locking. On boards that does not provide UART - input it is possible to configure the sketch to skip this confirmation. - Default settings use ATSHA204 on pin 17 (A3). -*/ #include #include diff --git a/libraries/MySensors/examples/SoilMoistSensor/SoilMoistSensor.ino b/libraries/MySensors/examples/SoilMoistSensor/SoilMoistSensor.ino index ca6249a..2a2a108 100644 --- a/libraries/MySensors/examples/SoilMoistSensor/SoilMoistSensor.ino +++ b/libraries/MySensors/examples/SoilMoistSensor/SoilMoistSensor.ino @@ -1,3 +1,31 @@ +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + ******************************* + * + * REVISION HISTORY + * Version 1.0 - Henrik Ekblad + * + * DESCRIPTION + * Example sketch sending soil moisture alarm to controller + * http://www.mysensors.org/build/moisture + */ + #include #include diff --git a/libraries/MySensors/examples/TimeAwareSensor/TimeAwareSensor.ino b/libraries/MySensors/examples/TimeAwareSensor/TimeAwareSensor.ino index ac3b0b3..7dfe1b0 100644 --- a/libraries/MySensors/examples/TimeAwareSensor/TimeAwareSensor.ino +++ b/libraries/MySensors/examples/TimeAwareSensor/TimeAwareSensor.ino @@ -1,6 +1,30 @@ +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + ******************************* + * + * REVISION HISTORY + * Version 1.0 - Henrik Ekblad + * + * DESCRIPTION + * Example sketch showing how to request time from controller. + */ -// Example sketch showing how to request time from controller. -// Created by Henrik Ekblad #include #include diff --git a/libraries/MySensors/examples/TouchDisplaySceneControllerSensor/TouchDisplaySceneControllerSensor.ino b/libraries/MySensors/examples/TouchDisplaySceneControllerSensor/TouchDisplaySceneControllerSensor.ino index 37ebf29..7a1946a 100644 --- a/libraries/MySensors/examples/TouchDisplaySceneControllerSensor/TouchDisplaySceneControllerSensor.ino +++ b/libraries/MySensors/examples/TouchDisplaySceneControllerSensor/TouchDisplaySceneControllerSensor.ino @@ -1,5 +1,28 @@ - -/* +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + ******************************* + * + * REVISION HISTORY + * Version 1.0 - Henrik Ekblad + * + * DESCRIPTION + * http://www.mysensors.org/build/scene_controller * Touch Display Scene Controller build using a touch enabled tft display * attached to a ATMega 2560. This example fetches time from controller and sends * in scene commands to the controller. diff --git a/libraries/MySensors/examples/UVSensor/UVSensor.ino b/libraries/MySensors/examples/UVSensor/UVSensor.ino index 417ae43..a00ed7f 100644 --- a/libraries/MySensors/examples/UVSensor/UVSensor.ino +++ b/libraries/MySensors/examples/UVSensor/UVSensor.ino @@ -1,22 +1,43 @@ +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + ******************************* + * + * REVISION HISTORY + * Version 1.0 - epierre + * Contribution: bulldoglowell, gizmocuz + * + * DESCRIPTION + * Arduino UVM-30A + * Index table taken from: http://www.elecrow.com/sensors-c-111/environment-c-111_112/uv-sensor-moduleuvm30a-p-716.html + * Because this table is pretty lineair, we can calculate a UVI with one decimal + * + * Connect sensor: + * + * + >>> 5V + * - >>> GND + * out >>> A0 + * + * License: Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0) + */ + #include #include -/* - Arduino UVM-30A - - connect the sensor as follows : - - + >>> 5V - - >>> GND - out >>> A0 - - Contribution: epierre, bulldoglowell, gizmocuz - - Index table taken from: http://www.elecrow.com/sensors-c-111/environment-c-111_112/uv-sensor-moduleuvm30a-p-716.html - Because this table is pretty lineair, we can calculate a UVI with one decimal - - License: Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0) -*/ - #include #include diff --git a/libraries/MySensors/examples/WaterMeterPulseSensor/WaterMeterPulseSensor.ino b/libraries/MySensors/examples/WaterMeterPulseSensor/WaterMeterPulseSensor.ino index 6e9c4ee..d676d6c 100644 --- a/libraries/MySensors/examples/WaterMeterPulseSensor/WaterMeterPulseSensor.ino +++ b/libraries/MySensors/examples/WaterMeterPulseSensor/WaterMeterPulseSensor.ino @@ -1,13 +1,37 @@ -// -// Use this sensor to measure volume and flow of your house watermeter. -// You need to set the correct pulsefactor of your meter (pulses per m3). -// The sensor starts by fetching current volume reading from gateway (VAR 1). -// Reports both volume and flow back to gateway. -// -// Unfortunately millis() won't increment when the Arduino is in -// sleepmode. So we cannot make this sensor sleep if we also want -// to calculate/report flow. -// +/** + * The MySensors Arduino library handles the wireless radio link and protocol + * between your home built sensors/actuators and HA controller of choice. + * The sensors forms a self healing radio network with optional repeaters. Each + * repeater and gateway builds a routing tables in EEPROM which keeps track of the + * network topology allowing messages to be routed to nodes. + * + * Created by Henrik Ekblad + * Copyright (C) 2013-2015 Sensnology AB + * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors + * + * Documentation: http://www.mysensors.org + * Support Forum: http://forum.mysensors.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + ******************************* + * + * REVISION HISTORY + * Version 1.0 - Henrik Ekblad + * + * DESCRIPTION + * Use this sensor to measure volume and flow of your house watermeter. + * You need to set the correct pulsefactor of your meter (pulses per m3). + * The sensor starts by fetching current volume reading from gateway (VAR 1). + * Reports both volume and flow back to gateway. + * + * Unfortunately millis() won't increment when the Arduino is in + * sleepmode. So we cannot make this sensor sleep if we also want + * to calculate/report flow. + * http://www.mysensors.org/build/pulse_water + */ #include #include