Skip to content

Commit

Permalink
Merge pull request #3 from arendst/development
Browse files Browse the repository at this point in the history
Sync fork
  • Loading branch information
crispy78 authored Jan 31, 2021
2 parents 63f14ad + eb54d56 commit 4de7185
Show file tree
Hide file tree
Showing 321 changed files with 17,833 additions and 4,384 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- [ ] Only relevant files were touched
- [ ] Only one feature/fix was added per PR and the code change compiles without warnings
- [ ] The code change is tested and works on Tasmota core ESP8266 V.2.7.4.9
- [ ] The code change is tested and works on Tasmota core ESP32 V.1.0.5-rc4
- [ ] The code change is tested and works on Tasmota core ESP32 V.1.0.5-rc6
- [ ] I accept the [CLA](https://github.com/arendst/Tasmota/blob/development/CONTRIBUTING.md#contributor-license-agreement-cla).

_NOTE: The code change must pass CI tests. **Your PR cannot be merged unless tests pass**_
20 changes: 20 additions & 0 deletions .github/workflows/CI_github_ESP32.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,26 @@ jobs:
name: firmware
path: ./build_output/firmware

tasmota32-core2:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U platformio
platformio upgrade --dev
platformio update
- name: Run PlatformIO
run: |
platformio run -e tasmota32-core2
- uses: actions/upload-artifact@v2
with:
name: firmware
path: ./build_output/firmware

tasmota32-minimal:
runs-on: ubuntu-latest
steps:
Expand Down
26 changes: 24 additions & 2 deletions .github/workflows/Tasmota_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -898,6 +898,29 @@ jobs:
path: ./build_output/firmware


tasmota32-core2:
needs: tasmota_pull
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U platformio
platformio upgrade --dev
platformio update
- name: Run PlatformIO
run: |
platformio run -e tasmota32-core2
- uses: actions/upload-artifact@v2
with:
name: firmware
path: ./build_output/firmware


tasmota32-knx:
needs: tasmota_pull
runs-on: ubuntu-latest
Expand Down Expand Up @@ -1600,11 +1623,10 @@ jobs:
[ ! -f ./mv_firmware/tasmota32-display.* ] || mv ./mv_firmware/tasmota32-display.* ./firmware/tasmota32/
[ ! -f ./mv_firmware/tasmota32-web*.* ] || mv ./mv_firmware/tasmota32-web*.* ./firmware/tasmota32/
[ ! -f ./mv_firmware/tasmota32-odroidgo.* ] || mv ./mv_firmware/tasmota32-odroidgo.* ./firmware/tasmota32/
[ ! -f ./mv_firmware/tasmota32-core2.* ] || mv ./mv_firmware/tasmota32-core2.* ./firmware/tasmota32/
[ ! -f ./mv_firmware/tasmota32-knx.* ] || mv ./mv_firmware/tasmota32-knx.* ./firmware/tasmota32/
[ ! -f ./mv_firmware/tasmota32* ] || mv ./mv_firmware/tasmota32* ./firmware/tasmota32/languages/
[ ! -f ./mv_firmware/* ] || mv ./mv_firmware/* ./firmware/tasmota/languages/
rm ./firmware/tasmota32/*.gz
rm ./firmware/tasmota32/languages/*.gz
[ ! -f ./tools/Esptool/ESP32/*.* ] || mv ./tools/Esptool/ESP32/*.* ./firmware/tasmota32/ESP32_needed_files/
[ ! -f ./tools/Esptool/Odroid_go/*.* ] || mv ./tools/Esptool/Odroid_go/*.* ./firmware/tasmota32/Odroid_go_needed_files/
[ ! -f ./FIRMWARE.md ] || mv -f ./FIRMWARE.md ./README.md
Expand Down
26 changes: 24 additions & 2 deletions .github/workflows/Tasmota_build_master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -898,6 +898,29 @@ jobs:
path: ./build_output/firmware


tasmota32-core2:
needs: tasmota_pull
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U platformio
platformio upgrade --dev
platformio update
- name: Run PlatformIO
run: |
platformio run -e tasmota32-core2
- uses: actions/upload-artifact@v2
with:
name: firmware
path: ./build_output/firmware


tasmota32-knx:
needs: tasmota_pull
runs-on: ubuntu-latest
Expand Down Expand Up @@ -1600,11 +1623,10 @@ jobs:
[ ! -f ./mv_firmware/tasmota32-display.* ] || mv ./mv_firmware/tasmota32-display.* ./firmware/tasmota32/
[ ! -f ./mv_firmware/tasmota32-web*.* ] || mv ./mv_firmware/tasmota32-web*.* ./firmware/tasmota32/
[ ! -f ./mv_firmware/tasmota32-odroidgo.* ] || mv ./mv_firmware/tasmota32-odroidgo.* ./firmware/tasmota32/
[ ! -f ./mv_firmware/tasmota32-core2.* ] || mv ./mv_firmware/tasmota32-core2.* ./firmware/tasmota32/
[ ! -f ./mv_firmware/tasmota32-knx.* ] || mv ./mv_firmware/tasmota32-knx.* ./firmware/tasmota32/
[ ! -f ./mv_firmware/tasmota32* ] || mv ./mv_firmware/tasmota32* ./firmware/tasmota32/languages/
[ ! -f ./mv_firmware/* ] || mv ./mv_firmware/* ./firmware/tasmota/languages/
rm ./firmware/tasmota32/*.gz
rm ./firmware/tasmota32/languages/*.gz
[ ! -f ./tools/Esptool/ESP32/*.* ] || mv ./tools/Esptool/ESP32/*.* ./firmware/tasmota32/ESP32_needed_files/
[ ! -f ./tools/Esptool/Odroid_go/*.* ] || mv ./tools/Esptool/Odroid_go/*.* ./firmware/tasmota32/Odroid_go_needed_files/
[ ! -f ./FIRMWARE.md ] || mv -f ./RELEASENOTES.md ./README.md
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/stale-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ name: "Mark or close stale issues and PRs"

on:
schedule:
- cron: "15 05 * * *"
- cron: "30 * * * *"

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected].14
- uses: actions/[email protected].15
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 25
Expand Down
2 changes: 2 additions & 0 deletions BUILDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@
| USE_EZORGB | - | - | - | - | - | - | - |
| USE_EZORTD | - | - | - | - | - | - | - |
| USE_SEESAW_SOIL | - | - | - | - | - | - | - |
| USE_TOF10120 | - | - | - | - | - | - | - |
| | | | | | | | |
| Feature or Sensor | minimal | lite | tasmota | knx | sensors | ir | display | Remarks
| USE_SPI | - | - | - | - | - | - | x |
Expand Down Expand Up @@ -193,6 +194,7 @@
| USE_RF_SENSOR | - | - | - | - | x | - | - | AlectoV2 only
| USE_HRE | - | - | - | - | x | - | - |
| USE_A4988_STEPPER | - | - | - | - | - | - | - |
| USE_NEOPOOL | - | - | - | - | - | - | - |
| | | | | | | | |
| Feature or Sensor | minimal | lite | tasmota | knx | sensors | ir | display | Remarks
| USE_DISPLAY | - | - | - | - | - | - | x |
Expand Down
32 changes: 29 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,23 @@ All notable changes to this project will be documented in this file.

## [Unreleased] - Development

## [9.2.0.3]
## [9.2.0.4]
### Added
- Function ``AddLog`` to provide logging for up to 128 (LOGSZ) characters to save stack space
- Commands ``ChannelRemap``, ``MultiPWM``, ``AlexaCTRange``, ``PowerOnFade``, ``PWMCT``, ``WhiteBlend`` and ``VirtualCT`` as synonyms for ``SetOption37, 68, 82, 91, 92, 105`` and ``106``
- Commands ``ZbNameKey``, ``ZbDeviceTopic``, ``ZbNoPrefix``, ``ZbEndpointSuffix``, ``ZbNoAutoBind`` and ``ZbNameTopic`` as synonyms for ``SetOption83, 89, 100, 101, 110`` and ``112``
- Commands ``ZbNoAutoBind``, ``ZbReceivedTopic`` and ``ZbOmitDevice`` as synonyms for ``SetOption116, 118`` and ``119``
- Commands ``BuzzerActive`` and ``BuzzerPwm`` as synonyms for ``SetOption67`` and ``111``
- Support for ESP32 ``Module 5`` Wireless Tag Eth01 (#9496)
- Support trailing silence in buzzer tune (#10694)
- Command ``L1MusicSync <0|Off>|<1|On>|<2|Toggle>, 1..10, 1..100>`` to control Sonoff L1 Music Sync mode sensitivity and speed (#10722)
- Command ``Speed2`` to control a once off fade (#10741)
- Zigbee command ``SetOption120 1`` or ``ZbEndpointTopic 1`` to add the endpoint as suffix in topic when using ``SetOption89 1``

### Changed
- Maximum chars in ``AddLog_P`` logging restored from 128 to 700 (MAX_LOGSZ) to solve broken error messages

## [9.2.0.3] 20210122
### Added
- Support for time proportioned (``#define USE_TIMEPROP``) and optional PID (``#define USE_PID``) relay control (#10412)
- Support rotary encoder on Shelly Dimmer (#10407)
Expand All @@ -12,6 +28,14 @@ All notable changes to this project will be documented in this file.
- Support for up to 4 I2C SEESAW_SOIL Capacitance & Temperature sensors by Peter Franck (#10481)
- ESP8266 Support for 2MB and up linker files with 1MB and up LittleFS
- ESP32 support for TLS MQTT using BearSSL (same as ESP8266)
- Support for 24/26/32/34 bit RFID Wiegand interface (D0/D1) by Sigurd Leuther (#3647)
- Compile time option ``USE_MQTT_TLS_DROP_OLD_FINGERPRINT`` to drop old (less secure) TLS fingerprint
- Command ``SetOption40 0..250`` to disable button functionality if activated for over 0.1 second re-introduced
- Support for SM2135 current selection using GPIO ``SM2135 DAT`` index (#10634)
- Support for ESP32 ``Module 7`` M5stack core2 16MB binary tasmota32-core2.bin (#10635)
- Support for Sugar Valley NeoPool Controller by Norbert Richter (#10637)
- Rule trigger string comparisons for EndsWith ``$>``, StartsWith ``$<`` and Contains ``$|`` (#10538)
- Support for TOF10120 time of flight sensor by Cyril Pawelko (#10190)

### Breaking Changed
- ESP32 switch from default SPIFFS to default LittleFS file system loosing current (zigbee) files
Expand All @@ -20,10 +44,12 @@ All notable changes to this project will be documented in this file.
### Changed
- Force initial default state ``SetOption57 1`` to scan wifi network every 44 minutes for strongest signal (#10395)
- Command ``Sleep 0`` removes any sleep from wifi modem except when ESP32 BLE is active
- PubSubClient MQTT_SOCKET_TIMEOUT from 15 to 4 seconds
- Domoticz fixed 2 decimals resolution by user selectable ``TempRes``, ``HumRes`` and ``PressRes`` resolutions

## [9.2.0.2] 20210105
### Added
- Basic support for ESP32 Odroid Go 16MB binary tasmota32-odroidgo.bin (#8630)
- Support for ESP32 ``Module 3`` Odroid Go 16MB binary tasmota32-odroidgo.bin (#8630)
- Command ``CTRange`` to specify the visible CT range the bulb is capable of (#10311)
- Command ``VirtualCT`` to simulate or fine tune CT bulbs with 3,4,5 channels (#10311)
- Command ``SetOption118 1`` to move ZbReceived from JSON message and into the subtopic replacing "SENSOR" default (#10353)
Expand All @@ -45,7 +71,7 @@ All notable changes to this project will be documented in this file.
- Replaced RA8876 GPIO selection from ``SPI CS`` by ``RA8876 CS``

### Changed
- Maximum chars in AddLog_P logging reduced from 700 to 128 (LOGSZ) to enhance stability
- Maximum chars in ``AddLog_P`` logging reduced from 700 to 128 (LOGSZ) to enhance stability
- Disabled ``USE_LIGHT`` light support for ZBBridge saving 17.6kB (#10374)

## [9.2.0.1] 20201229
Expand Down
1 change: 1 addition & 0 deletions I2CDEVICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,4 @@ Index | Define | Driver | Device | Address(es) | Description
55 | USE_EZORGB | xsns_78 | EZORGB | 0x61 - 0x70 | Color sensor
55 | USE_EZOPMP | xsns_78 | EZOPMP | 0x61 - 0x70 | Peristaltic Pump
56 | USE_SEESAW_SOIL | xsns_81 | SEESOIL | 0x36 - 0x39 | Adafruit seesaw soil moisture sensor
57 | USE_TOF10120 | xsns_84 | TOF10120 | 0x52 | Time-of-flight (ToF) distance sensor
23 changes: 21 additions & 2 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,22 @@ The attached binaries can also be downloaded from http://ota.tasmota.com/tasmota

[Complete list](BUILDS.md) of available feature and sensors.

## Changelog v9.2.0.3
## Changelog v9.2.0.4
### Added
- Command ``CTRange`` to specify the visible CT range the bulb is capable of [#10311](https://github.com/arendst/Tasmota/issues/10311)
- Command ``L1MusicSync <0|Off>|<1|On>|<2|Toggle>, 1..10, 1..100>`` to control Sonoff L1 Music Sync mode sensitivity and speed [#10722](https://github.com/arendst/Tasmota/issues/10722)
- Command ``RuleTimer0`` to access all RuleTimers at once [#10352](https://github.com/arendst/Tasmota/issues/10352)
- Command ``Speed2`` to control a once off fade [#10741](https://github.com/arendst/Tasmota/issues/10741)
- Command ``VirtualCT`` to simulate or fine tune CT bulbs with 3,4,5 channels [#10311](https://github.com/arendst/Tasmota/issues/10311)
- Command ``SetOption40 0..250`` to disable button functionality if activated for over 0.1 second re-introduced
- Command ``SetOption43 1..255`` to control Rotary step (#10407)
- Command ``SetOption118 1`` to move ZbReceived from JSON message and into the subtopic replacing "SENSOR" default [#10353](https://github.com/arendst/Tasmota/issues/10353)
- Command ``SetOption119 1`` to remove the device addr from json payload, can be used with zb_topic_fname where the addr is already known from the topic [#10355](https://github.com/arendst/Tasmota/issues/10355)
- Zigbee command ``SetOption120 1`` or ``ZbEndpointTopic 1`` to add the zigbee endpoint as suffix in topic when using ``SetOption89 1``
- Commands ``ChannelRemap``, ``MultiPWM``, ``AlexaCTRange``, ``PowerOnFade``, ``PWMCT``, ``WhiteBlend`` and ``VirtualCT`` as synonyms for ``SetOption37, 68, 82, 91, 92, 105`` and ``106``
- Commands ``ZbNameKey``, ``ZbDeviceTopic``, ``ZbNoPrefix``, ``ZbEndpointSuffix``, ``ZbNoAutoBind`` and ``ZbNameTopic`` as synonyms for ``SetOption83, 89, 100, 101, 110`` and ``112``
- Commands ``ZbNoAutoBind``, ``ZbReceivedTopic`` and ``ZbOmitDevice`` as synonyms for ``SetOption116, 118`` and ``119``
- Commands ``BuzzerActive`` and ``BuzzerPwm`` as synonyms for ``SetOption67`` and ``111``
- Milliseconds to console output [#10152](https://github.com/arendst/Tasmota/issues/10152)
- Gpio ``Option_a1`` enabling PWM2 high impedance if powered off as used by Wyze bulbs [#10196](https://github.com/arendst/Tasmota/issues/10196)
- Rotary No Pullup GPIO selection ``Rotary A/B_n`` [#10407](https://github.com/arendst/Tasmota/issues/10407)
Expand All @@ -73,15 +81,24 @@ The attached binaries can also be downloaded from http://ota.tasmota.com/tasmota
- Support for FTC532 8-button touch controller by Peter Franck [#10222](https://github.com/arendst/Tasmota/issues/10222)
- Support for BS814A-2 8-button touch buttons by Peter Franck [#10447](https://github.com/arendst/Tasmota/issues/10447)
- Support for up to 4 I2C SEESAW_SOIL Capacitance & Temperature sensors by Peter Franck [#10481](https://github.com/arendst/Tasmota/issues/10481)
- Support for TOF10120 time of flight sensor by Cyril Pawelko [#10190](https://github.com/arendst/Tasmota/issues/10190)
- Support for Afrikaans language translations by Christiaan Heerze
- Support for IR inverted leds using ``#define IR_SEND_INVERTED true`` [#10301](https://github.com/arendst/Tasmota/issues/10301)
- Support for disabling 38kHz IR modulation using ``#define IR_SEND_USE_MODULATION false`` [#10301](https://github.com/arendst/Tasmota/issues/10301)
- Support for SPI display driver for ST7789 TFT by Gerhard Mutz [#9037](https://github.com/arendst/Tasmota/issues/9037)
- Support for time proportioned (``#define USE_TIMEPROP``) and optional PID (``#define USE_PID``) relay control [#10412](https://github.com/arendst/Tasmota/issues/10412)
- Support for 24/26/32/34 bit RFID Wiegand interface (D0/D1) by Sigurd Leuther [#3647](https://github.com/arendst/Tasmota/issues/3647)
- Support for SM2135 current selection using GPIO ``SM2135 DAT`` index [#10634](https://github.com/arendst/Tasmota/issues/10634)
- Support for Sugar Valley NeoPool Controller by Norbert Richter [#10637](https://github.com/arendst/Tasmota/issues/10637)
- Support for ESP32 ``Module 3`` Odroid Go 16MB binary tasmota32-odroidgo.bin [#8630](https://github.com/arendst/Tasmota/issues/8630)
- Support for ESP32 ``Module 5`` Wireless Tag Eth01 [#9496](https://github.com/arendst/Tasmota/issues/9496)
- Support for ESP32 ``Module 7`` M5stack core2 16MB binary tasmota32-core2.bin [#10635](https://github.com/arendst/Tasmota/issues/10635)
- Support rotary encoder on Shelly Dimmer [#10407](https://github.com/arendst/Tasmota/issues/10407#issuecomment-756240920)
- Support character `#` to be replaced by `space`-character in command ``Publish`` topic [#10258](https://github.com/arendst/Tasmota/issues/10258)
- Basic support for ESP32 Odroid Go 16MB binary tasmota32-odroidgo.bin [#8630](https://github.com/arendst/Tasmota/issues/8630)
- Support trailing silence in buzzer tune [#10694](https://github.com/arendst/Tasmota/issues/10694)
- Rule trigger string comparisons for EndsWith ``$>``, StartsWith ``$<`` and Contains ``$|`` [#10538](https://github.com/arendst/Tasmota/issues/10538)
- SPI display driver SSD1331 Color oled by Jeroen Vermeulen [#10376](https://github.com/arendst/Tasmota/issues/10376)
- Compile time option ``USE_MQTT_TLS_DROP_OLD_FINGERPRINT`` to drop old (less secure) TLS fingerprint

### Breaking Changed
- ESP32 switch from default SPIFFS to default LittleFS file system loosing current (zigbee) files
Expand All @@ -100,6 +117,8 @@ The attached binaries can also be downloaded from http://ota.tasmota.com/tasmota
- Logging from heap to stack freeing 700 bytes RAM
- Disabled ``USE_LIGHT`` light support for ZBBridge saving 17.6kB [#10374](https://github.com/arendst/Tasmota/issues/10374)
- Force initial default state ``SetOption57 1`` to scan wifi network every 44 minutes for strongest signal [#10395](https://github.com/arendst/Tasmota/issues/10395)
- PubSubClient MQTT_SOCKET_TIMEOUT from 15 to 4 seconds
- Domoticz fixed 2 decimals resolution by user selectable ``TempRes``, ``HumRes`` and ``PressRes`` resolutions

### Fixed
- Redesign syslog and mqttlog using log buffer [#10164](https://github.com/arendst/Tasmota/issues/10164)
Expand Down
7 changes: 7 additions & 0 deletions lib/default/Ext-printf/library.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name=Ext-printf
version=1.0
author=Stephan Hadinger
maintainer=Stephan <[email protected]>
sentence=Extension of snprintf() and vsnprintf()
paragraph=This library provides extended types support for snprintf (float, uint64_t)
architectures=esp8266, esp32
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,21 @@ typedef class SBuffer {
return buf2;
}

// nullptr accepted
static bool equalsSBuffer(const class SBuffer * buf1, const class SBuffer * buf2) {
if (buf1 == buf2) { return true; }
if (!buf1 && (buf2->len() == 0)) { return true; }
if (!buf2 && (buf1->len() == 0)) { return true; }
if (!buf1 || !buf2) { return false; } // at least one buf is not empty
// we know that both buf1 and buf2 are non-null
if (buf1->len() != buf2->len()) { return false; }
size_t len = buf1->len();
for (uint32_t i=0; i<len; i++) {
if (buf1->get8(i) != buf2->get8(i)) { return false; }
}
return true;
}

protected:

static uint8_t asc2byte(char chr) {
Expand Down Expand Up @@ -269,18 +284,3 @@ typedef class PreAllocatedSBuffer : public SBuffer {
_buf = nullptr;
}
} PreAllocatedSBuffer;

// nullptr accepted
bool equalsSBuffer(const class SBuffer * buf1, const class SBuffer * buf2) {
if (buf1 == buf2) { return true; }
if (!buf1 && (buf2->len() == 0)) { return true; }
if (!buf2 && (buf1->len() == 0)) { return true; }
if (!buf1 || !buf2) { return false; } // at least one buf is not empty
// we know that both buf1 and buf2 are non-null
if (buf1->len() != buf2->len()) { return false; }
size_t len = buf1->len();
for (uint32_t i=0; i<len; i++) {
if (buf1->get8(i) != buf2->get8(i)) { return false; }
}
return true;
}
Loading

0 comments on commit 4de7185

Please sign in to comment.