diff --git a/BUILDS.md b/BUILDS.md index 32aa08d78201..bb6569951f11 100644 --- a/BUILDS.md +++ b/BUILDS.md @@ -149,6 +149,7 @@ Note: `minimal` variant is not listed as it shouldn't be used outside of the [up | USE_LOX_O2 | - | - / x | - | x | - | - | | USE_GDK101 | - | - / - | - | - | - | - | | USE_TC74 | - | - / - | - | - | - | - | +| USE_PCA9557 | - | - / - | - | - | - | - | | | | | | | | | | Feature or Sensor | l | t | k | s | i | d | Remarks | USE_HIH6 | - | - / x | - | x | - | - | diff --git a/CHANGELOG.md b/CHANGELOG.md index a1e19d50ea51..e0bd128928dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ All notable changes to this project will be documented in this file. - Berry `tcpclientasync` class for non-blocking TCP client - Support for GM861 1D and 2D bar code reader (#18399) - Berry `re` (regex) add `match2` and optional offset +- Support for PCA9557 8-bit I/O expander (#18632) ### Breaking Changed - Change command ``FileUpload`` index binary data detection from >199 to >299 diff --git a/I2CDEVICES.md b/I2CDEVICES.md index 88a14049d661..b7e806eeae1d 100644 --- a/I2CDEVICES.md +++ b/I2CDEVICES.md @@ -116,4 +116,4 @@ Index | Define | Driver | Device | Address(es) | Description 78 | USE_PMSA003I | xsns_104 | PMSA003I | 0x12 | PM2.5 Air Quality Sensor with I2C Interface 79 | USE_GDK101 | xsns_106 | GDK101 | 0x18 - 0x1B | Gamma Radiation Sensor 80 | USE_TC74 | xsns_108 | TC74 | 0x48 - 0x4F | Temperature sensor - 81 | USE_PCA95XX_DRV | xdrv_69 | PCA95xx | 0x18 - 0x1F | 8-bit I/O expander as virtual relay \ No newline at end of file + 81 | USE_PCA9557 | xdrv_69 | PCA95xx | 0x18 - 0x1F | 8-bit I/O expander as virtual button/switch/relay \ No newline at end of file diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 9cc1ffd2b07f..8cbe8a07803d 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -115,6 +115,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm - Command ``SetOption152 0/1`` to select two (0 = default) pin bistable or one (1) pin latching relay control [#18386](https://github.com/arendst/Tasmota/issues/18386) - Support for TC74 temperature sensor by Michael Loftis [#18042](https://github.com/arendst/Tasmota/issues/18042) - Support for GM861 1D and 2D bar code reader [#18399](https://github.com/arendst/Tasmota/issues/18399) +- Support for PCA9557 8-bit I/O expander [#18632](https://github.com/arendst/Tasmota/issues/18632) - Matter sensors Humidity, Pressure, Illuminance [#18441](https://github.com/arendst/Tasmota/issues/18441) - Matter allow `Matter#Initialized` rule once the device is configured [#18451](https://github.com/arendst/Tasmota/issues/18451) - Matter UI to change endpoints configuration [#18498](https://github.com/arendst/Tasmota/issues/18498) diff --git a/tasmota/my_user_config.h b/tasmota/my_user_config.h index 4056ec8e1d70..15013780e1d7 100644 --- a/tasmota/my_user_config.h +++ b/tasmota/my_user_config.h @@ -710,6 +710,7 @@ // #define TC74_MAX_SENSORS 8 // Support non-default/multiple I2C addresses // #define TC74_I2C_PROBE_ADDRESSES { 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F } // Addresses to probe/support // #define TC74_MAX_FAILCOUNT 8 // Maximum failed polls before it's marked inactive until reprobing later +// #define USE_PCA9557 // [I2cDriver81] Enable PCA9557 8-bit I/O Expander (I2C addresses 0x18 - 0x1F) (+2k5 code) // #define USE_RTC_CHIPS // Enable RTC chip support and NTP server - Select only one // #define USE_DS3231 // [I2cDriver26] Enable DS3231 RTC (I2C address 0x68) (+1k2 code) diff --git a/tasmota/tasmota_support/support_features.ino b/tasmota/tasmota_support/support_features.ino index e19a74c86691..690bb2d89ee8 100644 --- a/tasmota/tasmota_support/support_features.ino +++ b/tasmota/tasmota_support/support_features.ino @@ -894,7 +894,9 @@ void ResponseAppendFeatures(void) #if defined(USE_I2C) && defined(USE_TC74) feature9 |= 0x00400000; // xsns_108_tc74.ino #endif -// feature9 |= 0x00800000; +#if defined(USE_I2C) && defined(USE_PCA9557) + feature9 |= 0x00800000; // xdrv_69_pca9557.ino +#endif // feature9 |= 0x01000000; // feature9 |= 0x02000000; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_69_pca9557.ino b/tasmota/tasmota_xdrv_driver/xdrv_69_pca9557.ino index ca80512bf8df..190fb0e34c43 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_69_pca9557.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_69_pca9557.ino @@ -1,13 +1,13 @@ /* - xdrv_69_pca95xx.ino - PCA9557 GPIO Expander support for Tasmota + xdrv_69_pca9557.ino - PCA9557 GPIO Expander support for Tasmota SPDX-FileCopyrightText: 2023 Theo Arends SPDX-License-Identifier: GPL-3.0-only */ -#if defined(USE_I2C) -#ifdef USE_PCA9557_DRV +#ifdef USE_I2C +#ifdef USE_PCA9557 /*********************************************************************************************\ * 8-bit PCA9557 I2C GPIO Expander to be used as virtual relay * diff --git a/tools/decode-status.py b/tools/decode-status.py index 8ff87b7bfbee..2b6164fcac8b 100755 --- a/tools/decode-status.py +++ b/tools/decode-status.py @@ -295,7 +295,7 @@ "USE_DINGTIAN_RELAY","USE_HMC5883L","USE_LD2410","USE_ME007", "USE_DISPLAY_TM1650","USE_PCA9632","USE_TUYAMCUBR","USE_SEN5X", "USE_BIOPDU","USE_MCP23XXX_DRV","USE_PMSA003I","USE_LOX_O2", - "USE_GDK101","USE_GM861","USE_TC74","", + "USE_GDK101","USE_GM861","USE_TC74","USE_PCA9557", "","","","", "","","","" ]] @@ -325,7 +325,7 @@ obj = json.load(fp) def StartDecode(): - print ("\n*** decode-status.py v12.5.0.1 by Theo Arends and Jacek Ziolkowski ***") + print ("\n*** decode-status.py v12.5.0.2 by Theo Arends and Jacek Ziolkowski ***") # print("Decoding\n{}".format(obj))