2020-05-28 02:20:02 +02:00
# Temperature usermod
2022-12-10 16:12:55 +01:00
Based on the excellent `QuinLED_Dig_Uno_Temp_MQTT` usermod by srg74 and 400killer!
Reads an attached DS18B20 temperature sensor (as available on the QuinLED Dig-Uno)
Temperature is displayed in both the Info section of the web UI as well as published to the `/temperature` MQTT topic, if enabled.
May be expanded with support for different sensor types in the future.
2020-05-28 02:20:02 +02:00
2020-09-13 19:26:27 +02:00
If temperature sensor is not detected during boot, this usermod will be disabled.
2020-05-28 02:20:02 +02:00
## Installation
2020-09-13 19:26:27 +02:00
Copy the example `platformio_override.ini` to the root directory. This file should be placed in the same directory as `platformio.ini` .
### Define Your Options
2022-12-10 16:12:55 +01:00
* `USERMOD_DALLASTEMPERATURE` - enables this user mod wled00/usermods_list.cpp
* `USERMOD_DALLASTEMPERATURE_FIRST_MEASUREMENT_AT` - umber of milliseconds after boot to take first measurement, defaults to 20000 ms
2020-05-28 02:20:02 +02:00
2022-12-10 16:12:55 +01:00
All parameters can be configured at runtime via the Usermods settings page, including pin, temperature in degrees Celsius or Farenheit and measurement interval.
2021-05-07 12:41:39 +02:00
2020-05-28 02:20:02 +02:00
## Project link
* [QuinLED-Dig-Uno ](https://quinled.info/2018/09/15/quinled-dig-uno/ ) - Project link
2021-05-17 12:52:27 +02:00
* [Srg74-WLED-Wemos-shield ](https://github.com/srg74/WLED-wemos-shield ) - another great DIY WLED board
2020-05-28 02:20:02 +02:00
### PlatformIO requirements
2020-09-13 19:26:27 +02:00
If you are using `platformio_override.ini` , you should be able to refresh the task list and see your custom task, for example `env:d1_mini_usermod_dallas_temperature_C` .
2021-05-17 12:52:27 +02:00
If you are not using `platformio_override.ini` , you might have to uncomment `OneWire@~2.3.5 under` `[common]` section in `platformio.ini` :
2020-05-28 02:20:02 +02:00
```ini
# platformio.ini
...
[platformio]
...
; default_envs = esp07
default_envs = d1_mini
...
[common]
...
2021-03-30 11:45:48 +02:00
lib_deps =
2020-05-28 02:20:02 +02:00
...
2021-05-07 12:41:39 +02:00
#For Dallas sensor uncomment following line
2020-05-28 02:20:02 +02:00
OneWire@~2.3.5
...
```
2020-09-13 19:26:27 +02:00
## Change Log
2020-09-12
2022-12-10 16:12:55 +01:00
* Changed to use async non-blocking implementation
* Do not report erroneous low temperatures to MQTT
2020-09-13 19:26:27 +02:00
* Disable plugin if temperature sensor not detected
2021-03-30 11:45:48 +02:00
* Report the number of seconds until the first read in the info screen instead of sensor error
2021-05-07 12:41:39 +02:00
2021-04
2022-12-10 16:12:55 +01:00
* Adaptation for runtime configuration.