Merge branch 'master' into development

This commit is contained in:
Henrik Ekblad
2014-09-16 22:19:21 +02:00
54 changed files with 603 additions and 3812 deletions
@@ -83,6 +83,7 @@ void loop()
} else if (sendTime && !pcReceived) {
// No count received. Try requesting it again
gw.request(CHILD_ID, V_VAR1);
lastSend=now;
}
if (SLEEP_MODE) {
@@ -14,11 +14,15 @@
*
* The GW code is designed for Arduino 328p / 16MHz. ATmega168 does not have enough memory to run this program.
*
* COMPILING
* You must make sure to disable DEBUG in Sensor.h before compiling this sketch. Othervise the sketch won't fit in program space when downloading.
* For UIPEthernet(ENC28J60) usage: Note that I had to disable UDP and DHCP support in uipethernet-conf.h to reduce space. (which meas you ave to choose a static IP)
* For WizNET usage: Do *not* install the provided UIPEthernet-library. Remove UIPEthernet-include below and uncomment the Ethernet.h.
* COMPILING ENC28J60
* > Use Arduino IDE 1.5.7 (or later)
* > Disable DEBUG in Sensor.h before compiling this sketch. Othervise the sketch will probably not fit in program space when downloading.
* > Remove Ethernet.h include below and inlcude UIPEthernet.h
* COMPILING WizNET (W5100)
* > Remove UIPEthernet include below and include Ethernet.h.
*
* Note that I had to disable UDP and DHCP support in uipethernet-conf.h to reduce space. (which meas you ave to choose a static IP for that module)
* VERA CONFIGURATION:
* Enter "ip-number:port" in the ip-field of the Arduino GW device. This will temporarily override any serial configuration for the Vera plugin.
* E.g. If you want to use the defualt values in this sketch enter: 192.168.178.66:5003
@@ -54,10 +58,10 @@
// Use this if you have attached a Ethernet ENC28J60 shields
//#include <UIPEthernet.h>
#include <UIPEthernet.h>
// Use this fo WizNET module and Arduino Ethernet Shield
#include <Ethernet.h>
//#include <Ethernet.h>
#define INCLUSION_MODE_TIME 1 // Number of minutes inclusion mode is enabled
@@ -75,7 +79,7 @@ MySensor gw(RADIO_CE_PIN, RADIO_SPI_SS_PIN);
#define IP_PORT 5003 // The port you want to open
IPAddress myIp (192, 168, 178, 66); // Configure your static ip-address here
IPAddress myIp (192, 168, 178, 66); // Configure your static ip-address here COMPILE ERROR HERE? Use Arduino IDE 1.5.7 or later!
// The MAC address can be anything you want but should be unique on your network.
// Newer boards have a MAC address printed on the underside of the PCB, which you can (optionally) use.
@@ -97,9 +97,10 @@ void loop()
}
}
lastSend = currentTime;
} else if (sendTime) {
} else if (sendTime && !pcReceived) {
// No count received. Try requesting it again
gw.request(CHILD_ID, V_VAR1);
lastSend=currentTime;
}
if (SLEEP_MODE) {