Commit Graph

400 Commits

Author SHA1 Message Date
Theo Arends 9640931345 Change switch debounce
Change switch input detection by optimizing switch debounce (#4724)
2018-12-26 14:21:00 +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
Theo Arends 77c07a2e00 Change FallbackTopic
Change FallbackTopic from cmnd/<mqttclient>/ to cmnd/<mqttclient>_fb/ to discriminate from Topic (#1528)
2018-12-23 14:48:57 +01:00
Theo Arends e2cd656286 6.4.0.3 Hass and Alexa fixes
6.4.0.3 20181222
 * Change Hass discovery to short MQTT messages as used by Hass 0.81 and up (#4711)
 * Change FallbackTopic detection (#4706)
 * Add define WIFI_SOFT_AP_CHANNEL in my_user_config.h to set Soft Access Point Channel number between 1 and 13 as used by Wifi Manager web GUI (#4673)
 * Fix Alexa "this value is outside the range of the device". Needs power cycle and Alexa deletion/discovery cycle. (#3159, #4712)
2018-12-22 16:13:07 +01:00
Adrian Scillato dcbf5a8c94
Fix ArduinoOTA for Core 2.5.0 (fix is backwards compatible)
https://github.com/arendst/Sonoff-Tasmota/issues/4619
2018-12-13 23:04:48 +00:00
Theo Arends 67ec0678a3 6.3.0.17 Add features
6.3.0.17 20181211
 * Add support for TheoV2 sensors as documented on https://sidweb.nl
 * Add support for SDM220 (#3610)
 * Enhance support for MPU6050 using DMP (#4581)
2018-12-11 14:24:52 +01:00
Erik a65041fee5 Enabled forced local operation when button- or switchtopic is set 2018-12-08 08:44:59 +01:00
Theo Arends 9a3c3895fb Fix Domoticz Fanspeed
Fix Domoticz Fanspeed
2018-12-06 15:03:42 +01:00
Theo Arends 61aa428646 6.3.0.16 - Bump version
6.3.0.16 20181201
 * Add support for iFan02 Fanspeed in Domoticz using a selector (#4517)
 * Add Announce Switches to MQTT Discovery (#4531)
2018-12-06 11:17:25 +01:00
Theo Arends 9471163d86
Merge pull request #4531 from emontnemery/hass_announce_switch
MQTT Discovery - Announce switches
2018-12-06 11:02:40 +01:00
Theo Arends e64c8d61c9
Update sonoff.ino 2018-12-06 11:01:57 +01:00
Theo Arends dfa0d2ef11 Add Domoticz Selector for Fanspeed
Add support for iFan02 Fanspeed in Domoticz using a selector (#4517)
2018-12-06 10:49:49 +01:00
Theo Arends 4b287ab4cb Final fix compile error (#4509)
Final fix soft_spi_flg compile error (#4509)
2018-12-05 12:23:42 +01:00
Erik be19af15e2 Announce switches 2018-12-04 21:32:02 +01:00
andrethomas2 a2e865bb44
Add dummy soft_spi_flg to satisfy compiler
@arendst Just adding this, for now, to satisfy the compiler until you get time to merge the rest of the Software SPI support.
2018-12-02 18:53:49 +02:00
Erik 74172f14d3 Further improve Hass auto discovery 2018-12-02 16:39:59 +01:00
Theo Arends eb3c1a327d 6.3.0.15 Update dynamic sleep
6.3.0.15 20181201
 * Removed command SetOption36 (#4497)
 * Add command SetOption60 0/1 to select dynamic sleep (0) or sleep (1) (#4497)
2018-12-01 18:53:42 +01:00
andrethomas 6050cd40f3 Merge sleep command 2018-12-01 18:47:25 +02:00
andrethomas 5f402c8f34 Fix sleep->SetOption36 transition 2018-12-01 00:18:08 +02:00
andrethomas 3613946f18
Prevent sleep and SetOption36 being used concurrently
Prevent sleep and SetOption36 being used concurrently
2018-11-30 20:00:20 +02:00
Theo Arends eb851a9a90
Merge pull request #4450 from emontnemery/hass_send_tele
WIP - Support sending tele/STATUS as state/RESULT
2018-11-26 12:49:43 +01:00
andrethomas acdbd39124
Fix math in LoadAvg
Fix the math in LoadAvg calculation. To keep average we take away one Nth of loops and add one Nth of current cycle ration to the average.

Now the math makes more sense... maximum load average on setoption36 0/1 = 999 (as it should be)
2018-11-26 11:37:15 +02:00
Erik eda60b6124 Support sending tele/STATUS as state/RESULT 2018-11-25 21:27:19 +01:00
Theo Arends 243ec16d80 Fix another calcuation error
Fix another calcuation error
2018-11-25 17:31:53 +01:00
andrethomas 0b14a95082
Remove assumption of 100% to report correctly
Remove the assumption of 100% loop duty cycle as we want an accurate loop load average and not a percentage as such - so if it overshoots the value stored for setoption36 this should be known by looking at the load average and not be distorted by reducing it to 100 basis points on the assumption that my_acitivity took as long as setoption36.
2018-11-25 17:52:07 +02:00
Theo Arends 05be1ee21c Fix exception due to divide by 0
Fix exception due to divide by 0
2018-11-25 16:41:29 +01:00
andrethomas 7c84f892fc Add target loop delay to telemetry 2018-11-25 14:29:53 +02:00
andrethomas c22fcc2a3a
Update CPU average load function
Remove unnecessary manipulations :)
2018-11-24 19:00:42 +02:00
Theo Arends 52eeef95f0 Add CPU average load
Add CPU average load to state message (#4431)
2018-11-24 17:43:18 +01:00
Theo Arends 4700e49d70
Update sonoff.ino 2018-11-24 17:16:27 +01:00
andrethomas 0e56044eb5
Add main loop load average
Add main loop avarage duty cycle measured against setoption36 value to telemetry data as LoadAvg
2018-11-24 18:12:49 +02:00
andrethomas c436ed5d3d
Update boot delay code
Since the driver boot delay has been removed, this is a better strategy for getting a smoother boot cpu cycle vs loop delay.
2018-11-22 17:13:55 +02:00
Theo Arends d71ae77900 6.3.0.12 Change boot delays
6.3.0.12 20181122
 * Remove delays introduced in 6.3.0.11 (#4233)
 * Add additional start-up delay during initial wifi connection
 * Add support for I2C MGC3130 Electric Field Effect sensor by Christian Baars (#3774, #4404)
 * Add initial support for Hass sensor discovery (#4380)
2018-11-22 12:25:18 +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
Theo Arends 4899178362 6.3.0.10 Add command SetOption36
6.3.0.10 20181118
 * Add command SetOption36 0..255 milliseconds (10 default) to tune main loop dynamic delay
2018-11-18 16:49:02 +01:00
Theo Arends 18997e841f 6.3.0.9 Add dynamic delay in loop
6.3.0.9 20181118
 * Moved command SetSensorXX to debugging driver freeing user code space
 * Add dynamic delay to main loop providing time for wifi background tasks
 * Remove delays introduced in 6.3.0.1 (#4233)
2018-11-18 15:02:52 +01:00
Theo Arends 9eacabc4f0 Delay initial flash write
* Stop enforcing flashmode dout but it is still mandatory
 * Moved bootcount update (being first) flash write to 10 seconds after restart
2018-11-16 09:36:41 +01:00
Theo Arends 877771c90a 6.3.0.8 Stop enforcing dout
6.3.0.8 20181115
 * Stop enforcing flashmode dout. Still mandatory but this a chk for possible future flash corruption
2018-11-15 14:55:45 +01:00
andrethomas 4a7e7b0dbb Change C functions with () to (void) 2018-11-14 15:32:09 +02:00
Theo Arends 3ef78e8095 Revert "Moved command SetSensorXX"
This reverts commit 830319bc6e.
2018-11-12 15:54:18 +01:00
Theo Arends 830319bc6e Moved command SetSensorXX
Moved command SetSensorXX to debugging
2018-11-12 15:09:09 +01:00
Theo Arends e2dd11b0bc Consolidate LTrim into Trim
Consolidate LTrim into Trim
2018-11-12 12:33:49 +01:00
Theo Arends 7a235cc8ef Fix shelly2 ghost switching
Fix shelly2 ghost switching caused by lack of pull-up inputs (#4255)
2018-11-10 10:48:28 +01:00
Theo Arends 3332ab01a1 Revert "Add RF calibration on next restart"
This reverts commit 2a4d82f4b6.
2018-11-08 16:33:34 +01:00
Theo Arends 2a4d82f4b6 Add RF calibration on next restart
Add RF calibration on next restart
2018-11-08 14:21:45 +01:00
Theo Arends f9bddb6c54 Add flashchipid info
Add flashchipid info
2018-11-08 10:40:19 +01:00
Theo Arends 61985ca16b Add hex to flash info 2018-11-07 18:43:44 +01:00
Theo Arends c75ae78d88 6.3.0.5 Add code image
6.3.0.5 20181107
 * Add code image and optional commit number to version
2018-11-07 15:03:41 +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