Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DMP-use to MPU-6050 #4581

Merged
merged 7 commits into from Dec 11, 2018
Merged

Add DMP-use to MPU-6050 #4581

merged 7 commits into from Dec 11, 2018

Conversation

Staars
Copy link
Contributor

@Staars Staars commented Dec 10, 2018

Addition of the DMP-use in the current driver for the MPU-6050

The MPU6050 contains a DMP (Digital Motion Processor) which combines the gyroscope and accelerometer data on the chip.  The DMP calculates quaternions from which other values (angles, acceleration forces) can be derived.

Various examples on the internet show the superior performance of the DMP regarding stability of the sensor readings.

The implementation for TASMOTA does not use interrupts and high speed data accumulation was definitely not the goal. Technically we set the data rate of the sensor to 200 Hz, then clean the FIFO buffer before every read so that the resulting delay should be at approx. 5 ms. The rest follows the example code of the library.
In order to not break existing installations the code has to be activated with an additional #define USE_MPU6050_DMP, which will replace the old calculation method. The names of the mqtt-messages stay the same, but now we getting euler angles in degrees and raw acceleration values, which are not necessary in the same range as before.

I tried to change as few things as possible.

The only other code additions are:

  • Added an I2cDevice-check in MPU_6050Detect() because otherwise MPU_6050_address will always be 0x69 in the end, which is very likely only a cosmetically glitch in the debug message.
  • Moved temperature conversion in MPU_6050Show() inside the loop after -if (MPU_6050_found)-
  • Changed a small part of the I2CdevLib-library.

IMPORTANT NOTE:
At least on my setup the call of DomoticzTempHumSensor(temperature, 0); always crashes TASMOTA. This was also the case with the old driver.

Further considerations:
I would suggest to shorten the mqtt-messages, i.e. AccelXAxis -> AccelA (or even ->AA), but this is a personal preference.

The DMP version should be recommended as the first option and always bring superior results.
Example: http://www.geekmomprojects.com/mpu-6050-redux-dmp-data-fusion-vs-complementary-filter/

The exception from this rule could in theory be power consumption, because the DMP will draw a bit more. I do not have the equipment to test and confirm this.

The compiler warnings regarding the debug code in the I2CdevLib-library can be ignored or silenced via out commenting.

I left the extra MPU_6050PerformReading(); at the bottom after Xsns32(byte function) although the I do not really understand their necessity. At least they do not hurt.

My test setup:
TASMOTA 6.3.0.16 with the current PlatformIO and SDK 2.3 and 2.4.2 on a NodeMCU and Wemos powered via USB-Port of my laptop.

@ascillato2
Copy link
Collaborator

Thanks for the enhacement of the driver 👍

IMPORTANT NOTE:
At least on my setup the call of DomoticzTempHumSensor(temperature, 0); always crashes TASMOTA. This was also the case with the old driver.

Doesn't happened to me under cores 2.3.0, 2.4.2 or 2.5.0. May be you had enabled too many features and sensors that produces an exception for not enough memory.

Further considerations:
I would suggest to shorten the mqtt-messages, i.e. AccelXAxis -> AccelA (or even ->AA), but this is a personal preference.

Good idea, but will break backwards compatibility, so it is better to leave as it is.

In your modifications in the code, you add pgmspace.h. I was concerned about that because in core 2.5.0 they modify that. But after some compilation testing, this PR compiles fine under 2.3.0, 2.4.2 and 2.5.0. I don't have the sensor to test, but for the rest, seems everything ok. Thanks 👍

@ascillato2 ascillato2 mentioned this pull request Dec 10, 2018
6 tasks
@ascillato
Copy link
Contributor

ascillato commented Dec 10, 2018

When enabling this sensor in my_user_config.h, now it uses 188 Bytes RAM and 12KBytes of Flash

If enabled MPU6050 without DMP, it uses 3K3 of flash
If enabled MPU6050 with DMP, it uses +8K6 of flash reaching the 12K of flash for the whole driver.

@Staars
Copy link
Contributor Author

Staars commented Dec 10, 2018

I will have a look, if this can be avoided.

@ascillato2
Copy link
Collaborator

ascillato2 commented Dec 10, 2018

It is Ok. It was just an information. Before this PR was 2K6 of flash

@Staars
Copy link
Contributor Author

Staars commented Dec 10, 2018

I just tested my domoticz-issue again and it still happily crashes. At least it does not help to deactivate the default I2C-drivers, to save a bit of memory.
So we should mention it somewhere.

@Staars
Copy link
Contributor Author

Staars commented Dec 10, 2018

I spent the last hour with debugging and (to my best knowledge):
DomoticzTempHumSensor(temperature, 0); leads to crash in
xdrv_07_domoticz.ino:
snprintf_P(data, sizeof(data), PSTR("%s;%s;%d"), temp, hum, DomoticzHumidityState(hum)); (line 405), which seems to have problem with the agument hum=0.
I.E. if I call instead:
DomoticzTempHumSensor(temperature, temperature); -> no crash occurs.

@ascillato
Copy link
Contributor

The call DomoticzTempHumSensor(temperature, 0); shouldn't make the exception, but anyway, seems to be incorrect due the Domoticz driver has also the call DomoticzSensor(DZ_TEMP, temperature); for temperature only.

If you try that one instead, your exception is solved?

@Staars
Copy link
Contributor Author

Staars commented Dec 11, 2018

Yes, this solves it! No more exceptions.
This sounds a bit like "undefined behaviour" to me. I will investigate later outside of this PR.

@paspo
Copy link

paspo commented Dec 11, 2018

LGTM

As asked by @ascillato I tested this in my two setups: works like a charm.
I agree DMP should be the default, and possibly the only implementation in tasmota: at the moment, to use these sensors, you have to build your own firmware, which is a task for a small part of the user base, so (IMHO) this is a great time to break with the past...

@arendst arendst merged commit 400529c into arendst:development Dec 11, 2018
@arendst
Copy link
Owner

arendst commented Dec 11, 2018

Regarding domoticz: it's as designed. There are several inputs to domoticz. Just look how other drivers have been implemented using different entries for different Domoticz specific sensor types.

In case of the exception call: it's expecting chars not numbers so it's expected to get an exception if a 0 is supplied in case of a char.

@Staars
Copy link
Contributor Author

Staars commented Dec 11, 2018 via email

@arendst
Copy link
Owner

arendst commented Dec 11, 2018

If Domoticz is disabled you won't get an exception.

BTW: Did you pay attention to the temperature in Fahrenheit? If not look how other drivers use function ConvertTemp.

@Staars
Copy link
Contributor Author

Staars commented Dec 11, 2018 via email

arendst added a commit that referenced this pull request Dec 11, 2018
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)
wienerdogracing added a commit to wienerdogracing/Sonoff-Tasmota that referenced this pull request Dec 31, 2018
* PS_16_DZ: GPIO13 => LED1

* PS_16_DZ: cleanup code

* Add Command CalcRes

* Update settings.ino

* Update decode-config.py

* Add SetOption59 info

Add SetOption59 info

* decode-config.py: add 6.3.0.11 to .14 settings

* Add dynamic buffer space

Make serial buffer space reservation dynamic

* Add dynamic buffer space

Add dynamic buffer space

* Fix dynamic buffer handling

Fix dynamic buffer handling

* Move static to dynamic buffers

 * Add support for SM Smart Wifi Dimmer PS-16-DZ (arendst#4465)
 * Move some static (serial) buffers to dynamic buffers

* Prep for Software SPI

Prep for Software SPI used by some displays

* PS_16_DZ: only update brightness if it actually changed

* PS_16_DZ: reduce buffer-size and actually check for overflow

* PS_16_DZ: optimize for size

* PS_16_DZ: further optimization

* PS_16_DZ: leave space for trailing 0-byte

* Hass: Restart if topic is changed

* PS_16_DZ: cleanup

* Fix possible overflow situation

Fix possible overflow situation

* Small improvements to Hass MQTT discovery

* Add support for Teckin US

Add support for Teckin US Wifi Smart Switch with Energy Monitoring (arendst#4481)

* Update display and epaper drivers

Update display and epaper drivers

* switch to using NewPing lib directly for sr04
add NewPing-1.9.1 lib

* Housekeeping

* Upd settings.ino - set sleep=0 when SetOption36>0

Update settings.ino - set sleep=0 when SetOption36>0

* Prevent sleep and SetOption36 being used concurrently

Prevent sleep and SetOption36 being used concurrently

* Fix sleep->SetOption36 transition

* Update fr-FR.h

Synced with changes since  v6.2.1.7

* Merge sleep command

* Bump version to 0x0603000F

Bump version to 0x0603000F to make sure new sleep command takes effect on 50 as default for upgrades where sleep is < 50.

* Update support_wifi.ino

* 6.3.0.15 Update dynamic sleep

6.3.0.15 20181201
 * Removed command SetOption36 (arendst#4497)
 * Add command SetOption60 0/1 to select dynamic sleep (0) or sleep (1) (arendst#4497)

* Update with dynamic sleep flag

* Added Support for ButtonN and SwitchN

* RULES: Added BREAK as an alternative ENDON

RULES: Added BREAK as an alternative ENDON that will stop the execution of the following rules.

If a rule that ends with BREAK, is triggered, then the following rules of that set will not be executed. This is useful for cases like: arendst#4477

* Update xsns_22_sr04.ino

* RULES: Added BREAK as an alternative ENDON

* Delete duplicated min and max functions

* Update README.md

* Update _changelog.ino

* Further improve Hass auto discovery

* 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.

* decode-config.py: add new settings

- add 6.3.0.15 setting change
- adapt 6.3.0.13 setting change

* Add GPIO2 for Sonoff Basic Template

Add GPIO2 for Sonoff Basic Template

* Add support for GPIO02 for newer Sonoff Basic

Add support for GPIO02 for newer Sonoff Basic

* Fix Compilation issue with STAGE Core

Now the Stage core has the the same STR macro defined in sonoff.h.

* Create RF-Bridge-EFM8BB1-20181127.hex

ignore RF pulses < 100µs, increased uart RX buffer
-> stopp red led flashing

* Announce switches

* Final fix compile error (arendst#4509)

Final fix soft_spi_flg compile error (arendst#4509)

* Fix logic for ON/OFF vs TOGGLE

* Initial translation to Swedish

* Added Key to select Swedish Translation

* Added Swedish to Precompiled bins

* Added missing "

* Matched the order of days with Tasmota Timers

* Update platformio.ini

Support for enable / disable exceptions code in firmware for esp8266 core 2.5.0 (stage) or up

* localization for Polish - KNX, timers, etc.

* Add Domoticz Selector for Fanspeed

Add support for iFan02 Fanspeed in Domoticz using a selector (arendst#4517)

* Update sonoff.ino

* 6.3.0.16 - Bump version

6.3.0.16 20181201
 * Add support for iFan02 Fanspeed in Domoticz using a selector (arendst#4517)
 * Add Announce Switches to MQTT Discovery (arendst#4531)

* Fix Domoticz Fanspeed

Fix Domoticz Fanspeed

* MCP230xx - Add Interrupt Retain

* MCP230xx driver - add interrupt retention

MCP230xx driver - add interrupt retention over teleperiod.

* Fix HASS discovery of switches

* Announce RGBW light, add 'White' command

* Enabled forced local operation when button- or switchtopic is set

* Update Hass discovery

* v2.1.0012
decode-config.py: add new settings

- add 6.3.0.16 setting change

* decode-config.py: add new settings

- add 6.3.0.16 setting change

* Fix reversed logic when announcing buttons / switches

* add DMP mode to MPU-6050

* fix compile issue on ESP8266

* Clean and shrink lights

Clean and shrink lights

* Add support for device registry

* Update my_user_config.h

* Fix Warning in Platformio if building MPU and KNX together

* USE_MPU6050_DMP moved to my_user_config.h

* USE_MPU6050_DMP moved to my_user_config.h

* Corrected Domoticz Temp published from MPU6050

* decode-config.py: add new settings

- add SetOption61 from PR arendst#4562

* Update my_user_config.h

* Fix language file

Fix language file

* 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 (arendst#3610)
 * Enhance support for MPU6050 using DMP (arendst#4581)

* add manzuko "power strip"

* Add more support

 * Add support for decoding Theo V2 sensors as documented on https://sidweb.nl using 434MHz RF sensor receiver
 * Add support for decoding Alecto V2 sensors like ACH2010, WS3000 and DKW2012 using 868MHz RF sensor receiver
 * Add support for Manzoku Power Strip (arendst#4590)

* Updated Spanish Translation

* Update de-DE.h

* More tweak of Hass switch/button

* Update fr-FR.h

Added SDM220  new strings

* Update fr-FR.h

SDM220 strings  reworked to fit in the space available

* initial work on range-support

* mqtt messages updated

* Publish state message when changing effect

* decode-config.py: Fix `@v` filename template (arendst#4609)

- fix restore filename auto extension

* add debug code to show final command sequence

* correcting memcpy calls

* Add TheoV2 sensor source

Add TheoV2 sensor source and information used with Rf Sensor

* Add LwIP 2 no features (Low Flash)

* Fix ArduinoOTA for Core 2.5.0 (fix is backwards compatible)

arendst#4619

* Fix ArduinoOTA for Core 2.5.0

Fix ArduinoOTA for Core 2.5.0

* Fix HomeAssistant Temp Sensor AutoDiscovery

arendst#4627

* New 2.5.0-2 toolchain does not like uncast bitwise

The new toolchain (2.5.0-2) used from core 2.5.0 does not want bitwise operations to be performed on non-integer variables so we cast the double used in send_2byte_float() to a (long) as it should be.

* Fix NewPing-1.9.1 library.properties

Fix NewPing-1.9.1 library.properties to avoid compiler warning about possibly not supporting ESP8266 whereas we know now that it does. This causes the compiler warning (which may alarm some users unnecessarily) that NewPing claims to run on avr and stm32.

* Updates for release 6.4.0

Updates for release 6.4.0

* Prep for release

Prep for release

* Updates for release 6.4.0

Updates for release 6.4.0

* Updates for release 6.4.0

Updates for release 6.4.0

* Updates for release 6.4.0

Updates for release 6.4.0

* Prep for release

Prep for release

* Updates for release 6.4.0

Updates for release 6.4.0

* Updates for release 6.4.0

Updates for release 6.4.0

* Prep for merge

* 6.4.0.1 New dev release

* Removing duplicate entrys

Options for core 2.5.0 where duplicated

* Update README.md

* Create boards.txt

* Create platform.txt

* No exceptions

* it-IT language updated

* option for firmware directory added

* Ease selecting core versions

Ease selecting core versions by grouping core parameters together. Select core version in group [core_active]

* webserver: swap index and name in module configuration

* Tune driver RF Sensor

- Free memory when driver RF Sensor is compiled but not used.
- Fix possible buffer overflow exceptions
- Add rule and hardware info to source

* introduce new api-call for dimmer-devices

* SerialLog: output CR + LF instead of just LF

* Update linker files

Update linker files to released linker files for coe 2.4.2 and up

* Add sk-SK language

* Update bg-BG.h

* Add support for AZ-Instrument 7798 CO2 meter/datalogger.

* Add support for AZ-Instrument 7798 CO2 meter/datalogger.

* Revert platformio.ini and my_user_config to original version,
adding line for new sensor but leaving it commented out.

* Include changes from original into sonoff/language/bg-BG.h

* Updated from originals: platformio.ini, sonoff/my_user_config.h.

* Revert to original RELEASENOTES.md.

* Add void to functions without parameters

* Fix temperature conversion

Fix temperature conversion to still use ConvertTemp() even if meter sends the value in F

* Add support for AZ-Instrument 7798 CO2

Add support for AZ-Instrument 7798 CO2 meter/datalogger

* pressure unit of measure reporting

Added a dedicated pressure sensor management to report back as pressure sensor and not fallback as a generic sensor in HA autodiscovery process

* add missing units of measurements for energy

* removed some errors from copy pasting..

* add empty unit of measurement for any sensors

* Added option for checking mqtt tls against root ca

Signed-off-by: Frank Meies <19324766+fmeies@users.noreply.github.com>

* Change RAM usage BMP/BME

Change RAM usage BMP/BME I2C sensors

* Update Arduino IDE core 2.5.0 files

Update Arduino IDE core 2.5.0 files

* Fix wifi strongest signal detection

Fix wifi strongest signal detection (arendst#4704)

* 6.4.0.2 Fix possible dtostrf bos

6.4.0.2 20181221
 * Fix possible dtostrf buffer overflows by increasing buffers

* Still need patched PWM for core 2.5.0

Still need patched PWM for core 2.5.0

* Check for core version when enabling tls ca cert

Signed-off-by: Frank Meies <19324766+fmeies@users.noreply.github.com>

* Check for core version when enabling tls ca cert, changed names of defines

Signed-off-by: Frank Meies <19324766+fmeies@users.noreply.github.com>

* Remove SetOption55 (hass_short_discovery_msg)

* Rename HASS discovery string constants

* Remove Alexa message "this value is outside the range of the device"

* 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 (arendst#4711)
 * Change FallbackTopic detection (arendst#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 (arendst#4673)
 * Fix Alexa "this value is outside the range of the device". Needs power cycle and Alexa deletion/discovery cycle. (arendst#3159, arendst#4712)

* Add optional TLS_CA_CERT

Add define USE_MQTT_TLS_CA_CERT for checking MQTT TLS against root ca using Let's Encrypt cert from sonoff_letsencrypt.h - not supported with core 2.3.0 (arendst#4703)

* decode-config.py: adapt settings change

- remove SetOption55 (hass_short_discovery_msg)

* Change FallbackTopic

Change FallbackTopic from cmnd/<mqttclient>/ to cmnd/<mqttclient>_fb/ to discriminate from Topic (arendst#1528)

* PS_16_DZ: fix broken if-statement

* Change MQTT GUI password handling

Change MQTT GUI password handling (arendst#4723)

* Release 6.4.1

* 6.4.1.1 Fix most compiler warnings

6.4.1.1 20181224
 * Fix most compiler warnings

* Fix compiler warning

Fix compiler warning

* Change switch debounce

Change switch input detection by optimizing switch debounce (arendst#4724)

* Add INPUT_PULLUP option for single DS18B20

* Add variable %timestamp% to be used in rules

This PR adds a new variable %timestamp% to be used in a rule to allow the user to include the Time Stamp as Tasmota has for Status, Sensors, etc, for example:

Command:

publish stat/topic/sensor {"Time":"%timestamp%","mysensor":"%var1%"}

Output:

{"Time":"2018-12-27T12:52:57","mysensor":"1"}

(arendst#4734)

* 6.4.1.2 Rewrite Switch driver

6.4.1.2 20181228
 * Change switch driver making it modular and introduce input filter (arendst#4665, arendst#4724)
 * Add define DS18B20_INTERNAL_PULLUP to select internal input pullup when only one DS18B20 sensor is connected eliminating external resistor (arendst#4738)
 * Add variable %timestamp% to rules (arendst#4749)

* Update platformio.ini with stage

Update platformio.ini with latest stage option

* Prep for template tuning

* 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

* Fix Typo in Spanish Translation

* Fix MGC3130/AZ7798 compile error

* Add debugging options to Switch

Add more debugging options to Switch using SwitchDebounce

* Fix DS3231 driver

Fix DS3231 driver breaking function chain (arendst#4759)

* Disable unused feature

* Revert "Disable unused feature"

This reverts commit 8fe61f6.

* Add test for result usage

* Add tests for result
wienerdogracing added a commit to wienerdogracing/Sonoff-Tasmota that referenced this pull request Dec 31, 2018
* PS_16_DZ: GPIO13 => LED1

* PS_16_DZ: cleanup code

* Add Command CalcRes

* Update settings.ino

* Update decode-config.py

* Add SetOption59 info

Add SetOption59 info

* decode-config.py: add 6.3.0.11 to .14 settings

* Add dynamic buffer space

Make serial buffer space reservation dynamic

* Add dynamic buffer space

Add dynamic buffer space

* Fix dynamic buffer handling

Fix dynamic buffer handling

* Move static to dynamic buffers

 * Add support for SM Smart Wifi Dimmer PS-16-DZ (arendst#4465)
 * Move some static (serial) buffers to dynamic buffers

* Prep for Software SPI

Prep for Software SPI used by some displays

* PS_16_DZ: only update brightness if it actually changed

* PS_16_DZ: reduce buffer-size and actually check for overflow

* PS_16_DZ: optimize for size

* PS_16_DZ: further optimization

* PS_16_DZ: leave space for trailing 0-byte

* Hass: Restart if topic is changed

* PS_16_DZ: cleanup

* Fix possible overflow situation

Fix possible overflow situation

* Small improvements to Hass MQTT discovery

* Add support for Teckin US

Add support for Teckin US Wifi Smart Switch with Energy Monitoring (arendst#4481)

* Update display and epaper drivers

Update display and epaper drivers

* switch to using NewPing lib directly for sr04
add NewPing-1.9.1 lib

* Housekeeping

* Upd settings.ino - set sleep=0 when SetOption36>0

Update settings.ino - set sleep=0 when SetOption36>0

* Prevent sleep and SetOption36 being used concurrently

Prevent sleep and SetOption36 being used concurrently

* Fix sleep->SetOption36 transition

* Update fr-FR.h

Synced with changes since  v6.2.1.7

* Merge sleep command

* Bump version to 0x0603000F

Bump version to 0x0603000F to make sure new sleep command takes effect on 50 as default for upgrades where sleep is < 50.

* Update support_wifi.ino

* 6.3.0.15 Update dynamic sleep

6.3.0.15 20181201
 * Removed command SetOption36 (arendst#4497)
 * Add command SetOption60 0/1 to select dynamic sleep (0) or sleep (1) (arendst#4497)

* Update with dynamic sleep flag

* Added Support for ButtonN and SwitchN

* RULES: Added BREAK as an alternative ENDON

RULES: Added BREAK as an alternative ENDON that will stop the execution of the following rules.

If a rule that ends with BREAK, is triggered, then the following rules of that set will not be executed. This is useful for cases like: arendst#4477

* Update xsns_22_sr04.ino

* RULES: Added BREAK as an alternative ENDON

* Delete duplicated min and max functions

* Update README.md

* Update _changelog.ino

* Further improve Hass auto discovery

* 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.

* decode-config.py: add new settings

- add 6.3.0.15 setting change
- adapt 6.3.0.13 setting change

* Add GPIO2 for Sonoff Basic Template

Add GPIO2 for Sonoff Basic Template

* Add support for GPIO02 for newer Sonoff Basic

Add support for GPIO02 for newer Sonoff Basic

* Fix Compilation issue with STAGE Core

Now the Stage core has the the same STR macro defined in sonoff.h.

* Create RF-Bridge-EFM8BB1-20181127.hex

ignore RF pulses < 100µs, increased uart RX buffer
-> stopp red led flashing

* Announce switches

* Final fix compile error (arendst#4509)

Final fix soft_spi_flg compile error (arendst#4509)

* Fix logic for ON/OFF vs TOGGLE

* Initial translation to Swedish

* Added Key to select Swedish Translation

* Added Swedish to Precompiled bins

* Added missing "

* Matched the order of days with Tasmota Timers

* Update platformio.ini

Support for enable / disable exceptions code in firmware for esp8266 core 2.5.0 (stage) or up

* localization for Polish - KNX, timers, etc.

* Add Domoticz Selector for Fanspeed

Add support for iFan02 Fanspeed in Domoticz using a selector (arendst#4517)

* Update sonoff.ino

* 6.3.0.16 - Bump version

6.3.0.16 20181201
 * Add support for iFan02 Fanspeed in Domoticz using a selector (arendst#4517)
 * Add Announce Switches to MQTT Discovery (arendst#4531)

* Fix Domoticz Fanspeed

Fix Domoticz Fanspeed

* MCP230xx - Add Interrupt Retain

* MCP230xx driver - add interrupt retention

MCP230xx driver - add interrupt retention over teleperiod.

* Fix HASS discovery of switches

* Announce RGBW light, add 'White' command

* Enabled forced local operation when button- or switchtopic is set

* Update Hass discovery

* v2.1.0012
decode-config.py: add new settings

- add 6.3.0.16 setting change

* decode-config.py: add new settings

- add 6.3.0.16 setting change

* Fix reversed logic when announcing buttons / switches

* add DMP mode to MPU-6050

* fix compile issue on ESP8266

* Clean and shrink lights

Clean and shrink lights

* Add support for device registry

* Update my_user_config.h

* Fix Warning in Platformio if building MPU and KNX together

* USE_MPU6050_DMP moved to my_user_config.h

* USE_MPU6050_DMP moved to my_user_config.h

* Corrected Domoticz Temp published from MPU6050

* decode-config.py: add new settings

- add SetOption61 from PR arendst#4562

* Update my_user_config.h

* Fix language file

Fix language file

* 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 (arendst#3610)
 * Enhance support for MPU6050 using DMP (arendst#4581)

* add manzuko "power strip"

* Add more support

 * Add support for decoding Theo V2 sensors as documented on https://sidweb.nl using 434MHz RF sensor receiver
 * Add support for decoding Alecto V2 sensors like ACH2010, WS3000 and DKW2012 using 868MHz RF sensor receiver
 * Add support for Manzoku Power Strip (arendst#4590)

* Updated Spanish Translation

* Update de-DE.h

* More tweak of Hass switch/button

* Update fr-FR.h

Added SDM220  new strings

* Update fr-FR.h

SDM220 strings  reworked to fit in the space available

* initial work on range-support

* mqtt messages updated

* Publish state message when changing effect

* decode-config.py: Fix `@v` filename template (arendst#4609)

- fix restore filename auto extension

* add debug code to show final command sequence

* correcting memcpy calls

* Add TheoV2 sensor source

Add TheoV2 sensor source and information used with Rf Sensor

* Add LwIP 2 no features (Low Flash)

* Fix ArduinoOTA for Core 2.5.0 (fix is backwards compatible)

arendst#4619

* Fix ArduinoOTA for Core 2.5.0

Fix ArduinoOTA for Core 2.5.0

* Fix HomeAssistant Temp Sensor AutoDiscovery

arendst#4627

* New 2.5.0-2 toolchain does not like uncast bitwise

The new toolchain (2.5.0-2) used from core 2.5.0 does not want bitwise operations to be performed on non-integer variables so we cast the double used in send_2byte_float() to a (long) as it should be.

* Fix NewPing-1.9.1 library.properties

Fix NewPing-1.9.1 library.properties to avoid compiler warning about possibly not supporting ESP8266 whereas we know now that it does. This causes the compiler warning (which may alarm some users unnecessarily) that NewPing claims to run on avr and stm32.

* Updates for release 6.4.0

Updates for release 6.4.0

* Prep for release

Prep for release

* Updates for release 6.4.0

Updates for release 6.4.0

* Updates for release 6.4.0

Updates for release 6.4.0

* Updates for release 6.4.0

Updates for release 6.4.0

* Prep for release

Prep for release

* Updates for release 6.4.0

Updates for release 6.4.0

* Updates for release 6.4.0

Updates for release 6.4.0

* Prep for merge

* 6.4.0.1 New dev release

* Removing duplicate entrys

Options for core 2.5.0 where duplicated

* Update README.md

* Create boards.txt

* Create platform.txt

* No exceptions

* it-IT language updated

* option for firmware directory added

* Ease selecting core versions

Ease selecting core versions by grouping core parameters together. Select core version in group [core_active]

* webserver: swap index and name in module configuration

* Tune driver RF Sensor

- Free memory when driver RF Sensor is compiled but not used.
- Fix possible buffer overflow exceptions
- Add rule and hardware info to source

* introduce new api-call for dimmer-devices

* SerialLog: output CR + LF instead of just LF

* Update linker files

Update linker files to released linker files for coe 2.4.2 and up

* Add sk-SK language

* Update bg-BG.h

* Add support for AZ-Instrument 7798 CO2 meter/datalogger.

* Add support for AZ-Instrument 7798 CO2 meter/datalogger.

* Revert platformio.ini and my_user_config to original version,
adding line for new sensor but leaving it commented out.

* Include changes from original into sonoff/language/bg-BG.h

* Updated from originals: platformio.ini, sonoff/my_user_config.h.

* Revert to original RELEASENOTES.md.

* Add void to functions without parameters

* Fix temperature conversion

Fix temperature conversion to still use ConvertTemp() even if meter sends the value in F

* Add support for AZ-Instrument 7798 CO2

Add support for AZ-Instrument 7798 CO2 meter/datalogger

* pressure unit of measure reporting

Added a dedicated pressure sensor management to report back as pressure sensor and not fallback as a generic sensor in HA autodiscovery process

* add missing units of measurements for energy

* removed some errors from copy pasting..

* add empty unit of measurement for any sensors

* Added option for checking mqtt tls against root ca

Signed-off-by: Frank Meies <19324766+fmeies@users.noreply.github.com>

* Change RAM usage BMP/BME

Change RAM usage BMP/BME I2C sensors

* Update Arduino IDE core 2.5.0 files

Update Arduino IDE core 2.5.0 files

* Fix wifi strongest signal detection

Fix wifi strongest signal detection (arendst#4704)

* 6.4.0.2 Fix possible dtostrf bos

6.4.0.2 20181221
 * Fix possible dtostrf buffer overflows by increasing buffers

* Still need patched PWM for core 2.5.0

Still need patched PWM for core 2.5.0

* Check for core version when enabling tls ca cert

Signed-off-by: Frank Meies <19324766+fmeies@users.noreply.github.com>

* Check for core version when enabling tls ca cert, changed names of defines

Signed-off-by: Frank Meies <19324766+fmeies@users.noreply.github.com>

* Remove SetOption55 (hass_short_discovery_msg)

* Rename HASS discovery string constants

* Remove Alexa message "this value is outside the range of the device"

* 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 (arendst#4711)
 * Change FallbackTopic detection (arendst#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 (arendst#4673)
 * Fix Alexa "this value is outside the range of the device". Needs power cycle and Alexa deletion/discovery cycle. (arendst#3159, arendst#4712)

* Add optional TLS_CA_CERT

Add define USE_MQTT_TLS_CA_CERT for checking MQTT TLS against root ca using Let's Encrypt cert from sonoff_letsencrypt.h - not supported with core 2.3.0 (arendst#4703)

* decode-config.py: adapt settings change

- remove SetOption55 (hass_short_discovery_msg)

* Change FallbackTopic

Change FallbackTopic from cmnd/<mqttclient>/ to cmnd/<mqttclient>_fb/ to discriminate from Topic (arendst#1528)

* PS_16_DZ: fix broken if-statement

* Change MQTT GUI password handling

Change MQTT GUI password handling (arendst#4723)

* Release 6.4.1

* 6.4.1.1 Fix most compiler warnings

6.4.1.1 20181224
 * Fix most compiler warnings

* Fix compiler warning

Fix compiler warning

* Change switch debounce

Change switch input detection by optimizing switch debounce (arendst#4724)

* Add INPUT_PULLUP option for single DS18B20

* Add variable %timestamp% to be used in rules

This PR adds a new variable %timestamp% to be used in a rule to allow the user to include the Time Stamp as Tasmota has for Status, Sensors, etc, for example:

Command:

publish stat/topic/sensor {"Time":"%timestamp%","mysensor":"%var1%"}

Output:

{"Time":"2018-12-27T12:52:57","mysensor":"1"}

(arendst#4734)

* 6.4.1.2 Rewrite Switch driver

6.4.1.2 20181228
 * Change switch driver making it modular and introduce input filter (arendst#4665, arendst#4724)
 * Add define DS18B20_INTERNAL_PULLUP to select internal input pullup when only one DS18B20 sensor is connected eliminating external resistor (arendst#4738)
 * Add variable %timestamp% to rules (arendst#4749)

* Update platformio.ini with stage

Update platformio.ini with latest stage option

* Prep for template tuning

* 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

* Fix Typo in Spanish Translation

* Fix MGC3130/AZ7798 compile error

* Add debugging options to Switch

Add more debugging options to Switch using SwitchDebounce

* Fix DS3231 driver

Fix DS3231 driver breaking function chain (arendst#4759)

* Disable unused feature

* Revert "Disable unused feature"

This reverts commit 8fe61f6.

* Add test for result usage

* Add tests for result
wienerdogracing added a commit to wienerdogracing/Sonoff-Tasmota that referenced this pull request Dec 31, 2018
* PS_16_DZ: GPIO13 => LED1

* PS_16_DZ: cleanup code

* Add Command CalcRes

* Update settings.ino

* Update decode-config.py

* Add SetOption59 info

Add SetOption59 info

* decode-config.py: add 6.3.0.11 to .14 settings

* Add dynamic buffer space

Make serial buffer space reservation dynamic

* Add dynamic buffer space

Add dynamic buffer space

* Fix dynamic buffer handling

Fix dynamic buffer handling

* Move static to dynamic buffers

 * Add support for SM Smart Wifi Dimmer PS-16-DZ (arendst#4465)
 * Move some static (serial) buffers to dynamic buffers

* Prep for Software SPI

Prep for Software SPI used by some displays

* PS_16_DZ: only update brightness if it actually changed

* PS_16_DZ: reduce buffer-size and actually check for overflow

* PS_16_DZ: optimize for size

* PS_16_DZ: further optimization

* PS_16_DZ: leave space for trailing 0-byte

* Hass: Restart if topic is changed

* PS_16_DZ: cleanup

* Fix possible overflow situation

Fix possible overflow situation

* Small improvements to Hass MQTT discovery

* Add support for Teckin US

Add support for Teckin US Wifi Smart Switch with Energy Monitoring (arendst#4481)

* Update display and epaper drivers

Update display and epaper drivers

* switch to using NewPing lib directly for sr04
add NewPing-1.9.1 lib

* Housekeeping

* Upd settings.ino - set sleep=0 when SetOption36>0

Update settings.ino - set sleep=0 when SetOption36>0

* Prevent sleep and SetOption36 being used concurrently

Prevent sleep and SetOption36 being used concurrently

* Fix sleep->SetOption36 transition

* Update fr-FR.h

Synced with changes since  v6.2.1.7

* Merge sleep command

* Bump version to 0x0603000F

Bump version to 0x0603000F to make sure new sleep command takes effect on 50 as default for upgrades where sleep is < 50.

* Update support_wifi.ino

* 6.3.0.15 Update dynamic sleep

6.3.0.15 20181201
 * Removed command SetOption36 (arendst#4497)
 * Add command SetOption60 0/1 to select dynamic sleep (0) or sleep (1) (arendst#4497)

* Update with dynamic sleep flag

* Added Support for ButtonN and SwitchN

* RULES: Added BREAK as an alternative ENDON

RULES: Added BREAK as an alternative ENDON that will stop the execution of the following rules.

If a rule that ends with BREAK, is triggered, then the following rules of that set will not be executed. This is useful for cases like: arendst#4477

* Update xsns_22_sr04.ino

* RULES: Added BREAK as an alternative ENDON

* Delete duplicated min and max functions

* Update README.md

* Update _changelog.ino

* Further improve Hass auto discovery

* 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.

* decode-config.py: add new settings

- add 6.3.0.15 setting change
- adapt 6.3.0.13 setting change

* Add GPIO2 for Sonoff Basic Template

Add GPIO2 for Sonoff Basic Template

* Add support for GPIO02 for newer Sonoff Basic

Add support for GPIO02 for newer Sonoff Basic

* Fix Compilation issue with STAGE Core

Now the Stage core has the the same STR macro defined in sonoff.h.

* Create RF-Bridge-EFM8BB1-20181127.hex

ignore RF pulses < 100µs, increased uart RX buffer
-> stopp red led flashing

* Announce switches

* Final fix compile error (arendst#4509)

Final fix soft_spi_flg compile error (arendst#4509)

* Fix logic for ON/OFF vs TOGGLE

* Initial translation to Swedish

* Added Key to select Swedish Translation

* Added Swedish to Precompiled bins

* Added missing "

* Matched the order of days with Tasmota Timers

* Update platformio.ini

Support for enable / disable exceptions code in firmware for esp8266 core 2.5.0 (stage) or up

* localization for Polish - KNX, timers, etc.

* Add Domoticz Selector for Fanspeed

Add support for iFan02 Fanspeed in Domoticz using a selector (arendst#4517)

* Update sonoff.ino

* 6.3.0.16 - Bump version

6.3.0.16 20181201
 * Add support for iFan02 Fanspeed in Domoticz using a selector (arendst#4517)
 * Add Announce Switches to MQTT Discovery (arendst#4531)

* Fix Domoticz Fanspeed

Fix Domoticz Fanspeed

* MCP230xx - Add Interrupt Retain

* MCP230xx driver - add interrupt retention

MCP230xx driver - add interrupt retention over teleperiod.

* Fix HASS discovery of switches

* Announce RGBW light, add 'White' command

* Enabled forced local operation when button- or switchtopic is set

* Update Hass discovery

* v2.1.0012
decode-config.py: add new settings

- add 6.3.0.16 setting change

* decode-config.py: add new settings

- add 6.3.0.16 setting change

* Fix reversed logic when announcing buttons / switches

* add DMP mode to MPU-6050

* fix compile issue on ESP8266

* Clean and shrink lights

Clean and shrink lights

* Add support for device registry

* Update my_user_config.h

* Fix Warning in Platformio if building MPU and KNX together

* USE_MPU6050_DMP moved to my_user_config.h

* USE_MPU6050_DMP moved to my_user_config.h

* Corrected Domoticz Temp published from MPU6050

* decode-config.py: add new settings

- add SetOption61 from PR arendst#4562

* Update my_user_config.h

* Fix language file

Fix language file

* 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 (arendst#3610)
 * Enhance support for MPU6050 using DMP (arendst#4581)

* add manzuko "power strip"

* Add more support

 * Add support for decoding Theo V2 sensors as documented on https://sidweb.nl using 434MHz RF sensor receiver
 * Add support for decoding Alecto V2 sensors like ACH2010, WS3000 and DKW2012 using 868MHz RF sensor receiver
 * Add support for Manzoku Power Strip (arendst#4590)

* Updated Spanish Translation

* Update de-DE.h

* More tweak of Hass switch/button

* Update fr-FR.h

Added SDM220  new strings

* Update fr-FR.h

SDM220 strings  reworked to fit in the space available

* initial work on range-support

* mqtt messages updated

* Publish state message when changing effect

* decode-config.py: Fix `@v` filename template (arendst#4609)

- fix restore filename auto extension

* add debug code to show final command sequence

* correcting memcpy calls

* Add TheoV2 sensor source

Add TheoV2 sensor source and information used with Rf Sensor

* Add LwIP 2 no features (Low Flash)

* Fix ArduinoOTA for Core 2.5.0 (fix is backwards compatible)

arendst#4619

* Fix ArduinoOTA for Core 2.5.0

Fix ArduinoOTA for Core 2.5.0

* Fix HomeAssistant Temp Sensor AutoDiscovery

arendst#4627

* New 2.5.0-2 toolchain does not like uncast bitwise

The new toolchain (2.5.0-2) used from core 2.5.0 does not want bitwise operations to be performed on non-integer variables so we cast the double used in send_2byte_float() to a (long) as it should be.

* Fix NewPing-1.9.1 library.properties

Fix NewPing-1.9.1 library.properties to avoid compiler warning about possibly not supporting ESP8266 whereas we know now that it does. This causes the compiler warning (which may alarm some users unnecessarily) that NewPing claims to run on avr and stm32.

* Updates for release 6.4.0

Updates for release 6.4.0

* Prep for release

Prep for release

* Updates for release 6.4.0

Updates for release 6.4.0

* Updates for release 6.4.0

Updates for release 6.4.0

* Updates for release 6.4.0

Updates for release 6.4.0

* Prep for release

Prep for release

* Updates for release 6.4.0

Updates for release 6.4.0

* Updates for release 6.4.0

Updates for release 6.4.0

* Prep for merge

* 6.4.0.1 New dev release

* Removing duplicate entrys

Options for core 2.5.0 where duplicated

* Update README.md

* Create boards.txt

* Create platform.txt

* No exceptions

* it-IT language updated

* option for firmware directory added

* Ease selecting core versions

Ease selecting core versions by grouping core parameters together. Select core version in group [core_active]

* webserver: swap index and name in module configuration

* Tune driver RF Sensor

- Free memory when driver RF Sensor is compiled but not used.
- Fix possible buffer overflow exceptions
- Add rule and hardware info to source

* introduce new api-call for dimmer-devices

* SerialLog: output CR + LF instead of just LF

* Update linker files

Update linker files to released linker files for coe 2.4.2 and up

* Add sk-SK language

* Update bg-BG.h

* Add support for AZ-Instrument 7798 CO2 meter/datalogger.

* Add support for AZ-Instrument 7798 CO2 meter/datalogger.

* Revert platformio.ini and my_user_config to original version,
adding line for new sensor but leaving it commented out.

* Include changes from original into sonoff/language/bg-BG.h

* Updated from originals: platformio.ini, sonoff/my_user_config.h.

* Revert to original RELEASENOTES.md.

* Add void to functions without parameters

* Fix temperature conversion

Fix temperature conversion to still use ConvertTemp() even if meter sends the value in F

* Add support for AZ-Instrument 7798 CO2

Add support for AZ-Instrument 7798 CO2 meter/datalogger

* pressure unit of measure reporting

Added a dedicated pressure sensor management to report back as pressure sensor and not fallback as a generic sensor in HA autodiscovery process

* add missing units of measurements for energy

* removed some errors from copy pasting..

* add empty unit of measurement for any sensors

* Added option for checking mqtt tls against root ca

Signed-off-by: Frank Meies <19324766+fmeies@users.noreply.github.com>

* Change RAM usage BMP/BME

Change RAM usage BMP/BME I2C sensors

* Update Arduino IDE core 2.5.0 files

Update Arduino IDE core 2.5.0 files

* Fix wifi strongest signal detection

Fix wifi strongest signal detection (arendst#4704)

* 6.4.0.2 Fix possible dtostrf bos

6.4.0.2 20181221
 * Fix possible dtostrf buffer overflows by increasing buffers

* Still need patched PWM for core 2.5.0

Still need patched PWM for core 2.5.0

* Check for core version when enabling tls ca cert

Signed-off-by: Frank Meies <19324766+fmeies@users.noreply.github.com>

* Check for core version when enabling tls ca cert, changed names of defines

Signed-off-by: Frank Meies <19324766+fmeies@users.noreply.github.com>

* Remove SetOption55 (hass_short_discovery_msg)

* Rename HASS discovery string constants

* Remove Alexa message "this value is outside the range of the device"

* 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 (arendst#4711)
 * Change FallbackTopic detection (arendst#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 (arendst#4673)
 * Fix Alexa "this value is outside the range of the device". Needs power cycle and Alexa deletion/discovery cycle. (arendst#3159, arendst#4712)

* Add optional TLS_CA_CERT

Add define USE_MQTT_TLS_CA_CERT for checking MQTT TLS against root ca using Let's Encrypt cert from sonoff_letsencrypt.h - not supported with core 2.3.0 (arendst#4703)

* decode-config.py: adapt settings change

- remove SetOption55 (hass_short_discovery_msg)

* Change FallbackTopic

Change FallbackTopic from cmnd/<mqttclient>/ to cmnd/<mqttclient>_fb/ to discriminate from Topic (arendst#1528)

* PS_16_DZ: fix broken if-statement

* Change MQTT GUI password handling

Change MQTT GUI password handling (arendst#4723)

* Release 6.4.1

* 6.4.1.1 Fix most compiler warnings

6.4.1.1 20181224
 * Fix most compiler warnings

* Fix compiler warning

Fix compiler warning

* Change switch debounce

Change switch input detection by optimizing switch debounce (arendst#4724)

* Add INPUT_PULLUP option for single DS18B20

* Add variable %timestamp% to be used in rules

This PR adds a new variable %timestamp% to be used in a rule to allow the user to include the Time Stamp as Tasmota has for Status, Sensors, etc, for example:

Command:

publish stat/topic/sensor {"Time":"%timestamp%","mysensor":"%var1%"}

Output:

{"Time":"2018-12-27T12:52:57","mysensor":"1"}

(arendst#4734)

* 6.4.1.2 Rewrite Switch driver

6.4.1.2 20181228
 * Change switch driver making it modular and introduce input filter (arendst#4665, arendst#4724)
 * Add define DS18B20_INTERNAL_PULLUP to select internal input pullup when only one DS18B20 sensor is connected eliminating external resistor (arendst#4738)
 * Add variable %timestamp% to rules (arendst#4749)

* Update platformio.ini with stage

Update platformio.ini with latest stage option

* Prep for template tuning

* 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

* Fix Typo in Spanish Translation

* Fix MGC3130/AZ7798 compile error

* Add debugging options to Switch

Add more debugging options to Switch using SwitchDebounce

* Fix DS3231 driver

Fix DS3231 driver breaking function chain (arendst#4759)

* Disable unused feature

* Revert "Disable unused feature"

This reverts commit 8fe61f6.

* Add test for result usage

* Add tests for result
wienerdogracing added a commit to wienerdogracing/Sonoff-Tasmota that referenced this pull request Dec 31, 2018
* Release 6.2.0

Release 6.2.0

* Prep release

* Prep release

* Visual Studio Code adds

* Added Timeprop and PID

* Merge to 6.4.1 (#1) (#2)

* PS_16_DZ: GPIO13 => LED1

* PS_16_DZ: cleanup code

* Add Command CalcRes

* Update settings.ino

* Update decode-config.py

* Add SetOption59 info

Add SetOption59 info

* decode-config.py: add 6.3.0.11 to .14 settings

* Add dynamic buffer space

Make serial buffer space reservation dynamic

* Add dynamic buffer space

Add dynamic buffer space

* Fix dynamic buffer handling

Fix dynamic buffer handling

* Move static to dynamic buffers

 * Add support for SM Smart Wifi Dimmer PS-16-DZ (arendst#4465)
 * Move some static (serial) buffers to dynamic buffers

* Prep for Software SPI

Prep for Software SPI used by some displays

* PS_16_DZ: only update brightness if it actually changed

* PS_16_DZ: reduce buffer-size and actually check for overflow

* PS_16_DZ: optimize for size

* PS_16_DZ: further optimization

* PS_16_DZ: leave space for trailing 0-byte

* Hass: Restart if topic is changed

* PS_16_DZ: cleanup

* Fix possible overflow situation

Fix possible overflow situation

* Small improvements to Hass MQTT discovery

* Add support for Teckin US

Add support for Teckin US Wifi Smart Switch with Energy Monitoring (arendst#4481)

* Update display and epaper drivers

Update display and epaper drivers

* switch to using NewPing lib directly for sr04
add NewPing-1.9.1 lib

* Housekeeping

* Upd settings.ino - set sleep=0 when SetOption36>0

Update settings.ino - set sleep=0 when SetOption36>0

* Prevent sleep and SetOption36 being used concurrently

Prevent sleep and SetOption36 being used concurrently

* Fix sleep->SetOption36 transition

* Update fr-FR.h

Synced with changes since  v6.2.1.7

* Merge sleep command

* Bump version to 0x0603000F

Bump version to 0x0603000F to make sure new sleep command takes effect on 50 as default for upgrades where sleep is < 50.

* Update support_wifi.ino

* 6.3.0.15 Update dynamic sleep

6.3.0.15 20181201
 * Removed command SetOption36 (arendst#4497)
 * Add command SetOption60 0/1 to select dynamic sleep (0) or sleep (1) (arendst#4497)

* Update with dynamic sleep flag

* Added Support for ButtonN and SwitchN

* RULES: Added BREAK as an alternative ENDON

RULES: Added BREAK as an alternative ENDON that will stop the execution of the following rules.

If a rule that ends with BREAK, is triggered, then the following rules of that set will not be executed. This is useful for cases like: arendst#4477

* Update xsns_22_sr04.ino

* RULES: Added BREAK as an alternative ENDON

* Delete duplicated min and max functions

* Update README.md

* Update _changelog.ino

* Further improve Hass auto discovery

* 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.

* decode-config.py: add new settings

- add 6.3.0.15 setting change
- adapt 6.3.0.13 setting change

* Add GPIO2 for Sonoff Basic Template

Add GPIO2 for Sonoff Basic Template

* Add support for GPIO02 for newer Sonoff Basic

Add support for GPIO02 for newer Sonoff Basic

* Fix Compilation issue with STAGE Core

Now the Stage core has the the same STR macro defined in sonoff.h.

* Create RF-Bridge-EFM8BB1-20181127.hex

ignore RF pulses < 100µs, increased uart RX buffer
-> stopp red led flashing

* Announce switches

* Final fix compile error (arendst#4509)

Final fix soft_spi_flg compile error (arendst#4509)

* Fix logic for ON/OFF vs TOGGLE

* Initial translation to Swedish

* Added Key to select Swedish Translation

* Added Swedish to Precompiled bins

* Added missing "

* Matched the order of days with Tasmota Timers

* Update platformio.ini

Support for enable / disable exceptions code in firmware for esp8266 core 2.5.0 (stage) or up

* localization for Polish - KNX, timers, etc.

* Add Domoticz Selector for Fanspeed

Add support for iFan02 Fanspeed in Domoticz using a selector (arendst#4517)

* Update sonoff.ino

* 6.3.0.16 - Bump version

6.3.0.16 20181201
 * Add support for iFan02 Fanspeed in Domoticz using a selector (arendst#4517)
 * Add Announce Switches to MQTT Discovery (arendst#4531)

* Fix Domoticz Fanspeed

Fix Domoticz Fanspeed

* MCP230xx - Add Interrupt Retain

* MCP230xx driver - add interrupt retention

MCP230xx driver - add interrupt retention over teleperiod.

* Fix HASS discovery of switches

* Announce RGBW light, add 'White' command

* Enabled forced local operation when button- or switchtopic is set

* Update Hass discovery

* v2.1.0012
decode-config.py: add new settings

- add 6.3.0.16 setting change

* decode-config.py: add new settings

- add 6.3.0.16 setting change

* Fix reversed logic when announcing buttons / switches

* add DMP mode to MPU-6050

* fix compile issue on ESP8266

* Clean and shrink lights

Clean and shrink lights

* Add support for device registry

* Update my_user_config.h

* Fix Warning in Platformio if building MPU and KNX together

* USE_MPU6050_DMP moved to my_user_config.h

* USE_MPU6050_DMP moved to my_user_config.h

* Corrected Domoticz Temp published from MPU6050

* decode-config.py: add new settings

- add SetOption61 from PR arendst#4562

* Update my_user_config.h

* Fix language file

Fix language file

* 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 (arendst#3610)
 * Enhance support for MPU6050 using DMP (arendst#4581)

* add manzuko "power strip"

* Add more support

 * Add support for decoding Theo V2 sensors as documented on https://sidweb.nl using 434MHz RF sensor receiver
 * Add support for decoding Alecto V2 sensors like ACH2010, WS3000 and DKW2012 using 868MHz RF sensor receiver
 * Add support for Manzoku Power Strip (arendst#4590)

* Updated Spanish Translation

* Update de-DE.h

* More tweak of Hass switch/button

* Update fr-FR.h

Added SDM220  new strings

* Update fr-FR.h

SDM220 strings  reworked to fit in the space available

* initial work on range-support

* mqtt messages updated

* Publish state message when changing effect

* decode-config.py: Fix `@v` filename template (arendst#4609)

- fix restore filename auto extension

* add debug code to show final command sequence

* correcting memcpy calls

* Add TheoV2 sensor source

Add TheoV2 sensor source and information used with Rf Sensor

* Add LwIP 2 no features (Low Flash)

* Fix ArduinoOTA for Core 2.5.0 (fix is backwards compatible)

arendst#4619

* Fix ArduinoOTA for Core 2.5.0

Fix ArduinoOTA for Core 2.5.0

* Fix HomeAssistant Temp Sensor AutoDiscovery

arendst#4627

* New 2.5.0-2 toolchain does not like uncast bitwise

The new toolchain (2.5.0-2) used from core 2.5.0 does not want bitwise operations to be performed on non-integer variables so we cast the double used in send_2byte_float() to a (long) as it should be.

* Fix NewPing-1.9.1 library.properties

Fix NewPing-1.9.1 library.properties to avoid compiler warning about possibly not supporting ESP8266 whereas we know now that it does. This causes the compiler warning (which may alarm some users unnecessarily) that NewPing claims to run on avr and stm32.

* Updates for release 6.4.0

Updates for release 6.4.0

* Prep for release

Prep for release

* Updates for release 6.4.0

Updates for release 6.4.0

* Updates for release 6.4.0

Updates for release 6.4.0

* Updates for release 6.4.0

Updates for release 6.4.0

* Prep for release

Prep for release

* Updates for release 6.4.0

Updates for release 6.4.0

* Updates for release 6.4.0

Updates for release 6.4.0

* Prep for merge

* 6.4.0.1 New dev release

* Removing duplicate entrys

Options for core 2.5.0 where duplicated

* Update README.md

* Create boards.txt

* Create platform.txt

* No exceptions

* it-IT language updated

* option for firmware directory added

* Ease selecting core versions

Ease selecting core versions by grouping core parameters together. Select core version in group [core_active]

* webserver: swap index and name in module configuration

* Tune driver RF Sensor

- Free memory when driver RF Sensor is compiled but not used.
- Fix possible buffer overflow exceptions
- Add rule and hardware info to source

* introduce new api-call for dimmer-devices

* SerialLog: output CR + LF instead of just LF

* Update linker files

Update linker files to released linker files for coe 2.4.2 and up

* Add sk-SK language

* Update bg-BG.h

* Add support for AZ-Instrument 7798 CO2 meter/datalogger.

* Add support for AZ-Instrument 7798 CO2 meter/datalogger.

* Revert platformio.ini and my_user_config to original version,
adding line for new sensor but leaving it commented out.

* Include changes from original into sonoff/language/bg-BG.h

* Updated from originals: platformio.ini, sonoff/my_user_config.h.

* Revert to original RELEASENOTES.md.

* Add void to functions without parameters

* Fix temperature conversion

Fix temperature conversion to still use ConvertTemp() even if meter sends the value in F

* Add support for AZ-Instrument 7798 CO2

Add support for AZ-Instrument 7798 CO2 meter/datalogger

* pressure unit of measure reporting

Added a dedicated pressure sensor management to report back as pressure sensor and not fallback as a generic sensor in HA autodiscovery process

* add missing units of measurements for energy

* removed some errors from copy pasting..

* add empty unit of measurement for any sensors

* Added option for checking mqtt tls against root ca

Signed-off-by: Frank Meies <19324766+fmeies@users.noreply.github.com>

* Change RAM usage BMP/BME

Change RAM usage BMP/BME I2C sensors

* Update Arduino IDE core 2.5.0 files

Update Arduino IDE core 2.5.0 files

* Fix wifi strongest signal detection

Fix wifi strongest signal detection (arendst#4704)

* 6.4.0.2 Fix possible dtostrf bos

6.4.0.2 20181221
 * Fix possible dtostrf buffer overflows by increasing buffers

* Still need patched PWM for core 2.5.0

Still need patched PWM for core 2.5.0

* Check for core version when enabling tls ca cert

Signed-off-by: Frank Meies <19324766+fmeies@users.noreply.github.com>

* Check for core version when enabling tls ca cert, changed names of defines

Signed-off-by: Frank Meies <19324766+fmeies@users.noreply.github.com>

* Remove SetOption55 (hass_short_discovery_msg)

* Rename HASS discovery string constants

* Remove Alexa message "this value is outside the range of the device"

* 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 (arendst#4711)
 * Change FallbackTopic detection (arendst#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 (arendst#4673)
 * Fix Alexa "this value is outside the range of the device". Needs power cycle and Alexa deletion/discovery cycle. (arendst#3159, arendst#4712)

* Add optional TLS_CA_CERT

Add define USE_MQTT_TLS_CA_CERT for checking MQTT TLS against root ca using Let's Encrypt cert from sonoff_letsencrypt.h - not supported with core 2.3.0 (arendst#4703)

* decode-config.py: adapt settings change

- remove SetOption55 (hass_short_discovery_msg)

* Change FallbackTopic

Change FallbackTopic from cmnd/<mqttclient>/ to cmnd/<mqttclient>_fb/ to discriminate from Topic (arendst#1528)

* PS_16_DZ: fix broken if-statement

* Change MQTT GUI password handling

Change MQTT GUI password handling (arendst#4723)

* Release 6.4.1

* 6.4.1.1 Fix most compiler warnings

6.4.1.1 20181224
 * Fix most compiler warnings

* Fix compiler warning

Fix compiler warning

* Change switch debounce

Change switch input detection by optimizing switch debounce (arendst#4724)

* Add INPUT_PULLUP option for single DS18B20

* Add variable %timestamp% to be used in rules

This PR adds a new variable %timestamp% to be used in a rule to allow the user to include the Time Stamp as Tasmota has for Status, Sensors, etc, for example:

Command:

publish stat/topic/sensor {"Time":"%timestamp%","mysensor":"%var1%"}

Output:

{"Time":"2018-12-27T12:52:57","mysensor":"1"}

(arendst#4734)

* 6.4.1.2 Rewrite Switch driver

6.4.1.2 20181228
 * Change switch driver making it modular and introduce input filter (arendst#4665, arendst#4724)
 * Add define DS18B20_INTERNAL_PULLUP to select internal input pullup when only one DS18B20 sensor is connected eliminating external resistor (arendst#4738)
 * Add variable %timestamp% to rules (arendst#4749)

* Update platformio.ini with stage

Update platformio.ini with latest stage option

* Prep for template tuning

* 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

* Fix Typo in Spanish Translation

* Fix MGC3130/AZ7798 compile error

* Add debugging options to Switch

Add more debugging options to Switch using SwitchDebounce

* Fix DS3231 driver

Fix DS3231 driver breaking function chain (arendst#4759)

* Disable unused feature

* Revert "Disable unused feature"

This reverts commit 8fe61f6.

* Add test for result usage

* Add tests for result
gemu2015 pushed a commit to gemu2015/Sonoff-Tasmota that referenced this pull request Jan 27, 2019
gemu2015 pushed a commit to gemu2015/Sonoff-Tasmota that referenced this pull request Jan 27, 2019
6.3.0.17 20181211
 * Add support for TheoV2 sensors as documented on https://sidweb.nl
 * Add support for SDM220 (arendst#3610)
 * Enhance support for MPU6050 using DMP (arendst#4581)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants