diff --git a/usermods/PWM_fan/readme.md b/usermods/PWM_fan/readme.md index a40098c1..976d6b24 100644 --- a/usermods/PWM_fan/readme.md +++ b/usermods/PWM_fan/readme.md @@ -19,8 +19,8 @@ You will also need `-D USERMOD_DALLASTEMPERATURE`. All of the parameters are configured during run-time using Usermods settings page. This includes: -* PWM output pin -* tacho input pin +* PWM output pin (can be configured at compile time `-D PWM_PIN=xx`) +* tacho input pin (can be configured at compile time `-D TACHO_PIN=xx`) * sampling frequency in seconds * threshold temperature in degees C diff --git a/usermods/PWM_fan/usermod_PWM_fan.h b/usermods/PWM_fan/usermod_PWM_fan.h index 5cd79ef2..a8df1202 100644 --- a/usermods/PWM_fan/usermod_PWM_fan.h +++ b/usermods/PWM_fan/usermod_PWM_fan.h @@ -10,6 +10,13 @@ // https://github.com/KlausMu/esp32-fan-controller/tree/main/src // adapted for WLED usermod by @blazoncek +#ifndef TACHO_PIN + #define TACHO_PIN -1 +#endif + +#ifndef PWM_PIN + #define PWM_PIN -1 +#endif // tacho counter static volatile unsigned long counter_rpm = 0; @@ -37,8 +44,8 @@ class PWMFanUsermod : public Usermod { #endif // configurable parameters - int8_t tachoPin = -1; - int8_t pwmPin = -1; + int8_t tachoPin = TACHO_PIN; + int8_t pwmPin = PWM_PIN; uint8_t tachoUpdateSec = 30; float targetTemperature = 25.0; uint8_t minPWMValuePct = 50; diff --git a/usermods/multi_relay/readme.md b/usermods/multi_relay/readme.md index 2d933cda..a0a3e9e9 100644 --- a/usermods/multi_relay/readme.md +++ b/usermods/multi_relay/readme.md @@ -81,11 +81,13 @@ void registerUsermods() Usermod can be configured in Usermods settings page. * `enabled` - enable/disable usermod -* `pin` - GPIO pin where relay is attached to ESP +* `pin` - GPIO pin where relay is attached to ESP (can be configured at compile time `-D MULTI_RELAY_PINS=xx,xx,...`) * `delay-s` - delay in seconds after on/off command is received * `active-high` - toggle high/low activation of relay (can be used to reverse relay states) * `external` - if enabled WLED does not control relay, it can only be triggered by external command (MQTT, HTTP, JSON or button) * `button` - button (from LED Settings) that controls this relay +* `broadcast`- time in seconds between state broadcasts using MQTT +* `HA-discovery`- enable Home Assistant auto discovery If there is no MultiRelay section, just save current configuration and re-open Usermods settings page. diff --git a/wled00/wled.h b/wled00/wled.h index 1d3ecf27..bfefea76 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -8,7 +8,7 @@ */ // version code in format yymmddb (b = daily build) -#define VERSION 2204271 +#define VERSION 2204281 //uncomment this if you have a "my_config.h" file you'd like to use //#define WLED_USE_MY_CONFIG