Based on the excellent QuinLED_Dig_Uno_Temp_MQTT
by srg74 and 400killer!
This usermod will read from an attached DS18B20 temperature sensor (as available on the QuinLED Dig-Uno)
The temperature is displayed both in the Info section of the web UI as well as published to the /temperature
MQTT topic if enabled.
This usermod may be expanded with support for different sensor types in the future.
If temperature sensor is not detected during boot, this usermod will be disabled.
Copy the example platformio_override.ini
to the root directory. This file should be placed in the same directory as platformio.ini
.
USERMOD_DALLASTEMPERATURE
- define this to have this user mod included wled00\usermods_list.cppUSERMOD_DALLASTEMPERATURE_FIRST_MEASUREMENT_AT
- the number of milliseconds after boot to take first measurement, defaults to 20 secondsAll parameters can be configured at runtime using Usermods settings page, including pin, selection to display temerature in degrees Celsius or Farenheit mand measurement interval.
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
.
If you are not using platformio_override.ini
, you might have to uncomment OneWire@~2.3.5 under
[common]
section in platformio.ini
:
# platformio.ini
...
[platformio]
...
; default_envs = esp07
default_envs = d1_mini
...
[common]
...
lib_deps =
...
#For Dallas sensor uncomment following line
OneWire@~2.3.5
...
2020-09-12
Вы можете оставить комментарий после Вход в систему
Неприемлемый контент может быть отображен здесь и не будет показан на странице. Вы можете проверить и изменить его с помощью соответствующей функции редактирования.
Если вы подтверждаете, что содержание не содержит непристойной лексики/перенаправления на рекламу/насилия/вульгарной порнографии/нарушений/пиратства/ложного/незначительного или незаконного контента, связанного с национальными законами и предписаниями, вы можете нажать «Отправить» для подачи апелляции, и мы обработаем ее как можно скорее.
Опубликовать ( 0 )