From 887ba2ccc44fe910041ce8959a1f53dbd60b9ddc Mon Sep 17 00:00:00 2001 From: Adrian Scillato <35405447+ascillato@users.noreply.github.com> Date: Tue, 15 May 2018 11:27:40 -0300 Subject: [PATCH] Update user_config.h --- sonoff/user_config.h | 87 ++++++++++++++++---------------------------- 1 file changed, 31 insertions(+), 56 deletions(-) diff --git a/sonoff/user_config.h b/sonoff/user_config.h index cde9244a0..2323e4a16 100644 --- a/sonoff/user_config.h +++ b/sonoff/user_config.h @@ -55,15 +55,15 @@ // -- Wifi ---------------------------------------- #define WIFI_IP_ADDRESS "0.0.0.0" // [IpAddress1] Set to 0.0.0.0 for using DHCP or IP address -#define WIFI_GATEWAY "192.168.1.1" // [IpAddress2] If not using DHCP set Gateway IP address +#define WIFI_GATEWAY "192.168.2.254" // [IpAddress2] If not using DHCP set Gateway IP address #define WIFI_SUBNETMASK "255.255.255.0" // [IpAddress3] If not using DHCP set Network mask -#define WIFI_DNS "192.168.1.1" // [IpAddress4] If not using DHCP set DNS IP address (might be equal to WIFI_GATEWAY) +#define WIFI_DNS "192.168.2.27" // [IpAddress4] If not using DHCP set DNS IP address (might be equal to WIFI_GATEWAY) #define STA_SSID1 "" // [Ssid1] Wifi SSID #define STA_PASS1 "" // [Password1] Wifi password #define STA_SSID2 "" // [Ssid2] Optional alternate AP Wifi SSID #define STA_PASS2 "" // [Password2] Optional alternate AP Wifi password -#define WIFI_CONFIG_TOOL WIFI_MANAGER // [WifiConfig] Default tool if wifi fails to connect +#define WIFI_CONFIG_TOOL WIFI_WPSCONFIG // [WifiConfig] Default tool if wifi fails to connect // (WIFI_RESTART, WIFI_SMARTCONFIG, WIFI_MANAGER, WIFI_WPSCONFIG, WIFI_RETRY, WIFI_WAIT) // -- Syslog -------------------------------------- @@ -130,20 +130,20 @@ #define NTP_SERVER3 "0.nl.pool.ntp.org" // [NtpServer3] Select third NTP server by name or IP address (93.94.224.67) // -- Time - Start Daylight Saving Time and timezone offset from UTC in minutes -#define TIME_DST_HEMISPHERE North // Northern Hemisphere -#define TIME_DST_WEEK Last -#define TIME_DST_DAY Sun -#define TIME_DST_MONTH Mar // Last sunday in march -#define TIME_DST_HOUR 2 // at 02:00 -#define TIME_DST_OFFSET +120 // +120 minutes +#define TIME_DST_HEMISPHERE North // [TimeDst] Hemisphere (0 or North, 1 or South) +#define TIME_DST_WEEK Last // Week of month (0 or Last, 1 or First, 2 or Second, 3 or Third, 4 or Fourth) +#define TIME_DST_DAY Sun // Day of week (1 or Sun, 2 or Mon, 3 or Tue, 4 or Wed, 5 or Thu, 6 or Fri, 7 or Sat) +#define TIME_DST_MONTH Mar // Month (1 or Jan, 2 or Feb, 3 or Mar, 4 or Apr, 5 or May, 6 or Jun, 7 or Jul, 8 or Aug, 9 or Sep, 10 or Oct, 11 or Nov, 12 or Dec) +#define TIME_DST_HOUR 2 // Hour (0 to 23) +#define TIME_DST_OFFSET +120 // Offset from UTC in minutes (-780 to +780) // -- Time - Start Standard Time and timezone offset from UTC in minutes -#define TIME_STD_HEMISPHERE North // Northern Hemisphere -#define TIME_STD_WEEK Last -#define TIME_STD_DAY Sun -#define TIME_STD_MONTH Oct // Last sunday in october -#define TIME_STD_HOUR 3 // at 03:00 -#define TIME_STD_OFFSET +60 // +60 minutes +#define TIME_STD_HEMISPHERE North // [TimeStd] Hemisphere (0 or North, 1 or South) +#define TIME_STD_WEEK Last // Week of month (0 or Last, 1 or First, 2 or Second, 3 or Third, 4 or Fourth) +#define TIME_STD_DAY Sun // Day of week (1 or Sun, 2 or Mon, 3 or Tue, 4 or Wed, 5 or Thu, 6 or Fri, 7 or Sat) +#define TIME_STD_MONTH Oct // Month (1 or Jan, 2 or Feb, 3 or Mar, 4 or Apr, 5 or May, 6 or Jun, 7 or Jul, 8 or Aug, 9 or Sep, 10 or Oct, 11 or Nov, 12 or Dec) +#define TIME_STD_HOUR 3 // Hour (0 to 23) +#define TIME_STD_OFFSET +60 // Offset from UTC in minutes (-780 to +780) // -- Location ------------------------------------ #define LATITUDE 48.858360 // [Latitude] Your location to be used with sunrise and sunset @@ -203,9 +203,9 @@ * Select ONE of possible three MQTT library types below \*-------------------------------------------------------------------------------------------*/ // Default MQTT driver for both non-TLS and TLS connections. Blocks network if MQTT server is unavailable. -//#define MQTT_LIBRARY_TYPE MQTT_PUBSUBCLIENT // Use PubSubClient library +#define MQTT_LIBRARY_TYPE MQTT_PUBSUBCLIENT // Use PubSubClient library // Alternative MQTT driver does not block network when MQTT server is unavailable. No TLS support -#define MQTT_LIBRARY_TYPE MQTT_TASMOTAMQTT // Use TasmotaMqtt library (+4k4 code, +4k mem) - non-TLS only +//#define MQTT_LIBRARY_TYPE MQTT_TASMOTAMQTT // Use TasmotaMqtt library (+4k4 code, +4k mem) - non-TLS only // Alternative MQTT driver does not block network when MQTT server is unavailable. No TLS support //#define MQTT_LIBRARY_TYPE MQTT_ESPMQTTARDUINO // Use (patched) esp-mqtt-arduino library (+4k8 code, +4k mem) - non-TLS only @@ -218,7 +218,7 @@ #define DOMOTICZ_OUT_TOPIC "domoticz/out" // Domoticz Output Topic // -- MQTT - Home Assistant Discovery ------------- -//#define USE_HOME_ASSISTANT // Enable Home Assistant Discovery Support (+2k code) +#define USE_HOME_ASSISTANT // Enable Home Assistant Discovery Support (+2k code) #define HOME_ASSISTANT_DISCOVERY_PREFIX "homeassistant" // Home Assistant discovery prefix // -- MQTT - TLS ---------------------------------- @@ -235,7 +235,7 @@ #define USE_EMULATION // Enable Belkin WeMo and Hue Bridge emulation for Alexa (+16k code, +2k mem) // -- mDNS ---------------------------------------- -//#define USE_DISCOVERY // Enable mDNS for the following services (+8k code, +0.3k mem) +#define USE_DISCOVERY // Enable mDNS for the following services (+8k code, +0.3k mem) #define WEBSERVER_ADVERTISE // Provide access to webserver by name .local/ #define MQTT_HOST_DISCOVERY // Find MQTT host server (overrides MQTT_HOST if found) @@ -268,7 +268,7 @@ #define USE_BH1750 // Add I2C code for BH1750 sensor (+0k5 code) // #define USE_VEML6070 // Add I2C code for VEML6070 sensor (+0k5 code) // #define USE_TSL2561 // Add I2C code for TSL2561 sensor using library Joba_Tsl2561 (+2k3 code) -// #define USE_SI1145 // Add I2C code for SI1145/46/47 sensor (+1k code) + #define USE_SI1145 // Add I2C code for SI1145/46/47 sensor (+1k code) // #define USE_ADS1115 // Add I2C code for ADS1115 16 bit A/D converter based on Adafruit ADS1x15 library (no library needed) (+0k7 code) // #define USE_ADS1115_I2CDEV // Add I2C code for ADS1115 16 bit A/D converter using library i2cdevlib-Core and i2cdevlib-ADS1115 (+2k code) // #define USE_INA219 // Add I2C code for INA219 Low voltage and current sensor (+1k code) @@ -283,54 +283,29 @@ #endif // USE_SPI // -- Serial sensors ------------------------------ -//#define USE_MHZ19 // Add support for MH-Z19 CO2 sensor (+2k code) -//#define USE_SENSEAIR // Add support for SenseAir K30, K70 and S8 CO2 sensor (+2k3 code) +#define USE_MHZ19 // Add support for MH-Z19 CO2 sensor (+2k code) +#define USE_SENSEAIR // Add support for SenseAir K30, K70 and S8 CO2 sensor (+2k3 code) #define CO2_LOW 800 // Below this CO2 value show green light (needs PWM or WS2812 RG(B) led and enable with SetOption18 1) #define CO2_HIGH 1200 // Above this CO2 value show red light (needs PWM or WS2812 RG(B) led and enable with SetOption18 1) -//#define USE_PMS5003 // Add support for PMS5003 and PMS7003 particle concentration sensor (+1k3 code) -//#define USE_NOVA_SDS // Add support for SDS011 and SDS021 particle concentration sensor (+0k7 code) -//#define USE_PZEM004T // Add support for PZEM004T Energy monitor (+2k code) +#define USE_PMS5003 // Add support for PMS5003 and PMS7003 particle concentration sensor (+1k3 code) +#define USE_NOVA_SDS // Add support for SDS011 and SDS021 particle concentration sensor (+0k7 code) +#define USE_PZEM004T // Add support for PZEM004T Energy monitor (+2k code) #define USE_SERIAL_BRIDGE // Add support for software Serial Bridge (+0k8 code) -//#define USE_SDM120 // Add support for Eastron SDM120-Modbus energy meter (+1k2 code) +#define USE_SDM120 // Add support for Eastron SDM120-Modbus energy meter (+1k7 code) #define SDM120_SPEED 9600 // SDM120-Modbus RS485 serial speed (default: 2400 baud) // -- Low level interface devices ----------------- -//#define USE_IR_REMOTE // Send IR remote commands using library IRremoteESP8266 and ArduinoJson (+4k code, 0k3 mem, 48 iram) +#define USE_IR_REMOTE // Send IR remote commands using library IRremoteESP8266 and ArduinoJson (+4k code, 0k3 mem, 48 iram) // #define USE_IR_HVAC // Support for HVAC system using IR (+2k code) -// #define USE_IR_RECEIVE // Support for IR receiver (+5k5 code, 264 iram) + #define USE_IR_RECEIVE // Support for IR receiver (+5k5 code, 264 iram) #define USE_WS2812 // WS2812 Led string using library NeoPixelBus (+5k code, +1k mem, 232 iram) - Disable by // #define USE_WS2812_CTYPE NEO_GRB // WS2812 Color type (NEO_RGB, NEO_GRB, NEO_BRG, NEO_RBG, NEO_RGBW, NEO_GRBW) // #define USE_WS2812_DMA // DMA supports only GPIO03 (= Serial RXD) (+1k mem). When USE_WS2812_DMA is enabled expect Exceptions on Pow -//#define USE_ARILUX_RF // Add support for Arilux RF remote controller (+0k8 code, 252 iram (non 2.3.0)) +#define USE_ARILUX_RF // Add support for Arilux RF remote controller (+0k8 code, 252 iram (non 2.3.0)) -//#define USE_SR04 // Add support for HC-SR04 ultrasonic devices (+1k code) - -//#define USE_DISPLAY // Add I2C Display Support for LCD, Oled and up to eigth Matrices (+19k code) - -//#define DISPLAY_CONFIG // Display Support for LCD, Oled -#ifdef DISPLAY_CONFIG - -#ifdef USE_I2C - #define USE_DISPLAY // Add I2C Display Support for LCD, Oled and up to eigth Matrices (+19k code) - #define MTX_ADDRESS1 0x71 // [DisplayAddress[1]] I2C address of first 8x8 matrix module - #define MTX_ADDRESS2 0x74 // [DisplayAddress[2]] I2C address of second 8x8 matrix module - #define MTX_ADDRESS3 0x75 // [DisplayAddress[3]] I2C address of third 8x8 matrix module - #define MTX_ADDRESS4 0x72 // [DisplayAddress[4]] I2C address of fourth 8x8 matrix module - #define MTX_ADDRESS5 0x73 // [DisplayAddress[5]] I2C address of fifth 8x8 matrix module - #define MTX_ADDRESS6 0x76 // [DisplayAddress[6]] I2C address of sixth 8x8 matrix module - #define MTX_ADDRESS7 0x00 // [DisplayAddress[7]] I2C address of seventh 8x8 matrix module - #define MTX_ADDRESS8 0x00 // [DisplayAddress[8]] I2C address of eigth 8x8 matrix module -#endif // USE_I2C - -#ifdef USE_SPI // SPI using library TasmotaTFT - #ifndef USE_DISPLAY - #define USE_DISPLAY // Add SPI Display support for 320x240 and 480x320 TFT, using library TasmotaTFT - #endif -#endif // USE_SPI - -#endif // DISPLAY_CONFIG +#define USE_SR04 // Add support for HC-SR04 ultrasonic devices (+1k code) /*********************************************************************************************\ * Select features and sensors enabled in previous version saving space @@ -348,7 +323,7 @@ * Select KNX without Emulation to save space \*********************************************************************************************/ -#define USE_KNX_NO_EMULATION // Create sonoff-knx with KNX but without Emulation (See sonoff_post.h) +//#define USE_KNX_NO_EMULATION // Create sonoff-knx with KNX but without Emulation (See sonoff_post.h) /*********************************************************************************************\ * Compile a minimal version if upgrade memory gets tight ONLY TO BE USED FOR UPGRADE STEP 1!