ako uplny zaciatocnik sa snazim vytvorit svoj prvy projekt. Malo by to byt Esp8266 s led pasom do kuchyne s cidlom.
1. esp8266 s aht22 fonguje uz asi mesiac.
2. dnes mi prisiel zdroj 5v 12a a ws2812b 3m 1m/60led
pozapojeni a nahodeni kodu mi svieti len prva led neda sa vypinacom v HA vypnut ani zapnut len svieti.
Mohol by mi niekto pomoct sa zorientovat pridavam aj kod co som nahodil.
Kód: Vybrat vše
esphome:
name: kuchyna-esp8266
esp8266:
board: nodemcuv2
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "1G3nP5l+RYGqca4W6AjrJsfjTH999uEWb0VjuQWc9Xw="
ota:
password: "3de370bb485368e558b4f613ed9eefde"
wifi:
ssid: "IOT"
password: "@@@"
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Kuchyna-Esp8266 Fallback Hotspot"
password: "ryFFrdxWsvbv"
captive_portal:
sensor:
- platform: aht10
temperature:
name: "Teplota Kuchyňa"
humidity:
name: "Vlhkosť kuchyňa"
update_interval: 60s
light:
- platform: neopixelbus
type: BRG
variant: WS2812
pin: GPIO14
num_leds: 180
name: "NeoPixel Light"
i2c:
sda: GPIO4
scl: GPIO5
scan: true
id: bus_a
Kód: Vybrat vše
INFO Reading configuration /config/esphome/kuchyna-esp8266.yaml...
INFO Starting log output from kuchyna-esp8266.local using esphome API
INFO Successfully connected to kuchyna-esp8266.local
[19:56:11][I][app:102]: ESPHome version 2023.2.3 compiled on Feb 21 2023, 19:40:14
[19:56:12][C][wifi:504]: WiFi:
[19:56:12][C][wifi:362]: Local MAC: 2C:F4:32:19:CE:08
[19:56:12][C][wifi:363]: SSID: [redacted]
[19:56:12][C][wifi:364]: IP Address: 10.10.10.7
[19:56:12][C][wifi:365]: BSSID: [redacted]
[19:56:12][C][wifi:367]: Hostname: 'kuchyna-esp8266'
[19:56:12][C][wifi:369]: Signal strength: -66 dB ▂▄▆█
[19:56:12][C][wifi:373]: Channel: 1
[19:56:12][C][wifi:374]: Subnet: 255.255.255.0
[19:56:12][C][wifi:375]: Gateway: 10.10.10.1
[19:56:12][C][wifi:376]: DNS1: 10.10.10.1
[19:56:12][C][wifi:377]: DNS2: 0.0.0.0
[19:56:12][C][logger:293]: Logger:
[19:56:12][C][logger:294]: Level: DEBUG
[19:56:12][C][logger:295]: Log Baud Rate: 115200
[19:56:12][C][logger:296]: Hardware UART: UART0
[19:56:12][C][i2c.arduino:052]: I2C Bus:
[19:56:12][C][i2c.arduino:053]: SDA Pin: GPIO4
[19:56:12][C][i2c.arduino:054]: SCL Pin: GPIO5
[19:56:12][C][i2c.arduino:055]: Frequency: 50000 Hz
[19:56:12][C][i2c.arduino:058]: Recovery: bus successfully recovered
[19:56:12][I][i2c.arduino:068]: Results from i2c bus scan:
[19:56:12][I][i2c.arduino:074]: Found i2c device at address 0x38
[19:56:12][C][light:104]: Light 'NeoPixel Light'
[19:56:12][C][light:106]: Default Transition Length: 1.0s
[19:56:12][C][light:107]: Gamma Correct: 2.80
[19:56:12][C][aht10:136]: AHT10:
[19:56:12][C][aht10:137]: Address: 0x38
[19:56:12][C][aht10:141]: Temperature 'Teplota Kuchyňa'
[19:56:12][C][aht10:141]: Device Class: 'temperature'
[19:56:12][C][aht10:141]: State Class: 'measurement'
[19:56:12][C][aht10:141]: Unit of Measurement: '°C'
[19:56:12][C][aht10:141]: Accuracy Decimals: 2
[19:56:12][C][aht10:142]: Humidity 'Vlhkosť kuchyňa'
[19:56:12][C][aht10:142]: Device Class: 'humidity'
[19:56:12][C][aht10:142]: State Class: 'measurement'
[19:56:12][C][aht10:142]: Unit of Measurement: '%'
[19:56:12][C][aht10:142]: Accuracy Decimals: 2
[19:56:12][C][captive_portal:088]: Captive Portal:
[19:56:12][C][mdns:108]: mDNS:
[19:56:12][C][mdns:109]: Hostname: kuchyna-esp8266
[19:56:12][C][ota:093]: Over-The-Air Updates:
[19:56:12][C][ota:094]: Address: kuchyna-esp8266.local:8266
[19:56:12][C][ota:097]: Using Password.
[19:56:12][C][api:138]: API Server:
[19:56:12][C][api:139]: Address: kuchyna-esp8266.local:6053
[19:56:12][C][api:141]: Using noise encryption: YES
[19:56:27][D][aht10:083]: AHT10 is busy, waiting...
[19:56:27][D][sensor:126]: 'Teplota Kuchyňa': Sending state 21.70715 °C with 2 decimals of accuracy
[19:56:27][D][sensor:126]: 'Vlhkosť kuchyňa': Sending state 42.09719 % with 2 decimals of accuracy