Skip to content

Commit 5a0a736

Browse files
authored
Merge branch 'wled:main' into main
2 parents 55b53b5 + b0b3196 commit 5a0a736

File tree

11 files changed

+1508
-1277
lines changed

11 files changed

+1508
-1277
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626

2727

2828
build:
29-
name: Build Enviornments
29+
name: Build Environments
3030
runs-on: ubuntu-latest
3131
needs: get_default_envs
3232
strategy:

platformio_override.sample.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ lib_deps = ${esp8266.lib_deps}
3434
build_unflags = ${common.build_unflags}
3535
build_flags = ${common.build_flags} ${esp8266.build_flags}
3636
;
37-
; *** To use the below defines/overrides, copy and paste each onto it's own line just below build_flags in the section above.
37+
; *** To use the below defines/overrides, copy and paste each onto its own line just below build_flags in the section above.
3838
;
3939
; Set a release name that may be used to distinguish required binary for flashing
4040
; -D WLED_RELEASE_NAME=\"ESP32_MULTI_USREMODS\"

usermods/BME68X_v2/BME68X_v2.cpp

Lines changed: 1091 additions & 1094 deletions
Large diffs are not rendered by default.

usermods/BME68X_v2/README.md

Lines changed: 65 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,100 @@
11
# Usermod BME68X
2-
This usermod was developed for a BME680/BME68X sensor. The BME68X is not compatible with the BME280/BMP280 chip. It has its own library. The original 'BSEC Software Library' from Bosch was used to develop the code. The measured values are displayed on the WLED info page.
2+
3+
This usermod was developed for a BME680/BME68X sensor. The BME68X is not compatible with the BME280/BMP280 chip. It has its own library. The original 'BSEC Software Library' from Bosch was used to develop the code. The measured values are displayed on the WLED info page.
34

45
<p align="center"><img src="pics/pic1.png" style="width:60%;"></p>
56

67
In addition, the values are published on MQTT if this is active. The topic used for this is: 'wled/[MQTT Client ID]'. The Client ID is set in the WLED MQTT settings.
8+
79
<p align="center"><img src="pics/pic2.png"></p>
810

911
If you use HomeAssistance discovery, the device tree for HomeAssistance is created. This is published under the topic 'homeassistant/sensor/[MQTT Client ID]' via MQTT.
12+
1013
<p align="center"><img src="pics/pic3.png"></p>
1114

1215
A device with the following sensors appears in HomeAssistant. Please note that MQTT must be activated in HomeAssistant.
13-
<p align="center"><img src="pics/pic4.png" style="width:60%;"></p>
1416

17+
<p align="center"><img src="pics/pic4.png" style="width:60%;"></p>
1518

1619
## Features
20+
1721
Raw sensor types
1822

19-
Sensor Accuracy Scale Range
20-
--------------------------------------------------------------------------------------------------
21-
Temperature +/- 1.0 °C/°F -40 to 85 °C
22-
Humidity +/- 3 % 0 to 100 %
23-
Pressure +/- 1 hPa 300 to 1100 hPa
24-
Gas Resistance Ohm
23+
Sensor Accuracy Scale Range
24+
-----------------------------
2525

26+
Temperature +/- 1.0 °C/°F -40 to 85 °C
27+
Humidity +/- 3 % 0 to 100 %
28+
Pressure +/- 1 hPa 300 to 1100 hPa
29+
Gas Resistance Ohm
2630
The BSEC Library calculates the following values via the gas resistance
2731

28-
Sensor Accuracy Scale Range
29-
--------------------------------------------------------------------------------------------------
30-
IAQ value between 0 and 500
31-
Static IAQ same as IAQ but for permanently installed devices
32-
CO2 PPM
33-
VOC PPM
34-
Gas-Percentage %
35-
32+
Sensor Accuracy Scale Range
33+
-----------------------------
3634

35+
IAQ value between 0 and 500
36+
Static IAQ same as IAQ but for permanently installed devices
37+
CO2 PPM
38+
VOC PPM
39+
Gas-Percentage %
3740
In addition the usermod calculates
3841

39-
Sensor Accuracy Scale Range
40-
--------------------------------------------------------------------------------------------------
41-
Absolute humidity g/m³
42-
Dew point °C/°F
42+
Sensor Accuracy Scale Range
43+
-----------------------------
44+
45+
Absolute humidity g/m³
46+
Dew point °C/°F
4347

4448
### IAQ (Indoor Air Quality)
45-
The IAQ is divided into the following value groups.
49+
50+
The IAQ is divided into the following value groups.
51+
4652
<p align="center"><img src="pics/pic5.png"></p>
4753

4854
For more detailed information, please consult the enclosed Bosch product description (BME680.pdf).
4955

50-
5156
## Calibration of the device
5257

53-
The gas sensor of the BME68X must be calibrated. This differs from the BME280, which does not require any calibration.
58+
The gas sensor of the BME68X must be calibrated. This differs from the BME280, which does not require any calibration.
5459
There is a range of additional information for this, which the driver also provides. These values can be found in HomeAssistant under Diagnostics.
5560

5661
- **STABILIZATION_STATUS**: Gas sensor stabilization status [boolean] Indicates initial stabilization status of the gas sensor element: stabilization is ongoing (0) or stabilization is finished (1).
5762
- **RUN_IN_STATUS**: Gas sensor run-in status [boolean] Indicates power-on stabilization status of the gas sensor element: stabilization is ongoing (0) or stabilization is finished (1)
5863

59-
Furthermore, all GAS based values have their own accuracy value. These have the following meaning:
64+
Furthermore, all GAS based values have their own accuracy value. These have the following meaning:
6065

61-
- **Accuracy = 0** means the sensor is being stabilized (this can take a while on the first run)
62-
- **Accuracy = 1** means that the previous measured values show too few differences and cannot be used for calibration. If the sensor is at accuracy 1 for too long, you must ensure that the ambient air is chaning. Opening the windows is fine. Or sometimes it is sufficient to breathe on the sensor for approx. 5 minutes.
66+
- **Accuracy = 0** means the sensor is being stabilized (this can take a while on the first run)
67+
- **Accuracy = 1** means that the previous measured values show too few differences and cannot be used for calibration. If the sensor is at accuracy 1 for too long, you must ensure that the ambient air is chaning. Opening the windows is fine. Or sometimes it is sufficient to breathe on the sensor for approx. 5 minutes.
6368
- **Accuracy = 2** means the sensor is currently calibrating.
6469
- **Accuracy = 3** means that the sensor has been successfully calibrated. Once accuracy 3 is reached, the calibration data is automatically written to the file system. This calibration data will be used again at the next start and will speed up the calibration.
6570

6671
The IAQ index is therefore only meaningful if IAQ Accuracy = 3. In addition to the value for IAQ, BSEC also provides us with CO2 and VOC equivalent values. When using the sensor, the calibration value should also always be read out and displayed or transmitted.
6772

6873
Reasonably reliable values are therefore only achieved when accuracy displays the value 3.
6974

75+
## Settings
7076

77+
The settings of the usermods are set in the usermod section of wled.
7178

72-
## Settings
73-
The settings of the usermods are set in the usermod section of wled.
7479
<p align="center"><img src="pics/pic6.png"></p>
7580

7681
The possible settings are
7782

7883
- **Enable:** Enables / disables the usermod
7984
- **I2C address:** I2C address of the sensor. You can choose between 0X77 & 0X76. The default is 0x77.
80-
- **Interval:** Specifies the interval of seconds at which the usermod should be executed. The default is every second.
81-
- **Pub Chages Only:** If this item is active, the values are only published if they have changed since the last publication.
82-
- **Pub Accuracy:** The Accuracy values associated with the gas values are also published.
83-
- **Pub Calib State:** If this item is active, STABILIZATION_STATUS& RUN_IN_STATUS are also published.
85+
- **Interval:** Specifies the interval of seconds at which the usermod should be executed. The default is every second.
86+
- **Pub Chages Only:** If this item is active, the values are only published if they have changed since the last publication.
87+
- **Pub Accuracy:** The Accuracy values associated with the gas values are also published.
88+
- **Pub Calib State:** If this item is active, STABILIZATION_STATUS& RUN_IN_STATUS are also published.
8489
- **Temp Scale:** Here you can choose between °C and °F.
85-
- **Temp Offset:** The temperature offset is always set in °C. It must be converted for Fahrenheit.
86-
- **HA Discovery:** If this item is active, the HomeAssistant sensor tree is created.
90+
- **Temp Offset:** The temperature offset is always set in °C. It must be converted for Fahrenheit.
91+
- **HA Discovery:** If this item is active, the HomeAssistant sensor tree is created.
8792
- **Pause While WLED Active:** If WLED has many LEDs to calculate, the computing power may no longer be sufficient to calculate the LEDs and read the sensor data. The LEDs then hang for a few microseconds, which can be seen. If this point is active, no sensor data is fetched as long as WLED is running.
88-
- **Del Calibration Hist:** If a check mark is set here, the calibration file saved in the file system is deleted when the settings are saved.
93+
- **Del Calibration Hist:** If a check mark is set here, the calibration file saved in the file system is deleted when the settings are saved.
8994

9095
### Sensors
91-
Applies to all sensors. The number of decimal places is set here. If the sensor is set to -1, it will no longer be published. In addition, the IAQ values can be activated here in verbal form.
96+
97+
Applies to all sensors. The number of decimal places is set here. If the sensor is set to -1, it will no longer be published. In addition, the IAQ values can be activated here in verbal form.
9298

9399
It is recommended to use the Static IAQ for the IAQ values. This is recommended by Bosch for statically placed devices.
94100

@@ -99,8 +105,9 @@ Data is published over MQTT - make sure you've enabled the MQTT sync interface.
99105
In addition to outputting via MQTT, you can read the values from the Info Screen on the dashboard page of the device's web interface.
100106

101107
Methods also exist to read the read/calculated values from other WLED modules through code.
108+
102109
- getTemperature(); The scale °C/°F is depended to the settings
103-
- getHumidity();
110+
- getHumidity();
104111
- getPressure();
105112
- getGasResistance();
106113
- getAbsoluteHumidity();
@@ -118,15 +125,36 @@ Methods also exist to read the read/calculated values from other WLED modules th
118125
- getStabStatus();
119126
- getRunInStatus();
120127

128+
## Compilation
129+
130+
To enable, compile with `BME68X` in `custom_usermods` (e.g. in `platformio_override.ini`)
131+
132+
Example:
133+
134+
```[env:esp32_mySpecial]
135+
extends = env:esp32dev
136+
custom_usermods = ${env:esp32dev.custom_usermods} BME68X
137+
```
138+
121139
## Revision History
140+
122141
### Version 1.0.0
142+
123143
- First version of the BME68X_v user module
144+
124145
### Version 1.0.1
146+
125147
- Rebased to WELD Version 0.15
126148
- Reworked some default settings
127149
- A problem with the default settings has been fixed
128150

151+
### Version 1.0.2
152+
153+
* Rebased to WELD Version 0.16
154+
* Fixed: Solved compilation problems related to some macro naming interferences.
155+
129156
## Known problems
157+
130158
- MQTT goes online at device start. Shortly afterwards it goes offline and takes quite a while until it goes online again. The problem does not come from this user module, but from the WLED core.
131159
- If you save the settings often, WLED can get stuck.
132160
- If many LEDS are connected to WLED, reading the sensor can cause a small but noticeable hang. The "Pause While WLED Active" option was introduced as a workaround.
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
2-
"name:": "BME68X_v2",
3-
"build": { "libArchive": false},
2+
"name:": "BME68X",
43
"dependencies": {
54
"boschsensortec/BSEC Software Library":"^1.8.1492"
65
}

usermods/audioreactive/audio_reactive.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,7 @@ class AudioReactive : public Usermod {
869869
const int AGC_preset = (soundAgc > 0)? (soundAgc-1): 0; // make sure the _compiler_ knows this value will not change while we are inside the function
870870

871871
#ifdef WLED_DISABLE_SOUND
872-
micIn = inoise8(millis(), millis()); // Simulated analog read
872+
micIn = perlin8(millis(), millis()); // Simulated analog read
873873
micDataReal = micIn;
874874
#else
875875
#ifdef ARDUINO_ARCH_ESP32

0 commit comments

Comments
 (0)