Commit Graph

280 Commits

Author SHA1 Message Date
Theo Arends e1c92b701b Change NULL to nullptr
Change NULL to nullptr
2019-03-26 18:26:50 +01:00
Theo Arends f83a5bb989 More Wemo tuning
More Wemo tuning
2019-03-26 17:10:07 +01:00
Theo Arends 10d32acccc Free some flash used by hass
Free some flash used by hass
2019-03-24 14:23:20 +01:00
Theo Arends 6922e657d9 Shrink code/flash space
Shrink code/flash space
2019-03-23 17:00:59 +01:00
Theo Arends 76b7d778ec Fix incomplete syslog
Fix incomplete syslog when MQTT is disabled (#5512)
2019-03-23 12:41:35 +01:00
Theo Arends 2959ec9341 Prep for release with fix some warnings
Prep for release with fix some warnings
2019-03-14 16:50:56 +01:00
Laurent Dong b87afc3bcb Code review: Copy string with strlcpy() instead of snprintf()
Copying string with snprintf() is unsafy and slow because it check and replace plcaehold (%?)
2019-03-08 13:24:02 -05:00
Theo Arends 06a9fbd792 Changed logging message handling
Changed logging message handling
2019-03-08 15:15:42 +01:00
Theo Arends 58fe50d81a Update webserver layout
Update webserver layout
2019-03-07 18:18:30 +01:00
Theo Arends 5d8ae266d0 Fix RemoveSpace and tune Websend
Fix RemoveSpace and tune Websend
2019-02-23 12:48:39 +01:00
Theo Arends d219d1c9b5 Update support.ino
Houskeeping
2019-02-22 12:11:15 +01:00
Theo Arends 05b0280019 6.4.1.18 - Fix some exceptions and watchdogs
6.4.1.18 20191221
 * Fix some exceptions and watchdogs due to lack of stack space - part 1 (#5215)
2019-02-21 14:31:31 +01:00
Theo Arends ed0d50a3aa Fix template support
Fix template support
2019-02-16 18:01:54 +01:00
Theo Arends 7c9720de9d
Merge pull request #5210 from laurentdong/development
Introduce Expression in Rules - Updated
2019-02-16 15:49:46 +01:00
Theo Arends 1fde362998 Fix regression from 6.4.1.16
Fix regression from 6.4.1.16 where GPIO9 and GPIO10 connected devices did not work (#5197)
2019-02-16 11:33:29 +01:00
Theo Arends 77db7ba0ff 6.4.1.17 Change template stability
6.4.1.17 20190214
 * Change template update by removing possibility to add user module config keeping template as defined (#5222)
2019-02-14 16:48:28 +01:00
Theo Arends 166a625eb8 Revert "Hide templated GPIOs"
This reverts commit 4af4ff681d.
2019-02-14 11:13:47 +01:00
Theo Arends 4af4ff681d Hide templated GPIOs
Hide templated GPIOs in user template too (#5222)
2019-02-14 11:04:11 +01:00
Laurent 4b4b3709ad Introduce Expression in Rules
Support use an expression as paramter in some rule commands, include Var<x>, Mem<x> and Ruletimer<x>.
Expression is constructed by constants (float number), variables (var<x>, mem<x>, Time, Uptime, Sunrise, Sunset),  operators and round brackets.
Currently support 6 operators, order by priority from high to low:
^  (power)
% (modulo)
*, /
+, -
Commands examples:
Var1 3.14 * (MEM1 * (10 + VAR2 ^2) - 100) % 10 + uptime / (2 + MEM2)
Ruletimer4 Time - Sunrise + MEM2/2
2019-02-12 21:46:42 -05:00
Theo Arends 567bc93623 Add Template GUI update
Initial support for online template change using command Template or GUI Configure Other (#5177)
2019-02-12 11:55:47 +01:00
Theo Arends 98ae3eaf54 6.4.1.16 Online template change
6.4.1.16 20190211
 * Initial support for online template change using command Template (#5177)
2019-02-11 19:21:49 +01:00
Theo Arends 4509019d64 Fix valid button range check
Fix valid button range check
2019-01-28 18:04:33 +01:00
Theo Arends 304ac6fe44 6.4.1.12 code changes (byte/boolean)
6.4.1.12 20190128
 * Change code use of boolean to bool and byte to uint8_t
 * Change code uint8_t flags to bool flags
2019-01-28 14:08:33 +01:00
Theo Arends e7e378f463 Add (S)SerialSend features
* Fix mDNS addService (#4938, #4951)
 * Add (S)SerialSend3 escape sequence \x to allow hexadecimal byte value (#3560, #4947)
 * Add SerialBridge command SSerialSend5 <hexdata>
2019-01-17 17:48:34 +01:00
Theo Arends a23f01080b 6.4.1.8 Add template flags
6.4.1.8 20190107
 * Change sonoff_template.h layout regarding optional module flags like ADC0
 * Add command SetOption62 1 to force no Button/Switch pullup on dedicated modules. Currently only supported on Shelly2 (#4841)
2019-01-07 16:33:18 +01:00
Theo Arends 447ec6256e 6.4.1.4 Update Copyright (C) 2019
6.4.1.4 20190101
 * Update Copyright (C) 2019
2019-01-01 13:55:01 +01:00
Theo Arends 7ebb7a6067 6.4.1.3 Change sonoff_template.h
6.4.1.3 20181229
 * Change sonoff_template.h module lay-out by removing non-configurable GPIOs
2018-12-29 19:46:28 +01:00
Theo Arends afe83a3460 Prep for template tuning 2018-12-29 17:19:13 +01:00
Theo Arends 0b10f48e41 6.4.1.1 Fix most compiler warnings
6.4.1.1 20181224
 * Fix most compiler warnings
2018-12-24 18:14:25 +01:00
Joel Stein c92ce53ddf SerialLog: output CR + LF instead of just LF 2018-12-17 19:28:31 +01:00
Theo Arends 164db4e12b Clean up
Clean up
2018-11-24 17:22:06 +01:00
Theo Arends 6c87ab205a Fix possible strncat buffer overflows
Fix possible strncat buffer overflows
2018-11-22 15:41:30 +01:00
Theo Arends 23c16e58a9 Housekeeping
Housekeeping
2018-11-20 15:00:24 +01:00
Theo Arends e34a1f0719 Add wifi network scan
* Add command SetOption56 0/1 to enable wifi network scan and select highest RSSI (#3173)
2018-11-19 18:07:25 +01:00
wvdv2002 7b6553d116 Merge remote-tracking branch 'origin/development' into armtronix 2018-11-16 09:31:58 +01:00
andrethomas 4a7e7b0dbb Change C functions with () to (void) 2018-11-14 15:32:09 +02:00
Theo Arends e2dd11b0bc Consolidate LTrim into Trim
Consolidate LTrim into Trim
2018-11-12 12:33:49 +01:00
Theo Arends c0cfdde8ac Fix Sonoff Pow R2 and Sonoff S31
Fix Sonoff Pow R2 and Sonoff S31 Serial interface hang caused by Sonoff Basic R2 driver delay implementation (and possibly core bug)
2018-11-11 17:58:18 +01:00
Theo Arends a55ec91a10 6.3.0.7 Use ESP.reset
6.3.0.7 20181111
 * Fix wifi connection errors using ESP.reset instead of ESP.restart
2018-11-11 14:28:46 +01:00
wvdv2002 410e49a3c7 Added Armtronix dimmer support 2018-11-10 16:30:29 +01:00
Theo Arends 15148f290d 6.3.0.4 Add SetSensorXX
6.3.0.4 20181106
 * Add command SetSensorXX 0/1 to disable/re-enable compiled xsns_XX_sensor.ino driver
2018-11-06 17:33:51 +01:00
Theo Arends c9cf375c6c Add checks for GPIO selections
Add more strict checks for GPIO selections
2018-11-05 17:27:02 +01:00
Theo Arends 99ae0c9cab Change wifi connection check
Change wifi connection check
2018-11-04 18:00:07 +01:00
Theo Arends 14a7424e9b Add command SetOption24
Add command SetOption24 0/1 to select pressure unit as hPa or mmHg (#4241)
2018-11-04 16:55:12 +01:00
eeak db4d7ed277
Add ConvertPress() 2018-11-01 17:36:22 +02:00
Theo Arends 04bddf6370 Fix compile error
Fix compile error
2018-11-01 14:27:37 +01:00
Theo Arends 46a0a0afba Add minutes to commands Timezone
Add minutes to commands Timezone to allow all possible world timezones
2018-11-01 13:00:05 +01:00
Theo Arends 7d4312f346 Fix unintended function overload
Fix unintended function overload of WifiState
2018-10-31 11:27:40 +01:00
Theo Arends 07ac25ce34
Merge pull request #4221 from chaosmaster/tuya-wifi-state
tuya: properly indicate wifi-status
2018-10-31 11:05:57 +01:00
Theo Arends e6a8b2d30d Add TotalStartTime to Energy JSON
Add TotalStartTime to Energy JSON message (#3971)
2018-10-30 17:04:19 +01:00
Joel Stein faab6f1221 tuya: modify WifiState() in support.ino to reflect not-connected-state instead of reimplementing it 2018-10-30 15:34:31 +01:00
Theo Arends 5c78561b07 6.2.1.20 Add mDNS delay option
6.2.1.20 20181028
 * Add command SetOption35 0..255 (seconds) to delay mDNS initialization to control possible Wifi connect problems
2018-10-28 17:57:25 +01:00
Theo Arends f2b04092f8 Initial release of RF transceiving
Initial release of RF transceiving using library RcSwitch (#2702)
2018-10-25 18:17:58 +02:00
Theo Arends eefad54be7 Fix invalid JSON
Fix invalid JSON floating point result from nan (Not a Number) and inf (Infinity) into null (#4147)
2018-10-25 14:03:34 +02:00
Theo Arends 51ee22273b Fix invalid JSON
Fix invalid JSON floating point result from nan into null (#4147)
2018-10-25 10:44:59 +02:00
Theo Arends 266f7f1fe0 Add support for TX20
Add support for La Crosse TX20 Anemometer (#2654, #3146)
2018-10-21 12:44:45 +02:00
Theo Arends 0ab43909c3 6.2.1.17 Changes and Adds
6.2.1.17 20181017
 * Enable updated non-blocking PubSubClient as default MQTT client
 * Update TasmotaModbus and TasmotaSerial libraries for support of serial 8N2 communication
 * Add support for Pzem-003/017 DC Energy monitoring module (#3694)
 * Change support for Pzem-014/016 AC Energy monitoring module (#3694)
2018-10-17 12:27:05 +02:00
Theo Arends ae28a50dc7 Fix possible wifi connection error
Fix possible wifi connection error (#4044, #4083)
2018-10-16 14:00:14 +02:00
Theo Arends ecd39741aa
Merge pull request #4083 from ascillato/patch-1
Fix Some Wifi Connection Issues
2018-10-16 13:48:28 +02:00
Theo Arends d47ab92862 Fixxes and Add Tuya Dimmer
* Fix RfRaw and SerialSend5 regression from 6.2.1.15 (#4072)
 * Fix Sonoff Bridge RfRaw receive (#4080)
 * Add support for Tuya Dimmer (#469, #4075)
2018-10-16 11:21:44 +02:00
Adrian Scillato dbe7cf3bbc
Fix Some Wifi Connection Issues
https://github.com/arendst/Sonoff-Tasmota/issues/4044
2018-10-16 03:54:55 -03:00
andrethomas 8345f3f872
Fix SerialSendRaw() to adjust for whitespace
Fix SerialSendRaw() to adjust for whitespace removal
2018-10-15 22:30:26 +02:00
Theo Arends c46ae74067 Add whitespace removal
Add whitespace removal from RfRaw and SerialSend5 (#4020)
2018-10-14 12:53:11 +02:00
Theo Arends fcc6d5437b Add HX711 Load Cell
* Add support for DS3231 Real Time Clock
 * Add support for HX711 Load Cell
 * Add command WeightRes 0..3 to control display of decimals for kilogram
2018-10-11 17:33:07 +02:00
Adrian Scillato 3bc3e7e332
Add comment for sleep command (datasheet) 2018-10-08 17:25:42 -03:00
Theo Arends 0ad250c10b 6.2.1.11 Add MQTT Client
6.2.1.11 20191002
 * Remove support for MQTT Client based on esp-mqtt-arduino by #define MQTT_LIBRARY_TYPE MQTT_ESPMQTTARDUINO
 * Add support for MQTT Client based on lwmqtt to be selected by #define MQTT_LIBRARY_TYPE MQTT_ARDUINOMQTT
2018-10-02 17:07:30 +02:00
Theo Arends 2252be521a Fix I2CScan invalid JSON
Fix I2CScan invalid JSON error message (#3925)
2018-09-29 12:34:24 +02:00
Theo Arends 4b7c797fb7 6.2.1.9 Apparent/Reactive Power
6.2.1.9 20180928
 * Add Apparent Power and Reactive Power to Energy Monitoring devices (#251)
2018-09-28 15:48:42 +02:00
Theo Arends bf7dcb8eec 6.2.1.3 Add SerialSend5
6.2.1.4 20180916
 * Add command SerialSend5 to send raw serial data like "A5074100545293"
 * Update MCP230xx driver
 * Update Czech translation
 * Update MP3 driver (#3800)
 * Add userid/password option to decode-status.py (#3796)
 * Fix syslog when emulation is selected (#2109, #3784)
 * Fix Pzem2 compilation error (#3766, #3767)
2018-09-16 16:09:00 +02:00
Theo Arends 4c41ea4461 Houskeeping 2018-09-09 14:31:40 +02:00
Theo Arends 649ec49478
Merge pull request #2841 from JohannWeging/development
Add Nova SDS0X1 sensor idling to expand its lifespan
2018-09-08 18:09:23 +02:00
Adrian Scillato 420be8f499
Simplified Function Substr 2018-09-06 14:21:52 -03:00
Theo Arends 2fdc91f1b4 Housekeeping 2018-09-06 18:08:10 +02:00
Theo Arends dd95bb393e Add command SetOption52
Add command SetOption52 to control display of optional time offset from UTC in JSON messages (#3629, #3711)
2018-09-06 12:37:50 +02:00
Theo Arends 3ccf83d1a6
Merge pull request #3711 from rgitzel/append-timezone
optionally append timezone to timestamp in JSON messages
2018-09-06 11:38:54 +02:00
Rodney Gitzel 9413ba9f47 optionally append timezone to timestamp in JSON messages 2018-09-05 14:51:12 -07:00
Adrian Scillato b8e7ee8650
Fixed Exception Issue
Solves Bug #3700
2018-09-05 18:35:02 -03:00
Theo Arends c6a14c5fe7 Fix possible exception
Fix possible exception due to buffer overflow (#3659)
2018-09-02 11:52:24 +02:00
Theo Arends 48b5f9117a 6.2.0.1 - Fix StateText ambiguity
Fix possible ambiguity on command parameters if StateText contains numbers only (#3656)
2018-09-02 11:11:49 +02:00
Theo Arends f7c38f24f3 6.1.1.14 Add boot loop detection
Add boot loop detection and try to fix
2018-08-30 14:27:33 +02:00
Theo Arends 3abdaaffb7 Revert "6.1.1.14 Add boot loop detection"
This reverts commit b9a875d6fb.
2018-08-30 13:19:09 +02:00
Theo Arends b9a875d6fb 6.1.1.14 Add boot loop detection
Add boot loop detection and try to fix
2018-08-30 12:22:24 +02:00
Theo Arends 624ee28db3 Revisit naming and features
Revisit naming and features in preparation to release
2018-08-28 14:28:36 +02:00
Theo Arends 55b43734d8 6.1.1.13 - Fixes
6.1.1.13 20180828
 * Fix 6.1.1.12 regression of Mem and Var default handling (#3618)
 * Optimizations
2018-08-28 11:10:32 +02:00
Theo Arends d4931f7b11 Fix handling default names Pt.2
Fix handling default names Pt.2
2018-08-27 14:53:09 +02:00
Theo Arends 9978381c94 Fix handling deafult names
Fix handling use of default names when using names starting with shortcut character (#3392, #3600)
2018-08-27 13:06:22 +02:00
Theo Arends bbd2529914 Sleep fixes part 2 and 3 of 3
* Change scheduler phase 2/3 - Fixed when sleep is enabled: Blinktime (#3581)
 * Change scheduler phase 3/3 - Some sensor update timings: AdcEvery 200 -> 250, Senseair 300 -> 250, SDM120 300 -> 250, SDM630 300 -> 250
2018-08-26 17:10:18 +02:00
Theo Arends f090050e69 6.1.1.11 - Sleep fixes part 1
6.1.1.11 20180826
 * Change scheduler phase 1 - Fixed when sleep is enabled: Uptime, Delay, PulseTime and TelePeriod (#3581)
2018-08-26 15:42:35 +02:00
Theo Arends 1c14015f63 Update feature list
Update feature list
2018-08-25 12:26:36 +02:00
Theo Arends 48668bce7b 6.1.1.10 - Disable core 2.4.2 sleep
Disable wifi sleep for both Esp8266/Arduino core 2.4.1 and 2.4.2 to solve device freeze caused by Espressif SDK bug (#3554)
2018-08-25 11:59:21 +02:00
Theo Arends ae6fcd4d60 Change sleep command
Change command sleep from restart after change to not restart after change (#3554)
2018-08-24 16:38:55 +02:00
Theo Arends 6a5c0d29e8 6.1.1.9 - Fixes and Additions
6.1.1.9
 * Allow user override of define MAX_RULE_TIMERS (#3561)
 * Allow user override of define MAX_RULE_VARS
 * Add GPIO options ButtonXn, SwitchXn and CounterXn to select INPUT mode instead of INPUT_PULLUP (#2525)
 * Fix OtaMagic when file path contains a dash (-) (#3563)
2018-08-23 16:05:51 +02:00
Theo Arends 6f455e2c00 Update debug info
Update debug info
2018-07-31 11:49:23 +02:00
Theo Arends da7dadae21 Add rule triggers
Add rule triggers Wifi#Connected and Wifi#Disconnected (#3359)
2018-07-28 15:06:31 +02:00
Theo Arends 99e81ba86e Fix CCS811 env compensation
Fix CCS811 temperature and humidity compensation
2018-07-24 18:41:50 +02:00
Adrian Scillato 754955cd48
Move subStr Function to Support.ino 2018-07-23 01:32:54 -03:00
Theo Arends afdb197a6c v6.6.1b - Change wifi options
6.1.1b
 * Add default Wifi Configuration tool as define WIFI_CONFIG_NO_SSID in user_config.h if no SSID is configured (#3224)
 * Add user selection of Wifi Smartconfig as define USE_SMARTCONFIG in user_config.h
 * Add user selection of WPS as define USE_WPS in user_config.h in preparation for core v2.4.2 (#3221)
 * Change default Wifi config option from WPS to Wifi Manager if WPS is disabled
 *   or Wifi Smartconfig if webserver is disabled
 *   or Wifi Serial input if Smartconfig is disabled
 * Remove WPS and SmartConfig from sonoff-minimal saving 56k code space
2018-07-15 15:21:48 +02:00
Theo Arends f75ab4f25f v6.1.1a - Sync with v6.1.1
Sync with v6.1.1
2018-07-14 18:07:25 +02:00
Theo Arends e876b5aa77 v6.1.0b - WPS optional
6.1.0b
 * Add user selection of WPS as define USE_WPS in user_config.h in preparation for core v2.4.2 (#3221)
 * Change default Wifi config option from WPS to Wifi Manager if WPS is disabled (or Wifi Smartconfig if webserver is disabled)
 * Remove WPS from sonoff-minimal saving 33k code space
 * Revert wifi changes implemented in v6.0.0a due to possible bad initial wifi connections
2018-07-14 15:35:56 +02:00
Theo Arends 8fdcbaa8e1 Add read sensor retry
Add read sensor retry to DS18B20, DS18x20, DHT, SHT1X and HTU21
2018-07-10 22:12:16 +02:00