diff --git a/README.md b/README.md index 7e11f8a..e9f5ebf 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,23 @@ Author: Jannik Beyerstedt ## Dependencies -TODO: Install ESP8266 Arduino Board Support as usual. +This repository also provides a Makefile, but it does not work currently. +So the only option to compile and upload is via the Arduino IDE: +- Install ESP8266 Arduino Board Support from Boards Manager +- Select you board and upload port +- Compile and upload. (push the reset button just before the upload starts to wake the chip from deep sleep.) + + ## Settings -TODO +All configuration is currently done with preprocessor constants in the code itself. + +- `NODENAME`: User friendly name of the node (used for the influxDB measurements) +- `BOARD`: Board type (see line 17 ff.) for the right battery settings +- `DB_HOSTNAME`: Host/ domain name of your influxDB (port is fixed to 8086) +- `DB_PASSWD`: HTTP BasicAuth string used to sign in + + + +## Battery Lifespan +- ESP12: About 6 months diff --git a/esp8266-sensornode.ino b/esp8266-sensornode.ino index 245d9ae..3e9ced0 100644 --- a/esp8266-sensornode.ino +++ b/esp8266-sensornode.ino @@ -19,13 +19,14 @@ rtcStore_t rtcStore; #define BOARD_ESP07S 3 /* standalone ESP07S */ /* DEBUG SETTINGS */ -#define TEST /* use test config and database */ +// #define TEST /* use test config and database */ #define PRINT_INFO /* enable Serial debugging */ // #define PRINT_DEBUG /* enable additional debug output */ /* CONFIGURATION OPTIONS */ #ifndef NODENAME // #define NODENAME "env-huzzah-01" /* IMPORTANT: CHANGE FOR EACH DEVICE */ +// #define NODENAME "env-keller" /* IMPORTANT: CHANGE FOR EACH DEVICE */ #define NODENAME "env-TODO" /* IMPORTANT: CHANGE FOR EACH DEVICE */ #endif @@ -33,7 +34,7 @@ rtcStore_t rtcStore; #define BOARD 0 /* IMPORTANT: select one of the BOARD_* types */ #endif -#define DB_HOSTNAME "ursaminor.fra80" +#define DB_HOSTNAME "influx-iot.fra80" #define DB_PASSWD "c2Vuc29yczpTZW5zb3JzLXcuaW5mbHV4QGhvbWU" // BasicAuth String #if BOARD == BOARD_HUZZAH @@ -41,7 +42,7 @@ rtcStore_t rtcStore; #define BATT_CUTOFF 2450 /* 2500=3,0V; 3080=4,0V (Battery Voltage!!!) */ #elif BOARD == BOARD_ESP07S #define BATT_FULL 3600 -#define BATT_CUTOFF 2450 /* 2450=2,7V; 3200=3,5V (VCC Voltage) */ +#define BATT_CUTOFF 2530 /* 2450=2,7V; 3200=3,5V (VCC Voltage) */ #elif BOARD == BOARD_LOLIN #define BATT_FULL 2812 #define BATT_CUTOFF 2280 @@ -60,7 +61,7 @@ String loggerId = "esp12-"; // UID = this prefix + last 3 octets of the MAC add float tempOffset = +0.0; float humiOffset = +0.0; -const char* host = "ursaminor.fra80"; +const char* host = DB_HOSTNAME; const int httpPort = 8086; const char* wlan_ssid = "WLAN-Bey-IoT"; diff --git a/src/rtc-helpers.cpp b/rtc-helpers.cpp similarity index 100% rename from src/rtc-helpers.cpp rename to rtc-helpers.cpp