# Activate usermods in platform-override

**URL:** <https://wled.discourse.group/t/activate-usermods-in-platform-override/4702>\
**Category:** Usermods\
**Created:** [January 16, 2022, 5:04pm UTC](https://wled.discourse.group/t/activate-usermods-in-platform-override/4702 "2022-01-16T17:04:01Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![DarthWeber](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/darthweber/32/7447_2.png) [@DarthWeber](https://wled.discourse.group/u/DarthWeber)\
**Post date:** [January 16, 2022, 5:04pm UTC](https://wled.discourse.group/t/activate-usermods-in-platform-override/4702/1 "2022-01-16T17:04:01Z")

</div>

Hi, i am trying to activate the temperatur mod, according to the platform\_override.ini:

```auto
; Options
; -------
; USERMOD_DALLASTEMPERATURE - define this to have this user mod included wled00\usermods_list.cpp
; USERMOD_DALLASTEMPERATURE_CELSIUS - define this to report temperatures in degrees celsius, otherwise fahrenheit will be reported
; USERMOD_DALLASTEMPERATURE_MEASUREMENT_INTERVAL - the number of milliseconds between measurements, defaults to 60 seconds
; USERMOD_DALLASTEMPERATURE_FIRST_MEASUREMENT_AT - the number of milliseconds after boot to take first measurement, defaults to 20 seconds
;
[env:d1_mini_usermod_dallas_temperature_C]
extends = env:d1_mini
build_flags = ${common.build_flags_esp8266} -D USERMOD_DALLASTEMPERATURE -D USERMOD_DALLASTEMPERATURE_CELSIUS
lib_deps = ${env.lib_deps}
    milesburton/DallasTemperature@^3.9.0
    OneWire@~2.3.5

```

what do i need to do ? I am new to platformIO and even to C - how do i "define this to have this user mod included " ? If i comment it out, it just yields to error messages that the header is missing

Thanks,  
Tom

---

<div class="post-metadata">

**Author:** ![srg74](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/srg74/32/3018_2.png) [@srg74](https://wled.discourse.group/u/srg74)\
**Post date:** [January 16, 2022, 5:56pm UTC](https://wled.discourse.group/t/activate-usermods-in-platform-override/4702/2 "2022-01-16T17:56:12Z")

</div>

```auto
extends = env:d1_mini
build_flags = ${common.build_flags_esp8266}
  -D USERMOD_DALLASTEMPERATURE
lib_deps = ${env.lib_deps}
    OneWire@~2.3.6
```

---

<div class="post-metadata">

**Author:** ![DarthWeber](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/darthweber/32/7447_2.png) [@DarthWeber](https://wled.discourse.group/u/DarthWeber)\
**Post date:** [January 17, 2022, 5:23am UTC](https://wled.discourse.group/t/activate-usermods-in-platform-override/4702/3 "2022-01-17T05:23:14Z")

</div>

but this yields to

```auto
Error: Invalid 'platformio_override.ini' (project configuration file): 'File contains no section headers.
file: 'platformio_override.ini', line: 1
'extends = env:d1_mini\n''

```

---

<div class="post-metadata">

**Author:** ![srg74](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/srg74/32/3018_2.png) [@srg74](https://wled.discourse.group/u/srg74)\
**Post date:** [January 17, 2022, 4:04pm UTC](https://wled.discourse.group/t/activate-usermods-in-platform-override/4702/4 "2022-01-17T16:04:09Z")

</div>

you have to add env header

`[env:d1_mini_usermod_dallas_temperature_C]`

---

<div class="post-metadata">

**Author:** ![DarthWeber](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/darthweber/32/7447_2.png) [@DarthWeber](https://wled.discourse.group/u/DarthWeber)\
**Post date:** [January 17, 2022, 4:53pm UTC](https://wled.discourse.group/t/activate-usermods-in-platform-override/4702/5 "2022-01-17T16:53:10Z")

</div>

don’t understand. Where do i need to put this header ? It’s in the platform\_override.ini already

---

<div class="post-metadata">

**Author:** ![srg74](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/srg74/32/3018_2.png) [@srg74](https://wled.discourse.group/u/srg74)\
**Post date:** [January 17, 2022, 7:18pm UTC](https://wled.discourse.group/t/activate-usermods-in-platform-override/4702/6 "2022-01-17T19:18:13Z")

</div>

> [@srg74](#):
>
> ```auto
> extends = env:d1_mini
> build_flags = ${common.build_flags_esp8266}
> -D USERMOD_DALLASTEMPERATURE
> lib_deps = ${env.lib_deps}
> OneWire@~2.3.6
> 
> ```

I just checked this env and it working fine

```auto
[env:ESP8266_dallas_sensor]
extends = env:d1_mini
build_flags = ${common.build_flags_esp8266}
  -D USERMOD_DALLASTEMPERATURE
  -UWLED_USE_MY_CONFIG
upload_speed = 460800
lib_deps = ${esp8266.lib_deps}
  OneWire@~2.3.6

```

---

<div class="post-metadata">

**Author:** ![DarthWeber](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/darthweber/32/7447_2.png) [@DarthWeber](https://wled.discourse.group/u/DarthWeber)\
**Post date:** [January 17, 2022, 9:07pm UTC](https://wled.discourse.group/t/activate-usermods-in-platform-override/4702/7 "2022-01-17T21:07:30Z")

</div>

I am trying with esp32\_eth. I still don’t understand which files needs to be modified. Platformio\_override.ini? Or other files?

---

<div class="post-metadata">

**Author:** ![srg74](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/srg74/32/3018_2.png) [@srg74](https://wled.discourse.group/u/srg74)\
**Post date:** [January 17, 2022, 10:57pm UTC](https://wled.discourse.group/t/activate-usermods-in-platform-override/4702/8 "2022-01-17T22:57:02Z")

</div>

The problem is you post first that you using d1 mini board which is ESP8266 and now you mentioning that you want to use ESP32 ethernet board. Can you describe what is your goal?

---

<div class="post-metadata">

**Author:** ![DarthWeber](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/darthweber/32/7447_2.png) [@DarthWeber](https://wled.discourse.group/u/DarthWeber)\
**Post date:** [January 18, 2022, 7:54am UTC](https://wled.discourse.group/t/activate-usermods-in-platform-override/4702/9 "2022-01-18T07:54:01Z")

</div>

No, i didn’t post that - i only showed the platform\_override.ini as i downloaded it from git. I do not know what i need to change after i put it in the platformio root.

I have a eth01 board so i used “default\_envs = esp32\_eth” in platformio.ini

I have no idea what i need to do with the override file. Probably:

```auto
; Options
; -------
; USERMOD_DALLASTEMPERATURE - define this to have this user mod included wled00\usermods_list.cpp
; USERMOD_DALLASTEMPERATURE_CELSIUS - define this to report temperatures in degrees celsius, otherwise fahrenheit will be reported
; USERMOD_DALLASTEMPERATURE_MEASUREMENT_INTERVAL - the number of milliseconds between measurements, defaults to 60 seconds
; USERMOD_DALLASTEMPERATURE_FIRST_MEASUREMENT_AT - the number of milliseconds after boot to take first measurement, defaults to 20 seconds
;
[env:esp32_eth_usermod_dallas_temperature_C]
extends = env:esp32_eth
build_flags = ${common.build_flags_esp32} -D USERMOD_DALLASTEMPERATURE -D USERMOD_DALLASTEMPERATURE_CELSIUS
lib_deps = ${env.lib_deps}
    milesburton/DallasTemperature@^3.9.0
    OneWire@~2.3.5

```

but the usermod is still not included

---

<div class="post-metadata">

**Author:** ![srg74](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/srg74/32/3018_2.png) [@srg74](https://wled.discourse.group/u/srg74)\
**Post date:** [January 19, 2022, 3:21am UTC](https://wled.discourse.group/t/activate-usermods-in-platform-override/4702/10 "2022-01-19T03:21:51Z")

</div>

```auto
[env:esp32_ethernet_dallas]
board = esp32dev
board_build.partitions = tools/WLED_ESP32_4MB_1MB_FS.csv
platform = espressif32@3.4
upload_speed = 460800
build_flags = ${common.build_flags_esp32}
  -D USERMOD_DALLASTEMPERATURE
; -D TEMPERATURE_PIN=36
  -D WLED_RELEASE_NAME=ESP32_Ethernet
  -D WLED_ENABLE_ETHERNET
  -UWLED_USE_MY_CONFIG
lib_deps = ${esp32.lib_deps}
  OneWire@~2.3.5

```

---

<div class="post-metadata">

**Author:** ![DarthWeber](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/darthweber/32/7447_2.png) [@DarthWeber](https://wled.discourse.group/u/DarthWeber)\
**Post date:** [January 19, 2022, 6:41am UTC](https://wled.discourse.group/t/activate-usermods-in-platform-override/4702/11 "2022-01-19T06:41:32Z")

</div>

just to make it sure: I put that in the OVERRIDE file, is that right ? Anyway it does not inlcude the temperature usermod - is missing in the binary.

Until now i only get it if i omit all that #ifdef in the usermod\_list.cpp around temperature. So it looks to me that the defines are still not set.

---

<div class="post-metadata">

**Author:** ![srg74](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/srg74/32/3018_2.png) [@srg74](https://wled.discourse.group/u/srg74)\
**Post date:** [January 19, 2022, 10:16pm UTC](https://wled.discourse.group/t/activate-usermods-in-platform-override/4702/12 "2022-01-19T22:16:57Z")

</div>

If you not change any code and just add that env to your PlatformIO override file everything should work fine. I have compiled thousands time and everything is working fine.
