Skip to content

Commit

Permalink
Add support for SPL06_007 pressure and temperature sensor (#21185)
Browse files Browse the repository at this point in the history
  • Loading branch information
arendst committed Apr 18, 2024
1 parent 9b5df76 commit 7e14db4
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ All notable changes to this project will be documented in this file.
## [13.4.1.1]
### Added
- HASPmota `dropdown_list` and fixes (#21208)
- Support for SPL06_007 pressure and temperature sensor (#21185)

### Breaking Changed

Expand Down
2 changes: 1 addition & 1 deletion CODE_OWNERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ In addition to @arendst the following code is mainly owned by:
| xsns_22_sr04 | Nuno Ferreira, @arendst
| xsns_23_me007 | Mathias Buder
| xsns_24_si1145 |
| xsns_25_spl06-007_sensor | @rai68
| xsns_25_spl06-007_sensor | @rai68
| xsns_26_lm75ad | Andre Thomas
| xsns_27_apds9960 | Shawn Hymel
| xsns_28 |
Expand Down
2 changes: 1 addition & 1 deletion I2CDEVICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,5 +125,5 @@ Index | Define | Driver | Device | Address(es) | Bus2 | Descrip
85 | USE_ENS210 | xsns_112 | ENS210 | 0x43 - 0x44 | | Temperature and humidity sensor
86 | USE_AMSX915 | xsns_114 | AMS5915 | 0x28 | | Pressure (absolute/differential) and temperature sensor
86 | USE_AMSX915 | xsns_114 | AMS6915 | 0x28 | | Pressure (absolute/differential) and temperature sensor
95 | USE_SPL06_007 | xsns_126 | SPL06-007 | 0x76 | | Pressure and temperature sensor
87 | USE_SPL06_007 | xsns_25 | SPL06-007 | 0x76 | | Pressure and temperature sensor
NOTE: Bus2 supported on ESP32 only.
1 change: 1 addition & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
- Support Azure iothub direct method [#21013](https://github.com/arendst/Tasmota/issues/21013)
- Support for Domoticz non-persistent ``DzIdx5`` to ``DzIdx32`` and disabling DOMOTICZ_OUT_TOPIC subscribe using command ``DzIdx0 0`` [#21019](https://github.com/arendst/Tasmota/issues/21019)
- Support SPI GPIO configuration for Universal Touch Screen [#21025](https://github.com/arendst/Tasmota/issues/21025)
- Support for SPL06_007 pressure and temperature sensor [#21185](https://github.com/arendst/Tasmota/issues/21185)
- Zigbee support for attributes of type `uint48` used by energy monitoring [#20992](https://github.com/arendst/Tasmota/issues/20992)
- QMC5883l check for overflow and scale reading [#20643](https://github.com/arendst/Tasmota/issues/20643)
- Berry explicit error log when memory allocation fails [#20807](https://github.com/arendst/Tasmota/issues/20807)
Expand Down
6 changes: 5 additions & 1 deletion tasmota/include/tasmota_configurations.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,11 @@
//#define USE_LUXV30B // [I2CDriver70] Enable RFRobot SEN0390 LuxV30b ambient light sensor (I2C address 0x4A) (+0k5 code)
//#define USE_PMSA003I // [I2cDriver78] Enable PMSA003I Air Quality Sensor (I2C address 0x12) (+1k8 code)
//#define USE_GDK101 // [I2cDriver79] Enable GDK101 sensor (I2C addresses 0x18 - 0x1B) (+1k2 code)
//#define USE_TC74 // [I2cDriver80] Enable TC74 sensor (I2C addresses 0x48 - 0x4F) (+1k code)
//#define USE_PCA9557 // [I2cDriver81] Enable PCA9557 8-bit I/O Expander (I2C addresses 0x18 - 0x1F) (+2k5 code)
//#define USE_MAX17043 // [I2cDriver83] Enable MAX17043 fuel-gauge systems Lipo batteries sensor (I2C address 0x36) (+0k9 code)
//#define USE_AMSX915 // [I2CDriver86] Enable AMS5915/AMS6915 pressure/temperature sensor (+1k2 code)
//#define USE_SPL06_007 // [I2cDriver87] Enable SPL06_007 pressure and temperature sensor (I2C addresses 0x76) (+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)
Expand Down Expand Up @@ -258,7 +263,6 @@
#define USE_LOX_O2 // Add support for LuminOx LOX O2 Sensor (+0k8 code)
#undef DEBUG_THEO // Disable debug code
#undef USE_DEBUG_DRIVER // Disable debug code
//#define USE_SPL06_007 // Adds support for SPL06_007 (+10k2 code)
#endif // FIRMWARE_SENSORS

/*********************************************************************************************\
Expand Down
1 change: 1 addition & 0 deletions tasmota/my_user_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,7 @@ An online tool to calculate TLS fingerprints is available here at:\n\
// #define USE_MAX17043 // [I2cDriver83] Enable MAX17043 fuel-gauge systems Lipo batteries sensor (I2C address 0x36) (+0k9 code)
// #define MAX17043_ALERT_THRESHOLD 32 // [I2cDriver83] Define the alert threshold for low battery level percentage 1-32
// #define USE_AMSX915 // [I2CDriver86] Enable AMS5915/AMS6915 pressure/temperature sensor (+1k2 code)
// #define USE_SPL06_007 // [I2cDriver87] Enable SPL06_007 pressure and temperature sensor (I2C addresses 0x76) (+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)
Expand Down
6 changes: 3 additions & 3 deletions tasmota/tasmota_xsns_sensor/xsns_25_spl06-007_sensor.ino
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
\*********************************************************************************************/

#define XSNS_25 25
#define XI2C_95 95 // See I2CDEVICES.md
#define XI2C_87 87 // See I2CDEVICES.md

#include "SPL06-007.h"

Expand All @@ -50,7 +50,7 @@ void spl007Detect(void)
{
SPL_init();
if (get_spl_id() != 16) {
AddLog(LOG_LEVEL_ERROR, PSTR("SPL06-007:@%02X not found error!"), SPL007_ADDRESS);
// AddLog(LOG_LEVEL_ERROR, PSTR("SPL: @%02X not found error!"), SPL007_ADDRESS);
return;
}
spl007_s.valid = true;
Expand Down Expand Up @@ -105,7 +105,7 @@ void spl007Show(bool json)

bool Xsns25(uint32_t function)
{
if (!I2cEnabled(XI2C_95)) { return false; }
if (!I2cEnabled(XI2C_87)) { return false; }
bool result = false;

if (FUNC_INIT == function) {
Expand Down

0 comments on commit 7e14db4

Please sign in to comment.