Skip to content

Commit

Permalink
Merge pull request #244 from atuline/dev-master-merge
Browse files Browse the repository at this point in the history
SR-WLED v0.13.3 Release
  • Loading branch information
softhack007 authored Oct 30, 2022
2 parents 459a7c7 + e52a6be commit cd605e0
Show file tree
Hide file tree
Showing 43 changed files with 3,948 additions and 2,880 deletions.
22 changes: 21 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
## WLED changelog

### Builds after release 0.13.1
### WLED release 0.13.3

- Version bump to v0.13.3 "Toki"
- Disable ESP watchdog by default (fixes flickering and boot issues on a fresh install)
- Added support for LPD6803

### WLED release 0.13.2

#### Build 2208140

- Version bump to v0.13.2 "Toki"
- Added option to receive live data on the main segment only (PR #2601)
- Enable ESP watchdog by default (PR #2657)
- Fixed race condition when saving bus config
- Better potentiometer filtering (PR #2693)
- More suitable DMX libraries (PR #2652)
- Fixed outgoing serial TPM2 message length (PR #2628)
- Fixed next universe overflow and Art-Net DMX start address (PR #2607)
- Fixed relative segment brightness (PR #2665)

### Builds between releases 0.13.1 and 0.13.2

#### Build 2203191

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wled",
"version": "0.13.2",
"version": "0.13.3",
"description": "Tools for WLED project",
"main": "tools/cdata.js",
"directories": {
Expand Down
32 changes: 29 additions & 3 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ default_envs = soundReactive_esp32dev, soundReactive_esp32_eth
; default_envs = wemos_shield_esp32
; default_envs = m5atom
; default_envs = esp32_eth
; default_envs = esp32dev_qio80
; default_envs = esp32_eth_ota1mapp
; default_envs = esp32s2_saola

Expand Down Expand Up @@ -166,7 +167,7 @@ lib_compat_mode = strict
lib_deps =
fastled/FastLED @ 3.5.0
IRremoteESP8266 @ 2.8.2
https://github.com/Aircoookie/ESPAsyncWebServer.git @ ~2.0.4
https://github.com/Aircoookie/ESPAsyncWebServer.git @ ~2.0.7
#For use of the TTGO T-Display ESP32 Module with integrated TFT display uncomment the following line
#TFT_eSPI
#For use SSD1306 OLED display uncomment following
Expand Down Expand Up @@ -229,7 +230,8 @@ lib_deps =
https://github.com/softhack007/LITTLEFS-threadsafe.git#master
makuna/NeoPixelBus @ 2.6.9
https://github.com/pbolduc/AsyncTCP.git @ 1.2.0
arduinoFFT @ 1.5.6
https://github.com/kosme/arduinoFFT#develop @ 1.9.2
; arduinoFFT @ 1.5.6

[esp32s2]
build_flags = -g
Expand Down Expand Up @@ -347,6 +349,18 @@ lib_deps = ${esp32.lib_deps}
monitor_filters = esp32_exception_decoder
board_build.partitions = ${esp32.default_partitions}

[env:esp32dev_qio80]
board = esp32dev
platform = ${esp32.platform}
platform_packages = ${esp32.platform_packages}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp32} -D WLED_RELEASE_NAME=ESP32_qio80 #-D WLED_DISABLE_BLYNK #-D WLED_DISABLE_BROWNOUT_DET
lib_deps = ${esp32.lib_deps}
monitor_filters = esp32_exception_decoder
board_build.partitions = ${esp32.default_partitions}
board_build.f_flash = 80000000L
board_build.flash_mode = qio

[env:esp32_eth]
board = esp32-poe
platform = ${esp32.platform}
Expand Down Expand Up @@ -454,6 +468,8 @@ build_flags = ${common.build_flags_esp32} -D WLED_RELEASE_NAME=ESP32 -D WLED_DIS
lib_deps = ${esp32.lib_deps}
monitor_filters = esp32_exception_decoder
board_build.partitions = ${esp32.default_partitions}
board_build.f_flash = 80000000L
board_build.flash_mode = dio

[env:soundReactive_esp32_eth]
board = esp32-poe
Expand All @@ -464,6 +480,8 @@ build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp32} -D WLED_RELEASE_NAME=ESP32_Ethernet -D RLYPIN=-1 -D WLED_USE_ETHERNET -D BTNPIN=-1 -D WLED_DISABLE_MQTT -D WLED_DISABLE_LOXONE
lib_deps = ${esp32.lib_deps}
board_build.partitions = ${esp32.default_partitions}
; board_build.f_flash = 80000000L
; board_build.flash_mode = dio

[env:soundReactive_lolin_d32]
board = lolin_d32
Expand All @@ -475,8 +493,10 @@ build_flags = ${common.build_flags_esp32} -D WLED_DISABLE_MQTT -D WLED_DISABLE_L
lib_deps = ${esp32.lib_deps}
monitor_filters = esp32_exception_decoder
board_build.partitions = ${esp32.default_partitions}
board_build.f_flash = 80000000L
board_build.flash_mode = dio

[env:lolin_d32_pro]
[env:soundReactive_lolin_d32_pro]
board = lolin_d32_pro
platform = ${esp32.platform}
platform_packages = ${esp32.platform_packages}
Expand All @@ -489,6 +509,8 @@ board_build.f_cpu = 240000000L
board_upload.flash_size = 16MB
board_upload.maximum_size = 16777216
board_build.partitions = tools/SoundReactive_ESP32_16MB.csv
board_build.f_flash = 80000000L
board_build.flash_mode = qio

[env:soundReactive_m5atom]
board = esp32dev
Expand All @@ -510,6 +532,8 @@ build_flags = ${common.build_flags_esp32}
lib_deps = ${esp32.lib_deps}
monitor_filters = esp32_exception_decoder
board_build.partitions = ${esp32.default_partitions}
board_build.f_flash = 80000000L
board_build.flash_mode = dio

[env:soundReactive_m5stamp-pico]
board = esp32dev
Expand All @@ -531,6 +555,8 @@ build_flags = ${common.build_flags_esp32}
lib_deps = ${esp32.lib_deps}
monitor_filters = esp32_exception_decoder
board_build.partitions = ${esp32.default_partitions}
board_build.f_flash = 80000000L
board_build.flash_mode = dio

# ------------------------------------------------------------------------------
# custom board configurations
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</p>

# Stable Branch
This is the SR `master` branch - the source code for our latest release version [SR WLED v0.13.2](https://github.com/atuline/WLED/releases/tag/v0.13.2).
This is the SR `master` branch - the source code for our latest release version [SR WLED v0.13.3](https://github.com/atuline/WLED/releases/tag/v0.13.3).

- For ESP32 devices (8266 no longer supported)
- *This* branch (`master`) can be a stable baseline for your own project. Use it.
Expand Down
64 changes: 40 additions & 24 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,54 +1,70 @@
#
# This file is autogenerated by pip-compile
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
#
# pip-compile
#
aiofiles==0.6.0
aiofiles==0.8.0
# via platformio
ajsonrpc==1.1.0
ajsonrpc==1.2.0
# via platformio
bottle==0.12.20
anyio==3.6.1
# via starlette
async-timeout==4.0.2
# via zeroconf
bottle==0.12.23
# via platformio
certifi==2020.12.5
certifi==2022.6.15
# via requests
chardet==4.0.0
charset-normalizer==2.1.1
# via requests
click==7.1.2
click==8.1.3
# via
# platformio
# uvicorn
colorama==0.4.4
# via platformio
h11==0.12.0
colorama==0.4.5
# via
# click
# platformio
h11==0.13.0
# via
# uvicorn
# wsproto
idna==2.10
# via requests
ifaddr==0.1.7
idna==3.3
# via
# anyio
# requests
ifaddr==0.2.0
# via zeroconf
marshmallow==3.11.1
marshmallow==3.17.0
# via platformio
platformio==5.1.1
packaging==21.3
# via marshmallow
platformio==6.1.4
# via -r requirements.in
pyelftools==0.27
pyelftools==0.29
# via platformio
pyparsing==3.0.9
# via packaging
pyserial==3.5
# via platformio
requests==2.25.1
requests==2.28.1
# via platformio
semantic-version==2.8.5
semantic-version==2.10.0
# via platformio
starlette==0.14.2
sniffio==1.2.0
# via anyio
starlette==0.20.4
# via platformio
tabulate==0.8.9
tabulate==0.8.10
# via platformio
urllib3==1.26.5
typing-extensions==4.3.0
# via starlette
urllib3==1.26.11
# via requests
uvicorn==0.13.4
uvicorn==0.18.2
# via platformio
wsproto==1.0.0
wsproto==1.1.0
# via platformio
zeroconf==0.28.8
zeroconf==0.39.0
# via platformio
98 changes: 74 additions & 24 deletions usermods/BME280_v2/README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,90 @@
Hello! I have written a v2 usermod for the BME280/BMP280 sensor based on the [existing v1 usermod](https://github.com/Aircoookie/WLED/blob/master/usermods/Wemos_D1_mini%2BWemos32_mini_shield/usermod_bme280.cpp). It is not just a refactor, there are many changes which I made to fit my use case, and I hope they will fit the use cases of others as well! Most notably, this usermod is *just* for the BME280 and does not control a display like in the v1 usermod designed for the WeMos shield.
# Usermod BME280
This Usermod is designed to read a `BME280` or `BMP280` sensor and output the following:
- Temperature
- Humidity (`BME280` only)
- Pressure
- Heat Index (`BME280` only)
- Dew Point (`BME280` only)

- Requires libraries `BME280@~3.0.0` (by [finitespace](https://github.com/finitespace/BME280)) and `Wire`. Please add these under `lib_deps` in your `platform.ini` (or `platform_override.ini`).
- Data is published over MQTT so make sure you've enabled the MQTT sync interface.
Configuration is all completed via the Usermod menu. There are no settings to set in code! The following settings can be configured in the Usermod Menu:
- Temperature Decimals (number of decimal places to output)
- Humidity Decimals
- Pressure Decimals
- Temperature Interval (how many seconds between reads of temperature and humidity)
- Pressure Interval
- Publish Always (turn off to only publish changes, on to publish whether or not value changed)
- Use Celsius (turn off to use Farenheit)
- Home Assistant Discovery (turn on to sent MQTT Discovery entries for Home Assistant)
- SCL/SDA GPIO Pins

Dependencies
- Libraries
- `BME280@~3.0.0` (by [finitespace](https://github.com/finitespace/BME280))
- `Wire`
- These must be added under `lib_deps` in your `platform.ini` (or `platform_override.ini`).
- Data is published over MQTT - make sure you've enabled the MQTT sync interface.
- This usermod also writes to serial (GPIO1 on ESP8266). Please make sure nothing else listening on the serial TX pin of your board will get confused by log messages!

To enable, compile with `USERMOD_BME280` defined (i.e. `platformio_override.ini`)
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.

Methods also exist to read the read/calculated values from other WLED modules through code.
- `getTemperatureC()`
- `getTemperatureF()`
- `getHumidity()`
- `getPressure()`
- `getDewPointC()`
- `getDewPointF()`
- `getHeatIndexC()`
- `getHeatIndexF()`

# Complilation

To enable, compile with `USERMOD_BME280` defined (e.g. in `platformio_override.ini`)
```ini
[env:usermod_bme280_d1_mini]
extends = env:d1_mini
build_flags =
${common.build_flags_esp8266}
-D USERMOD_BME280
lib_deps =
${esp8266.lib_deps}
BME280@~3.0.0
Wire
```
or define `USERMOD_BME280` in `my_config.h`
```c++
#define USERMOD_BME280
```

Changes include:
- Adjustable measure intervals
- Temperature and pressure have separate intervals due to pressure not frequently changing at any constant altitude
- Adjustment of number of decimal places in published sensor values
- Separate adjustment for temperature, humidity and pressure values
- Values are rounded to the specified number of decimal places
- Pressure measured in units of hPa instead of Pa
- Calculation of heat index (apparent temperature) and dew point
- These, along with humidity measurements, are disabled if the sensor is a BMP280
- 16x oversampling of sensor during measurement
- Values are only published if they are different from the previous value
- Values are published on startup (continually until the MQTT broker acknowledges a successful publication)

Adjustments are made through preprocessor definitions at the start of the class definition.

MQTT topics are as follows:
# MQTT
MQTT topics are as follows (`<deviceTopic>` is set in MQTT section of Sync Setup menu):
Measurement type | MQTT topic
--- | ---
Temperature | `<deviceTopic>/temperature`
Humidity | `<deviceTopic>/humidity`
Pressure | `<deviceTopic>/pressure`
Heat index | `<deviceTopic>/heat_index`
Dew point | `<deviceTopic>/dew_point`
Dew point | `<deviceTopic>/dew_point`

If you are using Home Assistant, and `Home Assistant Discovery` is turned on, Home Assistant should automatically detect a new device, provided you have the MQTT integration installed. The device is seperate from the main WLED device and will contain sensors for Pressure, Humidity, Temperature, Dew Point and Heat Index.

# Revision History
Jul 2022
- Added Home Assistant Discovery
- Added API interface to output data
- Removed compile-time variables
- Added usermod menu interface
- Added value outputs to info screen
- Updated `readme.md`
- Registered usermod
- Implemented PinManager for usermod
- Implemented reallocation of pins without reboot

Apr 2021
- Added `Publish Always` option

Dec 2020
- Ported to V2 Usermod format
- Customisable `measure intervals`
- Customisable number of `decimal places` in published sensor values
- Pressure measured in units of hPa instead of Pa
- Calculation of heat index (apparent temperature) and dew point
- `16x oversampling` of sensor during measurement
- Values only published if they are different from the previous value
Loading

0 comments on commit cd605e0

Please sign in to comment.