I’m trying my first display with a D1 mini AZdelivery and a display driver ili9341. My first problem is when I define and upload the display and that is SPI in the ESP code, I no longer get any log output. without already.
and I ordered the 2.4 display from AZdelivery and there is a description there that I can’t find in any forums or tutorials.
What am I doing wrong with the code?
It does a great job of uploading and I can also see that it’s online in the Homeassistand interface.
My D1 mini is an esp8266.
I connected the D1 mini to a 2am Net device via USB. but even without the display connected I can’t get a log.
The display lights up when I connect it via 5V. Apart from that, I’m not sure which of the pins is the same as the display doesn’t have the pin labels like others of its kind.
This is the log after writing via ESPhome Wifi:
INFO ESPHome 2023.10.1
INFO Reading configuration /config/esphome/display-001.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing display-001 (board: d1_mini; framework: arduino; platform: platformio/[email protected])
--------------------------------------------------------------------------------
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
Dependency Graph
|-- ESP8266WiFi @ 1.0
|-- ESP8266mDNS @ 1.2
|-- noise-c @ 0.1.4
|-- SPI @ 1.0
Compiling .pioenvs/display-001/src/main.cpp.o
Linking .pioenvs/display-001/firmware.elf
RAM: [==== ] 38.3% (used 31388 bytes from 81920 bytes)
Flash: [==== ] 41.1% (used 429299 bytes from 1044464 bytes)
Building .pioenvs/display-001/firmware.bin
esp8266_copy_factory_bin([".pioenvs/display-001/firmware.bin"], [".pioenvs/display-001/firmware.elf"])
========================= [SUCCESS] Took 16.27 seconds =========================
INFO Successfully compiled program.
INFO Resolving IP address of display-001.local
INFO -> 192.168.11.151
INFO Uploading /data/build/display-001/.pioenvs/display-001/firmware.bin (433456 bytes)
INFO Compressed to 308221 bytes
Uploading: [============================================================] 100% Done...
INFO Waiting for result...
INFO OTA successful
INFO Successfully uploaded program.
ERROR Logger is not configured!
INFO Compressed to 311239 bytes
Uploading: [============================================================] 100% Done...
INFO Waiting for result...
INFO OTA successful
INFO Successfully uploaded program.
INFO Starting log output from display-001.local using esphome API
WARNING Can't connect to ESPHome API for display-001.local: Error resolving IP address: [Errno -5] No address associated with hostname (APIConnectionError)
INFO Trying to connect to display-001.local in the background
INFO Successfully connected to display-001.local
[12:01:53][I][app:102]: ESPHome version 2023.10.1 compiled on Oct 24 2023, 12:00:06
[12:01:53][C][wifi:546]: WiFi:
[12:01:53][C][wifi:382]: Local MAC: 08:3A:8D:F5:B8:A3
[12:01:53][C][wifi:383]: SSID: [redacted]
[12:01:53][C][wifi:384]: IP Address: 192.168.11.151
[12:01:53][C][wifi:385]: BSSID: [redacted]
[12:01:53][C][wifi:387]: Hostname: 'display-001'
[12:01:53][C][wifi:389]: Signal strength: -66 dB ▂▄▆█
[12:01:53][C][wifi:393]: Channel: 1
[12:01:53][C][wifi:394]: Subnet: 255.255.255.0
[12:01:53][C][wifi:395]: Gateway: 192.168.11.254
[12:01:53][C][wifi:396]: DNS1: 192.168.11.254
[12:01:53][C][wifi:397]: DNS2: 8.8.8.8
[12:01:53][C][logger:361]: Logger:
[12:01:53][C][logger:362]: Level: DEBUG
[12:01:53][C][logger:363]: Log Baud Rate: 115200
[12:01:53][C][logger:365]: Hardware UART: UART0
[12:01:53][C][mdns:115]: mDNS:
[12:01:53][C][mdns:116]: Hostname: display-001
[12:01:53][C][ota:097]: Over-The-Air Updates:
[12:01:53][C][ota:098]: Address: display-001.local:8266
[12:01:53][C][ota:101]: Using Password.
[12:01:53][C][api:138]: API Server:
[12:01:53][C][api:139]: Address: display-001.local:6053
[12:01:53][C][api:141]: Using noise encryption: YES
This is the issue. The D1 mini does not have enough RAM.
On my hardware I was running a firmware made with the Arduino framework and it worked for about 2 years. For some reason I lost my Ardu installation. I tried adding the correct libraries to a new install but with the latest versions the project just did not run stable anymore.
So, I was thinking I would give esphome a try. But unfortunately the ILIxxx display component + WiFi + API + OTA is already to much.
Now it runs without the display component in the configuration, just with the CO2 sensor and the rest of the home assistant needed components.
I will need to have a look, to see if I can replace the D1 mini with an D1 Mini 32. There is not that much space between the CO2 Sensor an the D1.