- [iTead Sonoff TH10/TH16 with temperature sensor](https://www.itead.cc/smart-home/sonoff-th.html)
- [iTead Sonoff Dual (R2)](https://www.itead.cc/smart-home/sonoff-dual.html)
-- [iTead Sonoff Pow](https://www.itead.cc/smart-home/sonoff-pow.html)
-- [iTead Sonoff 4CH](https://www.itead.cc/smart-home/sonoff-4ch.html)
-- [iTead Sonoff 4CH Pro](https://www.itead.cc/smart-home/sonoff-4ch-pro.html)
+- [iTead Sonoff Pow with Energy Monitoring](https://www.itead.cc/smart-home/sonoff-pow.html)
+- [iTead Sonoff Pow R2 with Energy Monitoring](https://www.itead.cc/sonoff-pow-r2.html)
+- [iTead Sonoff 4CH (R2)](https://www.itead.cc/smart-home/sonoff-4ch.html)
+- [iTead Sonoff 4CH Pro (R2)](https://www.itead.cc/smart-home/sonoff-4ch-pro.html)
- [iTead S20 Smart Socket](https://www.itead.cc/smart-socket.html)
- [Sonoff S22 Smart Socket](https://github.com/arendst/Sonoff-Tasmota/issues/627)
- [iTead Sonoff S31 Smart Socket with Energy Monitoring](https://www.itead.cc/sonoff-s31.html)
@@ -49,7 +52,7 @@ The following devices are supported:
- [iTead Sonoff Touch](https://www.itead.cc/sonoff-touch.html)
- [iTead Sonoff T1](https://www.itead.cc/sonoff-t1.html)
- [iTead Sonoff SC](https://www.itead.cc/sonoff-sc.html)
-- [iTead Sonoff Led](https://www.itead.cc/sonoff-led.html)
+- [iTead Sonoff Led](https://www.itead.cc/sonoff-led.html)
- [iTead Sonoff BN-SZ01 Ceiling Led](https://www.itead.cc/bn-sz01.html)
- [iTead Sonoff B1](https://www.itead.cc/sonoff-b1.html)
- [iTead Sonoff RF Bridge 433](https://www.itead.cc/sonoff-rf-bridge-433.html)
@@ -63,17 +66,126 @@ The following devices are supported:
- AriLux AL-LC01, AL-LC06 and AL-LC11 PWM LED controller
- [Supla device - Espablo-inCan mod. for electrical Installation box](https://forum.supla.org/viewtopic.php?f=33&t=2188)
- [Luani HVIO board](https://luani.de/projekte/esp8266-hvio/)
-- Wemos D1 mini and NodeMcu
+- Wemos D1 mini, NodeMcu and Ledunia
+
+### Firmware release information
+Different firmware images are released based on Features and Sensors selection guided by code and memory usage.
+
+- The Minimal version allows intermediate OTA uploads to support larger versions and does NOT change any persistent parameter.
+- The Classic version allows single OTA uploads as did the previous Sonoff-Tasmota versions.
+
+#### Available Features and Sensors
+
+| Feature or Sensor | sonoff | classic | minimal | knx | allsensors |
+|--------------------------------|--------|---------|---------|-----|------------|
+| MY_LANGUAGE en-GB | x | x | x | x | x |
+| MQTT_LIBRARY_TYPE PUBSUBCLIENT | x | x | x | x | x |
+| USE_DOMOTICZ | x | x | - | x | x |
+| USE_HOME_ASSISTANT | x | x | - | x | x |
+| USE_MQTT_TLS | - | - | - | - | - |
+| USE_KNX | - | - | - | x | - |
+| USE_WEBSERVER | x | x | x | x | x |
+| USE_EMULATION | x | x | - | - | x |
+| USE_DISCOVERY | x | x | - | x | x |
+| WEBSERVER_ADVERTISE | x | x | - | x | x |
+| MQTT_HOST_DISCOVERY | x | x | - | x | x |
+| USE_TIMERS | x | - | - | x | x |
+| USE_TIMERS_WEB | x | - | - | x | x |
+| USE_SUNRISE | x | - | - | x | x |
+| USE_RULES | x | - | - | x | x |
+| | | | | | |
+| USE_ADC_VCC | x | x | x | x | x |
+| USE_DS18B20 | x | x | - | x | - |
+| USE_DS18x20 | - | - | - | - | x |
+| USE_DS18x20_LEGACY | - | - | - | - | - |
+| USE_I2C | x | x | - | x | x |
+| USE_SHT | x | x | - | x | x |
+| USE_SHT3X | x | x | - | x | x |
+| USE_HTU | x | x | - | x | x |
+| USE_BMP | x | x | - | x | x |
+| USE_BME680 | - | - | - | - | x |
+| USE_SGP30 | x | - | - | x | x |
+| USE_BH1750 | x | x | - | x | x |
+| USE_VEML6070 | - | - | - | - | x |
+| USE_TSL2561 | - | - | - | - | x |
+| USE_ADS1115 | - | - | - | - | x |
+| USE_ADS1115_I2CDEV | - | - | - | - | - |
+| USE_INA219 | - | - | - | - | x |
+| USE_MGS | - | - | - | - | x |
+| USE_SPI | - | - | - | - | - |
+| USE_MHZ19 | x | x | - | x | x |
+| USE_SENSEAIR | x | x | - | x | x |
+| USE_PMS5003 | x | x | - | x | x |
+| USE_NOVA_SDS | x | - | - | x | x |
+| USE_PZEM004T | x | x | - | x | x |
+| USE_SERIAL_BRIDGE | x | - | - | x | x |
+| USE_IR_REMOTE | x | x | - | x | x |
+| USE_IR_HVAC | - | - | - | - | x |
+| USE_IR_RECEIVE | x | - | - | x | x |
+| USE_WS2812 | x | x | - | x | x |
+| USE_WS2812_DMA | - | - | - | - | - |
+| USE_ARILUX_RF | x | x | - | x | x |
+| USE_SR04 | x | - | - | x | x |
+
+#### Typical file size
+
+| ESP/Arduino library version | sonoff | classic | minimal | knx | allsensors |
+|--------------------------------|--------|---------|---------|------|------------|
+| ESP/Arduino lib v2.3.0 | 526k | 488k | 427k | 535k | 549k |
+| ESP/Arduino lib v2.4.0 | 531k | 496k | 435k | 540k | 552k |
+| ESP/Arduino lib v2.4.1 | 534k | 499k | 437k | 543k | 555k |
### Contribute
-
You can contribute to Sonoff-Tasmota by
- providing Pull Requests (Features, Proof of Concepts, Language files or Fixes)
- testing new released features and report issues
-- donating to acquire hardware for testing and implementating or out of gratitude
+- donating to acquire hardware for testing and implementing or out of gratitude
[](https://paypal.me/tasmota)
+### Credits
+
+#### Libraries used
+Libraries used with Sonoff-Tasmota are:
+- [ESP8266 core for Arduino](https://github.com/esp8266/Arduino)
+- [Adafruit BME680](https://github.com/adafruit/Adafruit_BME680)
+- [Adafruit Sensor](https://github.com/adafruit/Adafruit_Sensor)
+- [Adafruit SGP30](https://github.com/adafruit/Adafruit_SGP30)
+- [ArduinoJson](https://arduinojson.org/)
+- [Esp8266MqttClient](https://github.com/tuanpmt/ESP8266MQTTClient)
+- [esp-knx-ip](https://github.com/envy/esp-knx-ip)
+- [esp-mqtt-arduino](https://github.com/i-n-g-o/esp-mqtt-arduino)
+- [I2Cdevlib](https://github.com/jrowberg/i2cdevlib)
+- [IRremoteEsp8266](https://github.com/markszabo/IRremoteESP8266)
+- [JobaTsl2561](https://github.com/joba-1/Joba_Tsl2561)
+- [MultiChannelGasSensor](http://wiki.seeedstudio.com/Grove-Multichannel_Gas_Sensor/)
+- [NeoPixelBus](https://github.com/Makuna/NeoPixelBus)
+- [OneWire](https://github.com/PaulStoffregen/OneWire)
+- [PubSubClient](https://github.com/knolleary/pubsubclient)
+
+#### People inspiring me
+People helping to keep the show on the road:
+- David Lang providing initial issue resolution and code optimizations
+- Heiko Krupp for his IRSend, HTU21, SI70xx and Wemo/Hue emulation drivers
+- Wiktor Schmidt for Travis CI implementation
+- Thom Dietrich for PlatformIO optimizations
+- Marinus van den Broek for his EspEasy groundwork
+- Pete Ba for more user friendly energy monitor calibration
+- Lobradov providing compile optimization tips
+- Flexiti for his initial timer implementation
+- reloxx13 for his [SonWeb](https://github.com/reloxx13/SonWEB) management tool
+- Joachim Banzhaf for his TSL2561 library and driver
+- Gijs Noorlander for his MHZ19 and SenseAir drivers
+- Emontnemery for his HomeAssistant Discovery concept and many code tuning tips
+- Aidan Mountford for his HSB support
+- Daniel Ztolnai for his Serial Bridge implementation
+- Gerhard Mutz for his SGP30 and Sunrise/Sunset driver
+- Nuno Ferreira for his HC-SR04 driver
+- Adrian Scillato for his (security)fixes and implementing and maintaining KNX
+- Raymond Mouthaan for managing Wemos Wiki information
+- Norbert Richter, Frogmore42 and Jason2866 for providing many issue answers
+- Many more providing Tips, Pocs or PRs
+
### License
-This program is licensed under GPL-3.0
\ No newline at end of file
+This program is licensed under GPL-3.0
diff --git a/lib/TSL2561-Arduino-Library/.github/ISSUE_TEMPLATE.md b/lib/Adafruit_SGP30-1.0.0.13/.github/ISSUE_TEMPLATE.md
similarity index 100%
rename from lib/TSL2561-Arduino-Library/.github/ISSUE_TEMPLATE.md
rename to lib/Adafruit_SGP30-1.0.0.13/.github/ISSUE_TEMPLATE.md
diff --git a/lib/TSL2561-Arduino-Library/.github/PULL_REQUEST_TEMPLATE.md b/lib/Adafruit_SGP30-1.0.0.13/.github/PULL_REQUEST_TEMPLATE.md
similarity index 100%
rename from lib/TSL2561-Arduino-Library/.github/PULL_REQUEST_TEMPLATE.md
rename to lib/Adafruit_SGP30-1.0.0.13/.github/PULL_REQUEST_TEMPLATE.md
diff --git a/lib/Adafruit_SGP30-1.0.0.13/.gitignore b/lib/Adafruit_SGP30-1.0.0.13/.gitignore
new file mode 100644
index 000000000..7f189125f
--- /dev/null
+++ b/lib/Adafruit_SGP30-1.0.0.13/.gitignore
@@ -0,0 +1,4 @@
+*~
+Doxyfile*
+doxygen_sqlite3.db
+html
\ No newline at end of file
diff --git a/lib/Adafruit_SGP30-1.0.0.13/.travis.yml b/lib/Adafruit_SGP30-1.0.0.13/.travis.yml
new file mode 100644
index 000000000..428f3434e
--- /dev/null
+++ b/lib/Adafruit_SGP30-1.0.0.13/.travis.yml
@@ -0,0 +1,27 @@
+language: c
+sudo: false
+
+# Blacklist
+branches:
+ except:
+ - gh-pages
+
+env:
+ global:
+ - PRETTYNAME="Adafruit SGP30 Arduino Library"
+# Optional, will default to "$TRAVIS_BUILD_DIR/Doxyfile"
+# - DOXYFILE: $TRAVIS_BUILD_DIR/Doxyfile
+
+before_install:
+ - source <(curl -SLs https://raw.githubusercontent.com/adafruit/travis-ci-arduino/master/install.sh)
+
+#install:
+# - arduino --install-library "Adafruit ILI9341","Adafruit GFX Library"
+
+script:
+ - build_main_platforms
+
+# Generate and deploy documentation
+after_success:
+ - source <(curl -SLs https://raw.githubusercontent.com/adafruit/travis-ci-arduino/master/library_check.sh)
+ - source <(curl -SLs https://raw.githubusercontent.com/adafruit/travis-ci-arduino/master/doxy_gen_and_deploy.sh)
\ No newline at end of file
diff --git a/lib/Adafruit_SGP30-1.0.0.13/Adafruit_SGP30.cpp b/lib/Adafruit_SGP30-1.0.0.13/Adafruit_SGP30.cpp
new file mode 100644
index 000000000..b2ccbe8da
--- /dev/null
+++ b/lib/Adafruit_SGP30-1.0.0.13/Adafruit_SGP30.cpp
@@ -0,0 +1,243 @@
+/*!
+ * @file Adafruit_SGP30.cpp
+ *
+ * @mainpage Adafruit SGP30 gas sensor driver
+ *
+ * @section intro_sec Introduction
+ *
+ * This is the documentation for Adafruit's SGP30 driver for the
+ * Arduino platform. It is designed specifically to work with the
+ * Adafruit SGP30 breakout: http://www.adafruit.com/products/3709
+ *
+ * These sensors use I2C to communicate, 2 pins (SCL+SDA) are required
+ * to interface with the breakout.
+ *
+ * Adafruit invests time and resources providing this open source code,
+ * please support Adafruit and open-source hardware by purchasing
+ * products from Adafruit!
+ *
+ *
+ * @section author Author
+ * Written by Ladyada for Adafruit Industries.
+ *
+ * @section license License
+ * BSD license, all text here must be included in any redistribution.
+ *
+ */
+
+
+#if ARDUINO >= 100
+ #include "Arduino.h"
+#else
+ #include "WProgram.h"
+#endif
+
+#include "Adafruit_SGP30.h"
+
+//#define I2C_DEBUG
+
+/**************************************************************************/
+/*!
+ @brief Instantiates a new SGP30 class
+*/
+/**************************************************************************/
+Adafruit_SGP30::Adafruit_SGP30() {
+}
+
+/**************************************************************************/
+/*!
+ @brief Setups the hardware and detects a valid SGP30. Initializes I2C
+ then reads the serialnumber and checks that we are talking to an SGP30
+ @param theWire Optional pointer to I2C interface, otherwise use Wire
+ @returns True if SGP30 found on I2C, False if something went wrong!
+*/
+/**************************************************************************/
+boolean Adafruit_SGP30::begin(TwoWire *theWire) {
+ _i2caddr = SGP30_I2CADDR_DEFAULT;
+ if (theWire == NULL) {
+ _i2c = &Wire;
+ } else {
+ _i2c = theWire;
+ }
+
+ _i2c->begin();
+
+
+ uint8_t command[2];
+ command[0] = 0x36;
+ command[1] = 0x82;
+ if (! readWordFromCommand(command, 2, 10, serialnumber, 3))
+ return false;
+
+ uint16_t featureset;
+ command[0] = 0x20;
+ command[1] = 0x2F;
+ if (! readWordFromCommand(command, 2, 10, &featureset, 1))
+ return false;
+ //Serial.print("Featureset 0x"); Serial.println(featureset, HEX);
+ if (featureset != SGP30_FEATURESET)
+ return false;
+ if (! IAQinit())
+ return false;
+
+ return true;
+}
+
+/**************************************************************************/
+/*!
+ @brief Commands the sensor to begin the IAQ algorithm. Must be called after startup.
+ @returns True if command completed successfully, false if something went wrong!
+*/
+/**************************************************************************/
+boolean Adafruit_SGP30::IAQinit(void) {
+ uint8_t command[2];
+ command[0] = 0x20;
+ command[1] = 0x03;
+ return readWordFromCommand(command, 2, 10);
+}
+
+/**************************************************************************/
+/*!
+ @brief Commands the sensor to take a single eCO2/VOC measurement. Places results in {@link TVOC} and {@link eCO2}
+ @returns True if command completed successfully, false if something went wrong!
+*/
+/**************************************************************************/
+boolean Adafruit_SGP30::IAQmeasure(void) {
+ uint8_t command[2];
+ command[0] = 0x20;
+ command[1] = 0x08;
+ uint16_t reply[2];
+ if (! readWordFromCommand(command, 2, 12, reply, 2))
+ return false;
+ TVOC = reply[1];
+ eCO2 = reply[0];
+ return true;
+}
+
+/**************************************************************************/
+/*!
+ @brief Request baseline calibration values for both CO2 and TVOC IAQ calculations. Places results in parameter memory locaitons.
+ @param eco2_base A pointer to a uint16_t which we will save the calibration value to
+ @param tvoc_base A pointer to a uint16_t which we will save the calibration value to
+ @returns True if command completed successfully, false if something went wrong!
+*/
+/**************************************************************************/
+boolean Adafruit_SGP30::getIAQBaseline(uint16_t *eco2_base, uint16_t *tvoc_base) {
+ uint8_t command[2];
+ command[0] = 0x20;
+ command[1] = 0x15;
+ uint16_t reply[2];
+ if (! readWordFromCommand(command, 2, 10, reply, 2))
+ return false;
+ *eco2_base = reply[0];
+ *tvoc_base = reply[1];
+ return true;
+}
+
+/**************************************************************************/
+/*!
+ @brief Assign baseline calibration values for both CO2 and TVOC IAQ calculations.
+ @param eco2_base A uint16_t which we will save the calibration value from
+ @param tvoc_base A uint16_t which we will save the calibration value from
+ @returns True if command completed successfully, false if something went wrong!
+*/
+/**************************************************************************/
+boolean Adafruit_SGP30::setIAQBaseline(uint16_t eco2_base, uint16_t tvoc_base) {
+ uint8_t command[8];
+ command[0] = 0x20;
+ command[1] = 0x1e;
+ command[2] = tvoc_base >> 8;
+ command[3] = tvoc_base & 0xFF;
+ command[4] = generateCRC(command+2, 2);
+ command[5] = eco2_base >> 8;
+ command[6] = eco2_base & 0xFF;
+ command[7] = generateCRC(command+5, 2);
+
+ return readWordFromCommand(command, 8, 10);
+}
+
+/**************************************************************************/
+/*!
+ @brief I2C low level interfacing
+*/
+/**************************************************************************/
+
+
+boolean Adafruit_SGP30::readWordFromCommand(uint8_t command[], uint8_t commandLength, uint16_t delayms, uint16_t *readdata, uint8_t readlen)
+{
+ uint8_t data;
+
+ _i2c->beginTransmission(_i2caddr);
+
+#ifdef I2C_DEBUG
+ Serial.print("\t\t-> ");
+#endif
+
+ for (uint8_t i=0; i| \").replace(/{m}/g,\" | \").replace(/{e}/g,\" |
|---|---|
| \").replace(/}2/g,\" | \");"
- "document.getElementById('i').innerHTML=s;"
+ "eb('i').innerHTML=s;"
"}"
"";
const char HTTP_MSG_SLIDER1[] PROGMEM =
@@ -177,21 +184,29 @@ const char HTTP_BTN_MENU1[] PROGMEM =
" " " "; const char HTTP_BTN_RSTRT[] PROGMEM = - " "; -const char HTTP_BTN_MENU2[] PROGMEM = - " " + " "; +const char HTTP_BTN_MENU_MODULE[] PROGMEM = + " "; +#if defined(USE_TIMERS) && defined(USE_TIMERS_WEB) +const char HTTP_BTN_MENU_TIMER[] PROGMEM = + " "; +#endif // USE_TIMERS and USE_TIMERS_WEB +const char HTTP_BTN_MENU_WIFI[] PROGMEM = " "; -const char HTTP_BTN_MENU3[] PROGMEM = +const char HTTP_BTN_MENU_MQTT[] PROGMEM = " " #ifdef USE_DOMOTICZ " " #endif // USE_DOMOTICZ ""; const char HTTP_BTN_MENU4[] PROGMEM = +#ifdef USE_KNX + " " +#endif // USE_KNX " " " " " " - " " + " " " " " "; const char HTTP_BTN_MAIN[] PROGMEM = @@ -206,7 +221,7 @@ const char HTTP_BTN_CONF[] PROGMEM = " "; const char HTTP_FORM_MODULE[] PROGMEM = " |