Update file headers.

This commit is contained in:
Henrik Ekblad
2015-04-08 21:14:52 +02:00
parent d2dacd8670
commit caaadf44cf
67 changed files with 1795 additions and 401 deletions
+20
View File
@@ -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 <henrik.ekblad@mysensors.org>
* 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 #ifndef MyConfig_h
#define MyConfig_h #define MyConfig_h
#include <stdint.h> #include <stdint.h>
+19
View File
@@ -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 <henrik.ekblad@mysensors.org>
* 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 "MyHw.h"
MyHw::MyHw() { MyHw::MyHw() {
+19
View File
@@ -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 <henrik.ekblad@mysensors.org>
* 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 #ifndef MyHw_h
#define MyHw_h #define MyHw_h
+19
View File
@@ -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 <henrik.ekblad@mysensors.org>
* 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 "MyHw.h"
#include "MyHwATMega328.h" #include "MyHwATMega328.h"
+19
View File
@@ -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 <henrik.ekblad@mysensors.org>
* 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 #ifndef MyHwATMega328_h
#define MyHwATMega328_h #define MyHwATMega328_h
+20
View File
@@ -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 <henrik.ekblad@mysensors.org>
* 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 "MyMessage.h"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
+18 -9
View File
@@ -1,14 +1,23 @@
/* /**
The MySensors library adds a new layer on top of the RF24 library. * The MySensors Arduino library handles the wireless radio link and protocol
It handles radio network routing, relaying and ids. * between your home built sensors/actuators and HA controller of choice.
* The sensors forms a self healing radio network with optional repeaters. Each
Created by Henrik Ekblad <henrik.ekblad@gmail.com> * repeater and gateway builds a routing tables in EEPROM which keeps track of the
* network topology allowing messages to be routed to nodes.
This program is free software; you can redistribute it and/or *
modify it under the terms of the GNU General Public License * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
version 2 as published by the Free Software Foundation. * 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 #ifndef MyMessage_h
#define MyMessage_h #define MyMessage_h
+19
View File
@@ -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 <henrik.ekblad@mysensors.org>
* 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 "MyParser.h"
MyParser::MyParser() { MyParser::MyParser() {
+19
View File
@@ -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 <henrik.ekblad@mysensors.org>
* 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 #ifndef MyParser_h
#define MyParser_h #define MyParser_h
+19
View File
@@ -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 <henrik.ekblad@mysensors.org>
* 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 "MyParser.h"
#include "MyParserSerial.h" #include "MyParserSerial.h"
#include "MyTransport.h" #include "MyTransport.h"
+19
View File
@@ -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 <henrik.ekblad@mysensors.org>
* 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 #ifndef MyParserSerial_h
#define MyParserSerial_h #define MyParserSerial_h
+20 -11
View File
@@ -1,14 +1,23 @@
/* /**
The MySensors library adds a new layer on top of the RF24 library. * The MySensors Arduino library handles the wireless radio link and protocol
It handles radio network routing, relaying and ids. * between your home built sensors/actuators and HA controller of choice.
* The sensors forms a self healing radio network with optional repeaters. Each
Created by Henrik Ekblad <henrik.ekblad@gmail.com> * repeater and gateway builds a routing tables in EEPROM which keeps track of the
* network topology allowing messages to be routed to nodes.
This program is free software; you can redistribute it and/or *
modify it under the terms of the GNU General Public License * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
version 2 as published by the Free Software Foundation. * 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" #include "MySensor.h"
#define DISTANCE_INVALID (0xFF) #define DISTANCE_INVALID (0xFF)
@@ -101,9 +110,9 @@ void MySensor::begin(void (*_msgCallback)(const MyMessage &), uint8_t _nodeId, b
if (isGateway) { if (isGateway) {
// Set configuration for gateway // Set configuration for gateway
nc.parentNodeId = 0; nc.parentNodeId = GATEWAY_ADDRESS;
nc.distance = 0; nc.distance = 0;
nc.nodeId = 0; nc.nodeId = GATEWAY_ADDRESS;
} else { } else {
// Read settings from eeprom // Read settings from eeprom
hw_readConfigBlock((void*)&nc, (void*)EEPROM_NODE_ID_ADDRESS, sizeof(NodeConfig)); hw_readConfigBlock((void*)&nc, (void*)EEPROM_NODE_ID_ADDRESS, sizeof(NodeConfig));
+18 -9
View File
@@ -1,14 +1,23 @@
/* /**
The MySensors library adds a new layer on top of the RF24 library. * The MySensors Arduino library handles the wireless radio link and protocol
It handles radio network routing, relaying and ids. * between your home built sensors/actuators and HA controller of choice.
* The sensors forms a self healing radio network with optional repeaters. Each
Created by Henrik Ekblad <henrik.ekblad@gmail.com> * repeater and gateway builds a routing tables in EEPROM which keeps track of the
* network topology allowing messages to be routed to nodes.
This program is free software; you can redistribute it and/or *
modify it under the terms of the GNU General Public License * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
version 2 as published by the Free Software Foundation. * 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 MySensor_h #ifndef MySensor_h
#define MySensor_h #define MySensor_h
+19
View File
@@ -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 <henrik.ekblad@mysensors.org>
* 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" #include "MySigning.h"
MySigning::MySigning(bool requestSignatures) : _requestSignatures(requestSignatures) { MySigning::MySigning(bool requestSignatures) : _requestSignatures(requestSignatures) {
+25 -5
View File
@@ -1,8 +1,28 @@
/* /**
The MySigning driver provides a generic API for various signing backends to offer * The MySensors Arduino library handles the wireless radio link and protocol
signing of MySensors messages. * between your home built sensors/actuators and HA controller of choice.
* The sensors forms a self healing radio network with optional repeaters. Each
Created by Patrick "Anticimex" Fallberg <patrick@fallberg.net> * 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 <henrik.ekblad@mysensors.org>
* 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 <patrick@fallberg.net>
* The MySigning driver provides a generic API for various signing backends to offer
* signing of MySensors messages.
*
*/ */
#ifndef MySigning_h #ifndef MySigning_h
#define MySigning_h #define MySigning_h
+26 -5
View File
@@ -1,9 +1,30 @@
/* /**
ATSHA204 signing backend. The Atmel ATSHA204 offers true random number generation and * The MySensors Arduino library handles the wireless radio link and protocol
HMAC-SHA256 authentication with a readout-protected key. * between your home built sensors/actuators and HA controller of choice.
* The sensors forms a self healing radio network with optional repeaters. Each
Created by Patrick "Anticimex" Fallberg <patrick@fallberg.net> * 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 <henrik.ekblad@mysensors.org>
* 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 <patrick@fallberg.net>
* ATSHA204 signing backend. The Atmel ATSHA204 offers true random number generation and
* HMAC-SHA256 authentication with a readout-protected key.
*
*/ */
#include "MySigning.h" #include "MySigning.h"
#include "MySigningAtsha204.h" #include "MySigningAtsha204.h"
+26 -5
View File
@@ -1,9 +1,30 @@
/* /**
ATSHA204 signing backend. The Atmel ATSHA204 offers true random number generation and * The MySensors Arduino library handles the wireless radio link and protocol
HMAC-SHA256 authentication with a readout-protected key. * between your home built sensors/actuators and HA controller of choice.
* The sensors forms a self healing radio network with optional repeaters. Each
Created by Patrick "Anticimex" Fallberg <patrick@fallberg.net> * 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 <henrik.ekblad@mysensors.org>
* 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 <patrick@fallberg.net>
* ATSHA204 signing backend. The Atmel ATSHA204 offers true random number generation and
* HMAC-SHA256 authentication with a readout-protected key.
*
*/ */
#ifndef MySigningAtsha204_h #ifndef MySigningAtsha204_h
#define MySigningAtsha204_h #define MySigningAtsha204_h
+29 -8
View File
@@ -1,12 +1,33 @@
/* /**
ATSHA204 emulated signing backend. The emulated ATSHA204 implementation offers pseudo random * The MySensors Arduino library handles the wireless radio link and protocol
number generation and HMAC-SHA256 authentication compatible with a "physical" ATSHA204. * between your home built sensors/actuators and HA controller of choice.
NOTE: Key is stored in clear text in the Arduino firmware. Therefore, the use of this back-end * The sensors forms a self healing radio network with optional repeaters. Each
could compromise the key used in the signed message infrastructure if device is lost and its memory * repeater and gateway builds a routing tables in EEPROM which keeps track of the
dumped. * network topology allowing messages to be routed to nodes.
*
Created by Patrick "Anticimex" Fallberg <patrick@fallberg.net> * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
* 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 <patrick@fallberg.net>
* 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 "MyConfig.h"
#include "MySigning.h" #include "MySigning.h"
#include "MySigningAtsha204Soft.h" #include "MySigningAtsha204Soft.h"
+29 -8
View File
@@ -1,12 +1,33 @@
/* /**
ATSHA204 emulated signing backend. The emulated ATSHA204 implementation offers pseudo random * The MySensors Arduino library handles the wireless radio link and protocol
number generation and HMAC-SHA256 authentication compatible with a "physical" ATSHA204. * between your home built sensors/actuators and HA controller of choice.
NOTE: Key is stored in clear text in the Arduino firmware. Therefore, the use of this back-end * The sensors forms a self healing radio network with optional repeaters. Each
could compromise the key used in the signed message infrastructure if device is lost and its memory * repeater and gateway builds a routing tables in EEPROM which keeps track of the
dumped. * network topology allowing messages to be routed to nodes.
*
Created by Patrick "Anticimex" Fallberg <patrick@fallberg.net> * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
* 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 <patrick@fallberg.net>
* 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 #ifndef MySigningHmac256Soft_h
#define MySigningHmac256Soft_h #define MySigningHmac256Soft_h
+26 -4
View File
@@ -1,8 +1,30 @@
/* /**
Disabled signing backend. Does not provide any security measures. * The MySensors Arduino library handles the wireless radio link and protocol
* between your home built sensors/actuators and HA controller of choice.
Created by Patrick "Anticimex" Fallberg <patrick@fallberg.net> * 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 <henrik.ekblad@mysensors.org>
* 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 <patrick@fallberg.net>
* Disabled signing backend. Does not provide any security measures.
*
*/ */
#include "MyConfig.h" #include "MyConfig.h"
#include "MySigning.h" #include "MySigning.h"
#include "MySigningNone.h" #include "MySigningNone.h"
+26 -4
View File
@@ -1,8 +1,30 @@
/* /**
Disabled signing backend. Does not provide any security measures. * The MySensors Arduino library handles the wireless radio link and protocol
* between your home built sensors/actuators and HA controller of choice.
Created by Patrick "Anticimex" Fallberg <patrick@fallberg.net> * 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 <henrik.ekblad@mysensors.org>
* 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 <patrick@fallberg.net>
* Disabled signing backend. Does not provide any security measures.
*
*/ */
#ifndef MySigningNone_h #ifndef MySigningNone_h
#define MySigningNone_h #define MySigningNone_h
+19
View File
@@ -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 <henrik.ekblad@mysensors.org>
* 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 "MyTransport.h"
MyTransport::MyTransport() { MyTransport::MyTransport() {
+19
View File
@@ -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 <henrik.ekblad@mysensors.org>
* 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 #ifndef MyTransport_h
#define MyTransport_h #define MyTransport_h
+19
View File
@@ -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 <henrik.ekblad@mysensors.org>
* 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 "MyTransport.h"
#include "MyTransportNRF24.h" #include "MyTransportNRF24.h"
+19
View File
@@ -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 <henrik.ekblad@mysensors.org>
* 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 #ifndef MyTransportNRF24_h
#define MyTransportNRF24_h #define MyTransportNRF24_h
+19
View File
@@ -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 <henrik.ekblad@mysensors.org>
* 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 "MyTransport.h"
#include "MyTransportRFM69.h" #include "MyTransportRFM69.h"
+19
View File
@@ -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 <henrik.ekblad@mysensors.org>
* 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 #ifndef MyTransportRF69_h
#define MyTransportRF69_h #define MyTransportRF69_h
+2 -2
View File
@@ -1,11 +1,11 @@
/*** /***
* This file defines the Sensor library version number * This file defines the Sensor library version number
* Normally, contributors should not modify this directly * 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 #ifndef Version_h
#define Version_h #define Version_h
#define LIBRARY_VERSION "1.4.1" #define LIBRARY_VERSION "1.5 b1"
#endif #endif
@@ -1,19 +1,37 @@
/* /**
Vera Arduino MQ2 * The MySensors Arduino library handles the wireless radio link and protocol
* between your home built sensors/actuators and HA controller of choice.
connect the MQ2 sensor as follows : * 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
A H A >>> 5V * network topology allowing messages to be routed to nodes.
B >>> A0 *
H >>> GND * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
B >>> 10K ohm >>> GND * Copyright (C) 2013-2015 Sensnology AB
* Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
Contribution: epierre *
Based on http://sandboxelectronics.com/?p=165 * Documentation: http://www.mysensors.org
* Support Forum: http://forum.mysensors.org
License: Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0) *
* This program is free software; you can redistribute it and/or
Modified by HEK to work in 1.4 * 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 <SPI.h> #include <SPI.h>
@@ -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 * The MySensors Arduino library handles the wireless radio link and protocol
// thread: http://forum.micasaverde.com/index.php/topic,20078.0.html * 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 <henrik.ekblad@mysensors.org>
* 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 <SPI.h> #include <SPI.h>
#include <MySensor.h> #include <MySensor.h>
@@ -1,6 +1,31 @@
// Simple binary switch example /**
// Connect button or door/window reed switch between * The MySensors Arduino library handles the wireless radio link and protocol
// digitial I/O pin 3 (BUTTON_PIN below) and GND. * 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 <henrik.ekblad@mysensors.org>
* 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 <MySensor.h> #include <MySensor.h>
#include <SPI.h> #include <SPI.h>
@@ -1,9 +1,34 @@
// Interrupt driven binary switch example with dual interrupts /**
// Author: Patrick 'Anticimex' Fallberg * The MySensors Arduino library handles the wireless radio link and protocol
// Connect one button or door/window reed switch between * between your home built sensors/actuators and HA controller of choice.
// digitial I/O pin 3 (BUTTON_PIN below) and GND and the other * The sensors forms a self healing radio network with optional repeaters. Each
// one in similar fashion on digital I/O pin 2. * repeater and gateway builds a routing tables in EEPROM which keeps track of the
// This example is designed to fit Arduino Nano/Pro Mini * network topology allowing messages to be routed to nodes.
*
* Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
* 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 <MySensor.h> #include <MySensor.h>
#include <SPI.h> #include <SPI.h>
@@ -1,6 +1,26 @@
/* /**
* 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.
* *
* This sketch clears radioId, relayId and routing info in EEPROM * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
* 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
* *
*/ */
@@ -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 <henrik.ekblad@mysensors.org>
* 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 <MySensor.h> #include <MySensor.h>
#include <SPI.h> #include <SPI.h>
#include <DallasTemperature.h> #include <DallasTemperature.h>
@@ -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 <henrik.ekblad@mysensors.org>
* 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 * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* version 2 as published by the Free Software Foundation. * 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 * DESCRIPTION
* This sketch provides a Dimmable LED Light using PWM and based Henrik Ekblad * This sketch provides a Dimmable LED Light using PWM and based Henrik Ekblad
* <henrik.ekblad@gmail.com> Vera Arduino Sensor project. * <henrik.ekblad@gmail.com> Vera Arduino Sensor project.
@@ -13,12 +32,9 @@
* to the LED negative terminal and the MOSFET Source pin is connected to ground. * 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. * This sketch is extensible to support more than one MOSFET/PWM dimmer per circuit.
* * http://www.mysensors.org/build/dimmer
* REVISION HISTORY */
* Version 1.0 - February 15, 2014 - Bruce Lacey
* Version 1.1 - August 13, 2014 - Converted to 1.4 (hek)
*
***/
#define SN "DimmableLED" #define SN "DimmableLED"
#define SV "1.1" #define SV "1.1"
@@ -1,20 +1,33 @@
/*** /**
* 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 <henrik.ekblad@mysensors.org>
* 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 * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* version 2 as published by the Free Software Foundation. * version 2 as published by the Free Software Foundation.
* *
*******************************
*
* REVISION HISTORY
* Version 1.0 - January 30, 2015 - Developed by GizMoCuz (Domoticz)
*
* DESCRIPTION * DESCRIPTION
* This sketch provides an example how to implement a Dimmable Light * This sketch provides an example how to implement a Dimmable Light
* It is pure virtual and it logs messages to the serial output * It is pure virtual and it logs messages to the serial output
* It can be used as a base sketch for actual hardware. * It can be used as a base sketch for actual hardware.
* Stores the last light state and level in eeprom. * Stores the last light state and level in eeprom.
* *
* Developed by GizMoCuz (Domoticz) */
*
* REVISION HISTORY
* Version 1.0 - January 30, 2015
*
***/
#include <SPI.h> #include <SPI.h>
#include <MySensor.h> #include <MySensor.h>
@@ -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 <henrik.ekblad@mysensors.org>
* 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 <SPI.h> #include <SPI.h>
#include <MySensor.h> #include <MySensor.h>
#include <NewPing.h> #include <NewPing.h>
@@ -1,20 +1,41 @@
/* /**
Arduino Dust Sensort * The MySensors Arduino library handles the wireless radio link and protocol
* between your home built sensors/actuators and HA controller of choice.
connect the sensor as follows : * 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
VCC >>> 5V * network topology allowing messages to be routed to nodes.
A >>> A0 *
GND >>> GND * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
* Copyright (C) 2013-2015 Sensnology AB
Based on: http://www.dfrobot.com/wiki/index.php/Sharp_GP2Y1010AU * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
Authors: Cyrille Médard de Chardon (serialC), Christophe Trefois (Trefex) *
Contribution: epierre * Documentation: http://www.mysensors.org
COnverted to 1.4 by Henrik Ekblad * Support Forum: http://forum.mysensors.org
*
The dust sensor used (see purchase guide for latest link): * This program is free software; you can redistribute it and/or
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 * 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 <MySensor.h> #include <MySensor.h>
@@ -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 MySensors Arduino library handles the wireless radio link and protocol
// The sensor starts by fetching current KWH value from gateway. * between your home built sensors/actuators and HA controller of choice.
// Reports both KWH and Watt back to gateway. * 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
// Unfortunately millis() won't increment when the Arduino is in * network topology allowing messages to be routed to nodes.
// sleepmode. So we cannot make this sensor sleep if we also want *
// to calculate/report watt-number. * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
* 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 <SPI.h> #include <SPI.h>
#include <MySensor.h> #include <MySensor.h>
@@ -1,14 +1,29 @@
/**
/* * The MySensors Arduino library handles the wireless radio link and protocol
* Copyright (C) 2013 Henrik Ekblad <henrik.ekblad@gmail.com> * 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.
* *
* Contribution by a-lurker and Anticimex, * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
* Contribution by Norbert Truchsess <norbert.truchsess@t-online.de> * 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 * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* version 2 as published by the Free Software Foundation. * 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 <norbert.truchsess@t-online.de>
*
*
* DESCRIPTION * DESCRIPTION
* The EthernetGateway sends data received from sensors to the ethernet link. * The EthernetGateway sends data received from sensors to the ethernet link.
* The gateway also accepts input on ethernet interface, which is then sent out to the radio network. * The gateway also accepts input on ethernet interface, which is then sent out to the radio network.
@@ -133,7 +133,7 @@ void parseAndSend(MySensor gw, char *commandBuffer) {
} }
void setInclusionMode(boolean newMode) { void setInclusionMode(boolean newMode) {
if (newMode != inclusionMode) if (newMode != inclusionMode) {
inclusionMode = newMode; inclusionMode = newMode;
// Send back mode change on serial line to ack command // 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); serial(PSTR("0;0;%d;0;%d;%d\n"), C_INTERNAL, I_INCLUSION_MODE, inclusionMode?1:0);
@@ -142,6 +142,7 @@ void setInclusionMode(boolean newMode) {
inclusionStartTime = millis(); inclusionStartTime = millis();
} }
} }
}
@@ -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 <henrik.ekblad@mysensors.org>
* 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 <SPI.h> #include <SPI.h>
#include <MySensor.h> #include <MySensor.h>
#include <DHT.h> #include <DHT.h>
@@ -1,9 +1,35 @@
// Example sketch showing how to control ir devices /**
// An IR LED must be connected to Arduino PWM pin 3. * The MySensors Arduino library handles the wireless radio link and protocol
// An optional ir receiver can be connected to PWM pin 8. * between your home built sensors/actuators and HA controller of choice.
// All receied ir signals will be sent to gateway device stored in VAR_1. * The sensors forms a self healing radio network with optional repeaters. Each
// When binary light on is clicked - sketch will send volume up ir command * repeater and gateway builds a routing tables in EEPROM which keeps track of the
// When binary light off is clicked - sketch will send volume down ir command * network topology allowing messages to be routed to nodes.
*
* Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
* 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 <MySensor.h> #include <MySensor.h>
#include <SPI.h> #include <SPI.h>
@@ -1,19 +1,40 @@
/* /**
Vera Arduino BH1750FVI Light sensor * The MySensors Arduino library handles the wireless radio link and protocol
communicate using I2C Protocol * between your home built sensors/actuators and HA controller of choice.
this library enable 2 slave device addresses * The sensors forms a self healing radio network with optional repeaters. Each
Main address 0x23 * repeater and gateway builds a routing tables in EEPROM which keeps track of the
secondary address 0x5C * network topology allowing messages to be routed to nodes.
connect the sensor as follows : *
* Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
VCC >>> 5V * Copyright (C) 2013-2015 Sensnology AB
Gnd >>> Gnd * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
ADDR >>> NC or GND *
SCL >>> A5 * Documentation: http://www.mysensors.org
SDA >>> A4 * Support Forum: http://forum.mysensors.org
*
Contribution: idefix * 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 <SPI.h> #include <SPI.h>
@@ -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 <henrik.ekblad@mysensors.org>
* 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 <SPI.h> #include <SPI.h>
#include <MySensor.h> #include <MySensor.h>
@@ -1,14 +1,39 @@
// MAX6875 Hight temperature sensor with range: -200 degC - +1300 degC /**
// Contribution by MrLynx * The MySensors Arduino library handles the wireless radio link and protocol
// http://forum.mysensors.org/topic/641/max6675 * between your home built sensors/actuators and HA controller of choice.
// * The sensors forms a self healing radio network with optional repeaters. Each
// Connect: * repeater and gateway builds a routing tables in EEPROM which keeps track of the
// MAX6675 - Arduino * network topology allowing messages to be routed to nodes.
// CS0 - 4 *
// SO - 3 * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
// SCLK - 5 * Copyright (C) 2013-2015 Sensnology AB
// VCC - 5V * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
// GND - GND *
* 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 <MySensor.h> #include <MySensor.h>
#include <MAX6675.h> #include <MAX6675.h>
@@ -1,59 +1,77 @@
/* MyMQTT Broker Gateway 0.1b /**
* The MySensors Arduino library handles the wireless radio link and protocol
Created by Daniel Wiegert <daniel.wiegert@gmail.com> * between your home built sensors/actuators and HA controller of choice.
Based on MySensors Ethernet Gateway by Henrik Ekblad <henrik.ekblad@gmail.com> * The sensors forms a self healing radio network with optional repeaters. Each
http://www.mysensors.org * repeater and gateway builds a routing tables in EEPROM which keeps track of the
* network topology allowing messages to be routed to nodes.
Requires MySensors lib 1.4b *
* Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
* 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 <daniel.wiegert@gmail.com>
*
* 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 * 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. * 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. * 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 * 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. * 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 * 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! * Don't forget to look at the definitions in MyMQTT.h!
*
define TCPDUMP and connect serial interface if you have problems, please write on * 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 * http://forum.mysensors.org/ and explain your problem, include serial output. Don't forget to
turn on DEBUG in libraries\MySensors\MyConfig.h also. * 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. * 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. * If you want your manually configured below 20 set MQTT_FIRST_SENSORID to 20.
To disable: set MQTT_FIRST_SENSORID to 255. * 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_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. * 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 * 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. * message has any length or not.
Example: if (msg.type==V_LIGHT && strlen(msg.getString())>0) otherwise the code might do strange things. * 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] * (*) Address-layout is : [MQTT_BROKER_PREFIX]/[NodeID]/[SensorID]/V_[SensorType]
NodeID and SensorID is uint8 (0-255) number. * NodeID and SensorID is uint8 (0-255) number.
Last segment is translation of the sensor type, look inside MyMQTT.cpp for the definitions. * 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. * User can change this to their needs. We have also left some space for custom types.
*
Special: (sensor 255 reserved for special commands) * 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) * You can receive a node sketch name with MyMQTT/20/255/V_Sketch_name (or version with _version)
*
To-do: * To-do:
Special commands : clear or set EEPROM Values, Send REBOOT and Receive reboot for MyMQTT itself. * 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. * Be able to send ACK so client returns the data being sent.
... Please come with ideas! * ... Please come with ideas!
What to do with publish messages. * What to do with publish messages.
*
Test in more MQTT clients, So far tested in openhab and MyMQTT for Android (Not my creation) * Test in more MQTT clients, So far tested in openhab and MyMQTT for Android (Not my creation)
- http://www.openhab.org/ * - http://www.openhab.org/
- https://play.google.com/store/apps/details?id=at.tripwire.mqtt.client&hl=en * - 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. * ... Please notify me if you use this broker with other software.
*
* How to set-up Openhab and MQTTGateway: * How to set-up Openhab and MQTTGateway:
http://forum.mysensors.org/topic/303/mqtt-broker-gateway * http://forum.mysensors.org/topic/303/mqtt-broker-gateway
*/ */
#include <DigitalIO.h> #include <DigitalIO.h>
@@ -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 <henrik.ekblad@mysensors.org>
* 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 <MySensor.h> #include <MySensor.h>
#include <SPI.h> #include <SPI.h>
@@ -1,9 +1,36 @@
// Default sensor sketch for MySensor Micro module /**
// Act as a temperature / humidity sensor by default. * The MySensors Arduino library handles the wireless radio link and protocol
// * between your home built sensors/actuators and HA controller of choice.
// If A0 is held low while powering on, it will enter testmode, which verifies all on-board peripherals * 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
// Battery voltage is repported as child sensorId 199, as well as battery percentage * network topology allowing messages to be routed to nodes.
*
* Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
* 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 <MySensor.h> #include <MySensor.h>
@@ -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 <henrik.ekblad@mysensors.org>
* 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 <SPI.h> #include <SPI.h>
#include <MySensor.h> #include <MySensor.h>
#include <Wire.h> #include <Wire.h>
@@ -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 <henrik.ekblad@mysensors.org>
* 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 * This sketch demonstrates how to use InterruptChain to receive and
* decode remote switches (old and new) and remote sensors. * decode remote switches (old and new) and remote sensors.
* *
@@ -15,7 +38,6 @@
* Setup: * Setup:
* - connect a 433MHz receiver on digital pin 2. * - connect a 433MHz receiver on digital pin 2.
* *
*
* MySensor note: This example has not yet been adopted but can be used as an example * MySensor note: This example has not yet been adopted but can be used as an example
* of receiving 433Mhz stuff. * of receiving 433Mhz stuff.
* *
@@ -1,25 +1,46 @@
/* /**
RFID Lock sensor/actuator * The MySensors Arduino library handles the wireless radio link and protocol
* between your home built sensors/actuators and HA controller of choice.
Henrik Ekblad <henrik.ekblad@mysensors.org> * 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
Use RFID tag to lock/unlock a door or trigger a scene on your controller. * network topology allowing messages to be routed to nodes.
This example sketch allows you to add an optional relay or solenoid *
which can be activated/opened by RFID or controller. * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
* Copyright (C) 2013-2015 Sensnology AB
Use the I2C wiring option for your RFID module and connect to the following Arduino pins. * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
*
RFID Arduino * Documentation: http://www.mysensors.org
----- ------- * Support Forum: http://forum.mysensors.org
GND -> GND *
VCC -> +5V * This program is free software; you can redistribute it and/or
SCL -> A5 * modify it under the terms of the GNU General Public License
SDA -> A4 * version 2 as published by the Free Software Foundation.
*
Use normal wiring for NRF24L01 radio *******************************
*
Attach a optional relay or solonoid lock to pin 4 * 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 <MySensor.h> #include <MySensor.h>
@@ -1,18 +1,43 @@
/**
// Example sketch showing how to request time from controller which is stored in RTC module * The MySensors Arduino library handles the wireless radio link and protocol
// The time and temperature (DS3231/DS3232) is shown on an attached Crystal LCD display * between your home built sensors/actuators and HA controller of choice.
// * The sensors forms a self healing radio network with optional repeaters. Each
// Created by Henrik Ekblad <henrik.ekblad@mysensors.org> * repeater and gateway builds a routing tables in EEPROM which keeps track of the
// Inspired by Gregl * network topology allowing messages to be routed to nodes.
*
// Wiring (radio wiring on www.mysensors.org) * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
// ------------------------------------ * Copyright (C) 2013-2015 Sensnology AB
// Arduino RTC-Module I2C Display * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
// ------------------------------------ *
// GND GND GND * Documentation: http://www.mysensors.org
// +5V VCC VCC * Support Forum: http://forum.mysensors.org
// A4 SDA SDA *
// A5 SCL SCL * 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 <SPI.h> #include <SPI.h>
@@ -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 <henrik.ekblad@mysensors.org>
* 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 <MySigningNone.h> #include <MySigningNone.h>
#include <MyTransportNRF24.h> #include <MyTransportNRF24.h>
@@ -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 * The MySensors Arduino library handles the wireless radio link and protocol
// pin 3 and GND). * between your home built sensors/actuators and HA controller of choice.
// This node also works as a repeader for other nodes * 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 <henrik.ekblad@mysensors.org>
* 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 <MySensor.h> #include <MySensor.h>
#include <SPI.h> #include <SPI.h>
@@ -1,7 +1,32 @@
// Example sketch showing how to create a node thay repeates messages /**
// from nodes far from gateway back to gateway. * The MySensors Arduino library handles the wireless radio link and protocol
// It is important that nodes that has enabled repeater mode calls * between your home built sensors/actuators and HA controller of choice.
// gw.preocess() frequently. This node should never sleep. * 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 <henrik.ekblad@mysensors.org>
* 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 <MySensor.h> #include <MySensor.h>
#include <SPI.h> #include <SPI.h>
@@ -1,27 +1,53 @@
/* Secret Knock Sensor /**
* The MySensors Arduino library handles the wireless radio link and protocol
See original instructions here (note: The MySensors adopted code might differ in wiring. The instructions below is correct): * between your home built sensors/actuators and HA controller of choice.
https://learn.adafruit.com/secret-knock-activated-drawer-lock/ * The sensors forms a self healing radio network with optional repeaters. Each
Version 13.10.31 Built with Arduino IDE 1.0.5 * repeater and gateway builds a routing tables in EEPROM which keeps track of the
* network topology allowing messages to be routed to nodes.
By Steve Hoefer http://grathio.com *
Adapted to MySensors by Henrik Ekblad * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
* Copyright (C) 2013-2015 Sensnology AB
Licensed under Creative Commons Attribution-Noncommercial-Share Alike 3.0 * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
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.) * Documentation: http://www.mysensors.org
* Support Forum: http://forum.mysensors.org
------Wiring------ *
Pin 0: Program button used for recording a new Knock (connect Pin0 -> button -> GND) * This program is free software; you can redistribute it and/or
Pin 1: Optional: Connect LED here (remember resisor in series) * modify it under the terms of the GNU General Public License
Pin 2: Optional: Piezo element (for beeps). * version 2 as published by the Free Software Foundation.
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). *
* REVISION HISTORY
* Version 1.0 - Henrik Ekblad
Connect radio according as usual(you can skip IRQ pin) *
http://www.mysensors.org/build/connect_radio * 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 <MySensor.h> #include <MySensor.h>
@@ -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 <henrik.ekblad@mysensors.org>
* 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 <patrick@fallberg.net>
*
* 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 #define USE_SOFTWARE_ATSHA // Disable to use ATSHA204A circuit
@@ -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 <henrik.ekblad@mysensors.org>
* 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__ #ifndef __GATEWAYUTIL_H__
#define __GATEWAYUTIL_H__ #define __GATEWAYUTIL_H__
@@ -133,7 +153,7 @@ void parseAndSend(MySensor gw, char *commandBuffer) {
} }
void setInclusionMode(boolean newMode) { void setInclusionMode(boolean newMode) {
if (newMode != inclusionMode) if (newMode != inclusionMode) {
inclusionMode = newMode; inclusionMode = newMode;
// Send back mode change on serial line to ack command // 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); serial(PSTR("0;0;%d;0;%d;%d\n"), C_INTERNAL, I_INCLUSION_MODE, inclusionMode?1:0);
@@ -142,6 +162,7 @@ void setInclusionMode(boolean newMode) {
inclusionStartTime = millis(); inclusionStartTime = millis();
} }
} }
}
@@ -193,3 +214,4 @@ void errBlink(uint8_t cnt) {
#endif // ARDUINO #endif // ARDUINO
#endif #endif
@@ -1,10 +1,23 @@
/* /**
* Copyright (C) 2013-2014 Henrik Ekblad <henrik.ekblad@gmail.com> * 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 <henrik.ekblad@mysensors.org>
* 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 * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* version 2 as published by the Free Software Foundation. * version 2 as published by the Free Software Foundation.
* *
*******************************
*
* DESCRIPTION * DESCRIPTION
* The ArduinoGateway prints data received from sensors on the serial link. * 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. * The gateway accepts input on seral which will be sent out on radio network.
@@ -19,6 +32,7 @@
* - RX (green) - blink fast on radio message recieved. In inclusion mode will blink fast only on presentation recieved * - 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 * - 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 #define NO_PORTB_PINCHANGES
@@ -139,3 +153,4 @@ void serialEvent() {
@@ -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 MySensors Arduino library handles the wireless radio link and protocol
// The servo consumes much power and should probably have its own powersource.' * between your home built sensors/actuators and HA controller of choice.
// The arduino might spontanally restart if too much power is used (happend * The sensors forms a self healing radio network with optional repeaters. Each
// to me when servo tried to pass the extreme positions = full load). * repeater and gateway builds a routing tables in EEPROM which keeps track of the
// Contribution by: Derek Macias * network topology allowing messages to be routed to nodes.
*
* Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
* 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 <MySensor.h> #include <MySensor.h>
@@ -1,24 +1,47 @@
/* SHA204 personalization sketch /**
by: Patrick Fallberg * The MySensors Arduino library handles the wireless radio link and protocol
date: January 10, 2015 * between your home built sensors/actuators and HA controller of choice.
* The sensors forms a self healing radio network with optional repeaters. Each
This sketch will write factory default settings to the configuration zone * repeater and gateway builds a routing tables in EEPROM which keeps track of the
and then lock it. * network topology allowing messages to be routed to nodes.
It will then either *
a. Generate a random value to use as a key which will be stored in * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
slot 0. The key is printed on UART (115200) in clear text for the user to be * Copyright (C) 2013-2015 Sensnology AB
able to use it as a user-supplied key in other personalization executions * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
where the same key is needed. *
b. Use a user-supplied value to use as a key which will be stored in * Documentation: http://www.mysensors.org
slot 0. * Support Forum: http://forum.mysensors.org
Finally it will lock the data zone. *
* This program is free software; you can redistribute it and/or
By default, no locking is performed. User have to manually enable the flags that * modify it under the terms of the GNU General Public License
turn on the locking. Furthermore, user have to send a SPACE character on serial * version 2 as published by the Free Software Foundation.
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). *
* 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).
*/ */
#include <sha204_library.h> #include <sha204_library.h>
#include <sha204_lib_return_codes.h> #include <sha204_lib_return_codes.h>
@@ -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 <henrik.ekblad@mysensors.org>
* 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 <SPI.h> #include <SPI.h>
#include <MySensor.h> #include <MySensor.h>
@@ -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 <henrik.ekblad@mysensors.org>
* 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 <henrik.ekblad@mysensors.org>
#include <SPI.h> #include <SPI.h>
#include <MySensor.h> #include <MySensor.h>
@@ -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 <henrik.ekblad@mysensors.org>
* 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 * Touch Display Scene Controller build using a touch enabled tft display
* attached to a ATMega 2560. This example fetches time from controller and sends * attached to a ATMega 2560. This example fetches time from controller and sends
* in scene commands to the controller. * in scene commands to the controller.
@@ -1,22 +1,43 @@
#include <SPI.h> /**
#include <MySensor.h> * The MySensors Arduino library handles the wireless radio link and protocol
/* * between your home built sensors/actuators and HA controller of choice.
Arduino UVM-30A * 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
connect the sensor as follows : * network topology allowing messages to be routed to nodes.
*
+ >>> 5V * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
- >>> GND * Copyright (C) 2013-2015 Sensnology AB
out >>> A0 * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
*
Contribution: epierre, bulldoglowell, gizmocuz * Documentation: http://www.mysensors.org
* Support Forum: http://forum.mysensors.org
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 * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
License: Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0) * 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 <SPI.h>
#include <MySensor.h>
#include <MySensor.h> #include <MySensor.h>
#include <SPI.h> #include <SPI.h>
@@ -1,13 +1,37 @@
// /**
// Use this sensor to measure volume and flow of your house watermeter. * The MySensors Arduino library handles the wireless radio link and protocol
// You need to set the correct pulsefactor of your meter (pulses per m3). * between your home built sensors/actuators and HA controller of choice.
// The sensor starts by fetching current volume reading from gateway (VAR 1). * The sensors forms a self healing radio network with optional repeaters. Each
// Reports both volume and flow back to gateway. * repeater and gateway builds a routing tables in EEPROM which keeps track of the
// * network topology allowing messages to be routed to nodes.
// Unfortunately millis() won't increment when the Arduino is in *
// sleepmode. So we cannot make this sensor sleep if we also want * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
// to calculate/report flow. * 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 <SPI.h> #include <SPI.h>
#include <MySensor.h> #include <MySensor.h>