diff --git a/platformio.ini b/platformio.ini index a7593dd4..3d7a248b 100644 --- a/platformio.ini +++ b/platformio.ini @@ -45,6 +45,7 @@ default_envs = esp32_16MB_max esp32_16MB_all esp8266_4MB_min + esp8266_4MB_max esp32_4MB_PSRAM_max esp32S3_8MB_max wemos_shield_esp32_4MB_max @@ -807,18 +808,44 @@ extends = env:d1_mini upload_speed = 460800 ;115200 build_flags = ${common.build_flags_esp8266} -D WLED_RELEASE_NAME=esp8266_4MB_min - ; -D WLED_DEBUG -D WLED_DISABLE_ALEXA -D WLED_DISABLE_BLYNK -D WLED_DISABLE_HUESYNC ; -D WLED_DISABLE_2D - ; -D USERMOD_AUDIOREACTIVE - ; -D USERMOD_CUSTOMEFFECTS ; to be done ; -UWLED_USE_MY_CONFIG + ; -D WLED_DEBUG ; monitor_filters = esp8266_exception_decoder ; RAM: [====== ] 59.3% (used 48608 bytes from 81920 bytes) ; Flash: [======== ] 77.0% (used 804176 bytes from 1044464 bytes) +[env:esp8266_4MB_max] ;WLEDMM: WIP +extends = env:d1_mini +upload_speed = 460800 ;115200 +build_flags = ${common.build_flags_esp8266} + -D WLED_RELEASE_NAME=esp8266_4MB_max + -D WLED_MAX_USERMODS=5 ; default only 4-6 + -D WLED_DISABLE_ALEXA + -D WLED_DISABLE_BLYNK + -D WLED_DISABLE_HUESYNC + ; -D USERMOD_AUDIOREACTIVE + ; -D USERMOD_CUSTOMEFFECTS ; to be done + ; -UWLED_USE_MY_CONFIG + -D USERMOD_PIRSWITCH + -D USERMOD_DALLASTEMPERATURE ;; disabled because it hangs during usermod setup on -S3 (autodetect broken?) + -D USERMOD_MULTI_RELAY + ; -D USE_ALT_DISPLAY ; new versions of USERMOD_FOUR_LINE_DISPLAY and USERMOD_ROTARY_ENCODER_UI + ; -D USERMOD_FOUR_LINE_DISPLAY + -D USERMOD_MPU6050_IMU ; gyro/accelero for USERMOD_GAMES (ONLY WORKS IF USERMOD_FOUR_LINE_DISPLAY NOT INCLUDED - I2C SHARING BUG) + -D USERMOD_GAMES ; WLEDMM usermod + -D WLED_DEBUG +; monitor_filters = esp8266_exception_decoder +lib_deps = ${esp8266.lib_deps} + OneWire@~2.3.5 ; used for USERMOD_FOUR_LINE_DISPLAY and USERMOD_DALLASTEMPERATURE + ; olikraus/U8g2@ ^2.34.5 ; used for USERMOD_FOUR_LINE_DISPLAY -> need newer version with bugfixes for arduino-esp32 v2.0.4 (Wire inititialization) + ElectronicCats/MPU6050 @ 0.6.0 ; used for USERMOD_MPU6050_IMU +; RAM: [====== ] 61.5% (used 50344 bytes from 81920 bytes) +; Flash: [======== ] 81.8% (used 854444 bytes from 1044464 bytes) + [env:esp8266pro_16MB_min] extends = env:d1_mini board = d1_mini_pro ;; "D1 mini pro": ESP8266EX, 160MHz, 80KB RAM, 16MB Flash diff --git a/usermods/Animated_Staircase/Animated_Staircase.h b/usermods/Animated_Staircase/Animated_Staircase.h index b4065a4e..3886949f 100644 --- a/usermods/Animated_Staircase/Animated_Staircase.h +++ b/usermods/Animated_Staircase/Animated_Staircase.h @@ -414,7 +414,7 @@ class Animated_Staircase : public Usermod { } void appendConfigData() { - oappend(SET_F("addHB('")); oappend(_name); oappend("');"); + oappend(SET_F("addHB('staircase');")); //oappend(SET_F("dd=addDropdown('staircase','selectfield');")); //oappend(SET_F("addOption(dd,'1st value',0);")); diff --git a/usermods/BH1750_v2/usermod_bh1750.h b/usermods/BH1750_v2/usermod_bh1750.h index 135c6c0a..14add5c6 100644 --- a/usermods/BH1750_v2/usermod_bh1750.h +++ b/usermods/BH1750_v2/usermod_bh1750.h @@ -226,7 +226,7 @@ public: } void appendConfigData() { - oappend(SET_F("addHB('")); oappend(_name); oappend("');"); + oappend(SET_F("addHB('BH1750');"); // WLEDMM this usermod can ONLY use HW_I2C - so always use globals //oappend(SET_F("addInfo('BH1750:pin[]',0,'','I2C SCL');")); //oappend(SET_F("rOption('BH1750:pin[]',0,'use global (")); oappendi(i2c_scl); oappend(")',-1);"); diff --git a/usermods/BME280_v2/usermod_bme280.h b/usermods/BME280_v2/usermod_bme280.h index 54d18302..6eb61f43 100644 --- a/usermods/BME280_v2/usermod_bme280.h +++ b/usermods/BME280_v2/usermod_bme280.h @@ -401,7 +401,7 @@ public: } void appendConfigData() { - oappend(SET_F("addHB('")); oappend(_name); oappend("');"); + oappend(SET_F("addHB('BME280/BMP280');")); oappend(SET_F("addInfo('BME280/BMP280:pin[]',0,'','I2C/SPI CLK');")); oappend(SET_F("disableRO('BME280/BMP280:pin[]',0);")); diff --git a/usermods/Battery/usermod_v2_Battery.h b/usermods/Battery/usermod_v2_Battery.h index 5c4f2795..0b419b64 100644 --- a/usermods/Battery/usermod_v2_Battery.h +++ b/usermods/Battery/usermod_v2_Battery.h @@ -378,7 +378,7 @@ class UsermodBattery : public Usermod void appendConfigData() { - oappend(SET_F("addHB('")); oappend(_name); oappend("');"); + oappend(SET_F("addHB('Battery');")); oappend(SET_F("addInfo('Battery:min-voltage', 1, 'v');")); oappend(SET_F("addInfo('Battery:max-voltage', 1, 'v');")); diff --git a/usermods/PIR_sensor_switch/usermod_PIR_sensor_switch.h b/usermods/PIR_sensor_switch/usermod_PIR_sensor_switch.h index 5518005e..cbdbc87a 100644 --- a/usermods/PIR_sensor_switch/usermod_PIR_sensor_switch.h +++ b/usermods/PIR_sensor_switch/usermod_PIR_sensor_switch.h @@ -414,7 +414,7 @@ public: void appendConfigData() { - oappend(SET_F("addHB('")); oappend(_name); oappend("');"); + oappend(SET_F("addHB('PIRsensorSwitch');")); oappend(SET_F("addInfo('PIRsensorSwitch:HA-discovery',1,'HA=Home Assistant');")); // 0 is field type, 1 is actual field oappend(SET_F("addInfo('PIRsensorSwitch:notifications',1,'Periodic WS updates');")); // 0 is field type, 1 is actual field diff --git a/usermods/PWM_fan/usermod_PWM_fan.h b/usermods/PWM_fan/usermod_PWM_fan.h index 234f284e..9be45075 100644 --- a/usermods/PWM_fan/usermod_PWM_fan.h +++ b/usermods/PWM_fan/usermod_PWM_fan.h @@ -287,9 +287,9 @@ class PWMFanUsermod : public Usermod { } void appendConfigData() { - oappend(SET_F("addHB('")); oappend(_name); oappend("');"); + oappend(SET_F("addHB('PWM-fan');")); } - + /* * addToConfig() can be used to add custom persistent settings to the cfg.json file in the "um" (usermod) object. * It will be called by WLED when settings are actually saved (for example, LED settings are saved) diff --git a/usermods/Temperature/usermod_temperature.h b/usermods/Temperature/usermod_temperature.h index c0c7ef4e..cf582844 100644 --- a/usermods/Temperature/usermod_temperature.h +++ b/usermods/Temperature/usermod_temperature.h @@ -306,7 +306,7 @@ class UsermodTemperature : public Usermod { //} void appendConfigData() { - oappend(SET_F("addHB('")); oappend(_name); oappend("');"); + oappend(SET_F("addHB('Temperature');")); } /** diff --git a/usermods/boblight/boblight.h b/usermods/boblight/boblight.h index 557da187..f46aa5ed 100644 --- a/usermods/boblight/boblight.h +++ b/usermods/boblight/boblight.h @@ -303,7 +303,7 @@ class BobLightUsermod : public Usermod { } void appendConfigData() { - oappend(SET_F("addHB('")); oappend(_name); oappend("');"); + oappend(SET_F("addHB('BobLight');")); //oappend(SET_F("dd=addDropdown('usermod','selectfield');")); //oappend(SET_F("addOption(dd,'1st value',0);")); diff --git a/usermods/multi_relay/usermod_multi_relay.h b/usermods/multi_relay/usermod_multi_relay.h index 7381a00d..f8ae2bd3 100644 --- a/usermods/multi_relay/usermod_multi_relay.h +++ b/usermods/multi_relay/usermod_multi_relay.h @@ -571,6 +571,11 @@ class MultiRelay : public Usermod { DEBUG_PRINTLN(F("MultiRelay config saved.")); } + void appendConfigData() + { + oappend(SET_F("addHB('MultiRelay');")); + } + /** * restore the changeable values * readFromConfig() is called before setup() to populate properties from values stored in cfg.json diff --git a/usermods/usermod_v2_auto_save/usermod_v2_auto_save.h b/usermods/usermod_v2_auto_save/usermod_v2_auto_save.h index ea5eb2b0..e8806609 100644 --- a/usermods/usermod_v2_auto_save/usermod_v2_auto_save.h +++ b/usermods/usermod_v2_auto_save/usermod_v2_auto_save.h @@ -205,7 +205,7 @@ class AutoSaveUsermod : public Usermod { } void appendConfigData() { - oappend(SET_F("addHB('")); oappend(_name); oappend("');"); + oappend(SET_F("addHB('Autosave');")); } /* diff --git a/usermods/usermod_v2_four_line_display_ALT/usermod_v2_four_line_display_ALT.h b/usermods/usermod_v2_four_line_display_ALT/usermod_v2_four_line_display_ALT.h index 2681af6d..21219663 100644 --- a/usermods/usermod_v2_four_line_display_ALT/usermod_v2_four_line_display_ALT.h +++ b/usermods/usermod_v2_four_line_display_ALT/usermod_v2_four_line_display_ALT.h @@ -1044,7 +1044,7 @@ class FourLineDisplayUsermod : public Usermod { //} void appendConfigData() { - oappend(SET_F("addHB('")); oappend(_name); oappend("');"); + oappend(SET_F("addHB('4LineDisplay');")); oappend(SET_F("dd=addDropdown('4LineDisplay','type');")); oappend(SET_F("addOption(dd,'None',0);")); diff --git a/usermods/usermod_v2_games/usermod_v2_games.h b/usermods/usermod_v2_games/usermod_v2_games.h index db8a77c3..0818ef28 100644 --- a/usermods/usermod_v2_games/usermod_v2_games.h +++ b/usermods/usermod_v2_games/usermod_v2_games.h @@ -264,6 +264,7 @@ class Frame3D { points.push_back(voxel); } void drawLineXYZ(Voxel from, Voxel to, uint32_t col) { + //causes crash on ESP8266: StoreProhibited: A store referenced a page mapped with an attribute that does not permit stores, maybe not enough free heap for (float x=MIN(from.x, to.x); x<=MAX(from.x, to.x); x+=.05) for (float y=MIN(from.y, to.y); y<=MAX(from.y, to.y); y+=.05) for (float z=MIN(from.z, to.z); z<=MAX(from.z, to.z); z+=.05) @@ -329,9 +330,9 @@ class GamesUsermod : public Usermod { strip.addEffect(255, &mode_pongGame, _data_FX_MODE_PONGGAME); #ifdef USERMOD_MPU6050_IMU IMU = (MPU6050Driver *)usermods.lookup(USERMOD_ID_IMU); - #ifdef WLED_DEBUG + // #ifdef WLED_DEBUG strip.addEffect(255, &mode_IMUTest, _data_FX_MODE_IMUTest); - #endif + // #endif #endif strip.addEffect(255, &mode_3DIMUCube, _data_FX_MODE_3DIMUCube); //works also without IMU } diff --git a/usermods/usermod_v2_rotary_encoder_ui_ALT/usermod_v2_rotary_encoder_ui_ALT.h b/usermods/usermod_v2_rotary_encoder_ui_ALT/usermod_v2_rotary_encoder_ui_ALT.h index 6500f0a7..6db990c7 100644 --- a/usermods/usermod_v2_rotary_encoder_ui_ALT/usermod_v2_rotary_encoder_ui_ALT.h +++ b/usermods/usermod_v2_rotary_encoder_ui_ALT/usermod_v2_rotary_encoder_ui_ALT.h @@ -872,7 +872,7 @@ public: //WLEDMM: add appendConfigData void appendConfigData() { - oappend(SET_F("addHB('")); oappend(_name); oappend("');"); + oappend(SET_F("addHB('Rotary-Encoder');")); #ifdef ENCODER_DT_PIN oappend(SET_F("xOption('Rotary-Encoder:DT-pin',1,' ⎌',")); oappendi(ENCODER_DT_PIN); oappend(");"); diff --git a/wled00/data/settings_um.htm b/wled00/data/settings_um.htm index cc8ba2ae..d1eb4df6 100644 --- a/wled00/data/settings_um.htm +++ b/wled00/data/settings_um.htm @@ -121,7 +121,7 @@ if (f.includes("pin")) { var n = this.name.replace("[]","").substr(-3); urows += `