Hello,
Thanks to your help, my first steps went very well.
I have a D1Mini here that controls my Led. Temperature/humidity works as well
Dimming, switching on/off the LEDs.
Now I want to add a timer for days, months and year.
I'm currently testing the light scheduler so that I can understand the function first. How to connect it and which nodes I might still need.
Ask:
Can I connect the light scheduler directly to the mqtt nodes of the D1Mini.
I have 5 nodes (temperature, humidity, LED_1, LED_2, LED_3. I can switch and dim the LEDs but only manually.
Or do I need an additional switch here?
I thought, since I can already switch the LEDs from the dashboard, maybe I just need to put a scheduler in front of it and it will then switch the LEDs.
Is the?
Best regards
Achim
Hier ist der ESPHome Code vom D1Mini.
Vieles habe ich mir von einem Beispiel vom Benutzer TotallyInformation hier im Forum kopiert
# D1 Mini Configuration for D1M05 (D1 Mini)
# Pins (=GPIO)| Input? | Output? | Comments
# D0 = 16 | Y | Y | High @ boot, Wake, I/P: No Interrupt, O/P: No PWM or I2C
# D1 = 5 | Y | Y | I2C SCL
# D2 = 4 | Y | Y | I2C SDA
# D3 = 0 | Y | Y |
# D4 = 2 | Y | Y | Onboard LED
# D5 = 14 | Y | Y |
# D6 = 12 | Y | Y |
# D7 = 13 | Y | Y |
# D8 = 15 | Y | Y |
# RX = 3 | Y | Y |
# TX = 1 | | Y |
# A0 = ADC0 | Y | |
substitutions: # All have to be strings, the substitution process will convert them to the correct types
devicename: d1m01-kueche-anzuchtbox
upper_devicename: D1Mini kueche Anzuchtbox
device_location: Kueche
device_description: Anzuchtbox Steuerung platform using ESPhome firmware
ipaddress: 192.168.2.101
mqtt_prefix: d1m01-kueche-anzuchtbox # $mqtt_root/$devicename # Argh! combined substitutions don't work!
esp_board: d1_mini
last_update: "2023-05-02 20:47:12"
mqtt:
broker: !secret mqtt_broker
username: !secret mqtt_username
password: !secret mqtt_password
topic_prefix: AnzuchtBox
id: mqtt_client
wifi:
power_save_mode: none # none (default for esp8266), light (default for esp32), high
ssid: !secret WLAN_ASUS_SSID
password: !secret WLAN_ASUS_PASSWORD
manual_ip:
static_ip: !secret D1MINI_KUECHE_ANZUCHTBOX_IP
gateway: !secret WLAN_ASUS_GATEWAY_IP
subnet: !secret WLAN_ASUS_SUBNET
dns1: !secret WLAN_ASUS_DNS1
#fast_connect: on
ap: # Enable fallback hotspot (captive portal) in case wifi connection fails
ssid: "Anzuchtbox Fallback Hotspot"
password: !secret WIFI_AP_PASSWORD
ota:
safe_mode: true
password: !secret HA_OTA_PASSWORD
api: # Enable Home Assistant API
encryption:
key: "VI6xMzgYs40Sa9rs0r5xjMa1gAaGQzjMZL/HlASdHQ0="
esphome:
name: $devicename
friendly_name: Grobot-AnzuchtBox
platform: ESP8266
board: d1_mini
# Festlegen der I2C Ports ESP32 und ESP8266
i2c:
sda: 4 # Standard Port für ESP8266 GPIO4 sda
scl: 5 # Standard Port für ESP8266 GPIO5 scl
scan: true # I2C Port_Scan Standard = true
id: bus_a # id = bei mehreren PCA9685
# pca9685 16 Channel PWM Multiplexer konfiguration
pca9685:
id: pca9685_hub1 # id muss nur angegeben werden wenn mehrere PCAs vorhanden sind
frequency: 1000 # für MW-LDD s sollten 1000 HZ (mögliche Werte 24 Hz bis 1525,88 Hz. Standard 1000Hz) Frequenz eingestellt sein
address: 0x40 # HEX Adresse des PCA9685 , Standart = 0x40 (müsste in diesem Fall nicht mit angegeben werden)
light:
- platform: monochromatic
name: "Anzuchtbox 2 x 3500K LED-Mitte"
output: "PWM0"
state_topic: AnzuchtBox/Light_Control/3500K_LED_Mitte
- platform: monochromatic
name: "Anzuchtbox 2 x 3500K LED-Links/Rechts"
output: "PWM1"
state_topic: AnzuchtBox/Light_Control/3500K_LED_L_R
- platform: monochromatic
name: "Anzuchtbox 4 x 5000K LED"
state_topic: AnzuchtBox/Light_Control/5000K
output: "PWM2"
# Festlegen der PWM Outputs 0-15
output:
- platform: pca9685
id: PWM0
channel: 0 # Kanal 0-15, wir benutzen den Kanal 4 = 5. Pin 0,1,2,3,4...
- platform: pca9685
id: PWM1
channel: 1 # Kanal 0-15, wir benutzen den Kanal 3 = 4. Pin 0,1,2,3,4...
- platform: pca9685
id: PWM2
channel: 2 # Kanal 0-15, wir benutzen den Kanal 4 = 5. Pin 0,1,2,3,4...
# Enable logging
logger:
captive_portal:
# DHT22 Temp/Humidy Sensor
sensor:
- platform: dht
pin: D0
model: AM2302
temperature:
name: "Temperatur"
id: temperatur
state_topic: AnzuchtBox/DHT22/Temperatur
humidity:
name: "Luftfeuchtigkeit"
id: luftfeuchtigkeit
state_topic: AnzuchtBox/DHT22/Luftfeuchtigkeit
accuracy_decimals: 1
# filters:
# - offset: 4.2