Open NonaSuomy opened 12 months ago
Hello thank you for your work.... im getting this error during the esphome compiling:
INFO ESPHome 2024.2.1
INFO Reading configuration /config/esphome/ttgo-camera-plus.yaml...
WARNING GPIO5 is a strapping PIN and should only be used for I/O with care.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
WARNING GPIO2 is a strapping PIN and should only be used for I/O with care.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
WARNING GPIO12 is a strapping PIN and should only be used for I/O with care.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
WARNING GPIO15 is a strapping PIN and should only be used for I/O with care.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
INFO Generating C++ source...
Traceback (most recent call last):
File "/usr/local/bin/esphome", line 33, in
How i can solve ? Thanks
Did you modify the code or just copy pasta compile?
no i didnt modify it... just added the wifi settings
Ok I will break out the board and have a look, probably what has happened is the display library is properly released now so maybe you don't require the git inclusion for it.
Edit: Yes this is the case so just remove...
# https://github.com/esphome/issues/issues/5089
# - source: github://pr#5406
# components: [ ili9xxx ]
Fixed above as well. Thanks for pointing that out.
Finally i flashed the module.... but the image into the display not refreshing and into the logs i have this errors:
[11:36:29][W][component:214]: Component display took a long time for an operation (0.14 s). [11:36:29][W][component:215]: Components should block for at most 20-30ms. [11:36:30][W][component:214]: Component display took a long time for an operation (0.14 s). [11:36:30][W][component:215]: Components should block for at most 20-30ms. [11:36:31][W][component:214]: Component display took a long time for an operation (0.14 s). [11:36:31][W][component:215]: Components should block for at most 20-30ms. [11:36:32][W][component:214]: Component display took a long time for an operation (0.14 s). [11:36:32][W][component:215]: Components should block for at most 20-30ms. [11:36:33][W][component:214]: Component display took a long time for an operation (0.14 s). [11:36:33][W][component:215]: Components should block for at most 20-30ms. [11:36:33][D][esp32_camera:196]: Got Image: len=2891
From that, it looks great so far. You're missing the start of the log. This happens sometimes, you won't see the URL it downloaded if you don't catch the log from startup. Those are not errors. They are part of newer logging features in esphome most sensors will dump stuff like that, which are heavy loads.
Are you using the exact same board as in the picture above?
There are two LCDs that are named the same but are completely different st7789 and the st7789v.
Have you tested the display in the past and seen something show up on it? Lilygo stuff does not have the best track record with me and quality control. Had many problems with diodes soldered on backward frying the boards, USB ports not even attached to the board, and sending the wrong products.
I'm not sure about your local speeds of connections but I had issues depending on the server I was pulling from. Maybe try to use a PNG server that is close to your location. Try that gopher one switch the url: https://www.kasandbox.org/programming-images/avatars/cs-hopper-cool.png as well. Also, test if you can see the URLs on your computer with wifi connected to the same network as the device.
https://github-production-user-asset-6210df.s3.amazonaws.com/1906575/280905647-ca42ade8-e4a9-4bfb-88ec-081e71963b32.png This image takes a long time to load on mine. Right when I think it failed, I look down and the image is on the device.
The other urls won't work for you as they are for a local jpg to png converting server. I was trying to load the camera server on the esp from a cached copy to the display on itself which that image above is from.
Here is an example of a successful log. Maybe try to reset the device a few times to see if it grabs the image but defo find a fast server with a tiny image to test with.
INFO ESPHome 2024.2.1
INFO Reading configuration /config/ttgo-camera-plus.yaml...
WARNING GPIO5 is a strapping PIN and should only be used for I/O with care.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
WARNING GPIO2 is a strapping PIN and should only be used for I/O with care.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
WARNING GPIO12 is a strapping PIN and should only be used for I/O with care.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
WARNING GPIO15 is a strapping PIN and should only be used for I/O with care.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
INFO Starting log output from 10.0.42.132 using esphome API
INFO Successfully connected to ttgo-camera-plus-001 @ 10.0.42.132 in 0.107s
INFO Successful handshake with ttgo-camera-plus-001 @ 10.0.42.132 in 0.476s
[20:00:39][I][app:102]: ESPHome version 2024.2.1 compiled on Mar 3 2024, 21:37:16
[20:00:39][I][app:104]: Project nonasuomy.ttgo-camera-plus version 1.0
[20:00:39][C][wifi:577]: WiFi:
[20:00:39][C][wifi:409]: Local MAC: de:ad:be:ef:00:01
[20:00:39][C][wifi:414]: SSID: [redacted]
[20:00:39][C][wifi:415]: IP Address: 10.0.42.132
[20:00:39][C][wifi:417]: BSSID: [redacted]
[20:00:39][C][wifi:418]: Hostname: 'ttgo-camera-plus-001'
[20:00:39][C][wifi:420]: Signal strength: -40 dB ▂▄▆█
[20:00:39][C][wifi:424]: Channel: 10
[20:00:39][C][wifi:425]: Subnet: 255.255.255.0
[20:00:39][C][wifi:426]: Gateway: 10.0.42.1
[20:00:39][C][wifi:427]: DNS1: 10.0.42.1
[20:00:39][C][wifi:428]: DNS2: 0.0.0.0
[20:00:39][C][logger:447]: Logger:
[20:00:39][C][logger:448]: Level: DEBUG
[20:00:39][C][logger:449]: Log Baud Rate: 115200
[20:00:39][C][logger:451]: Hardware UART: UART0
[20:00:39][C][spi:068]: SPI bus:
[20:00:39][C][spi:069]: CLK Pin: GPIO21
[20:00:39][C][spi:070]: SDI Pin: GPIO22
[20:00:39][C][spi:071]: SDO Pin: GPIO19
[20:00:39][C][spi:076]: Using HW SPI: SPI
[20:00:39][C][ledc.output:164]: LEDC Output:
[20:00:39][C][ledc.output:165]: Pin GPIO2
[20:00:39][C][ledc.output:166]: LEDC Channel: 0
[20:00:39][C][ledc.output:167]: PWM Frequency: 1000.0 Hz
[20:00:39][C][ledc.output:168]: Bit depth: 16
[20:00:39][C][ili9xxx:073]: ili9xxx
[20:00:39][C][ili9xxx:073]: Rotations: 0 °
[20:00:39][C][ili9xxx:073]: Dimensions: 240px x 240px
[20:00:39][C][ili9xxx:074]: Width Offset: 0
[20:00:39][C][ili9xxx:075]: Height Offset: 0
[20:00:39][C][ili9xxx:081]: Color mode: 16bit
[20:00:39][C][ili9xxx:090]: Data rate: 40MHz
[20:00:39][C][ili9xxx:093]: CS Pin: GPIO12
[20:00:39][C][ili9xxx:094]: DC Pin: GPIO15
[20:00:39][C][ili9xxx:096]: Color order: BGR
[20:00:39][C][ili9xxx:097]: Swap_xy: NO
[20:00:40][C][ili9xxx:098]: Mirror_x: NO
[20:00:40][C][mdns:115]: mDNS:
[20:00:40][C][mdns:116]: Hostname: ttgo-camera-plus-001
[20:00:40][C][ota:096]: Over-The-Air Updates:
[20:00:40][C][ota:097]: Address: 10.0.42.132:3232
[20:00:40][C][ota:100]: Using Password.
[20:00:40][C][ota:103]: OTA version: 2.
[20:00:40][C][api:139]: API Server:
[20:00:40][C][api:140]: Address: 10.0.42.132:6053
[20:00:40][C][api:142]: Using noise encryption: YES
[20:00:40][I][online_image:348]: Updating image
[20:00:41][D][online_image:384]: Content Type: image/png
[20:00:42][D][online_image:385]: Content Length: 82550
[20:00:42][D][online_image:386]: ETag: "60776233109f4ddb996eb2a1cc110af2"
[20:00:42][I][online_image:408]: Downloading image from https://github-production-user-asset-6210df.s3.amazonaws.com/1906575/280905647-ca42ade8-e4a9-4bfb-88ec-081e71963b32.png
[20:00:42][W][component:214]: Component esphome.coroutine took a long time for an operation (1.95 s).
[20:00:42][W][component:215]: Components should block for at most 20-30ms.
[20:00:42][C][esp32_camera_web_server:088]: ESP32 Camera Web Server:
[20:00:42][C][esp32_camera_web_server:089]: Port: 8081
[20:00:42][C][esp32_camera_web_server:093]: Mode: snapshot
[20:00:42][D][online_image:154]: Allocating new buffer of 86400 Bytes...
[20:00:42][D][online_image:161]: New size: (240, 180)
[20:00:42][W][component:214]: Component online_image took a long time for an operation (0.10 s).
[20:00:42][W][component:215]: Components should block for at most 20-30ms.
[20:00:43][W][component:214]: Component online_image took a long time for an operation (0.16 s).
[20:00:43][W][component:215]: Components should block for at most 20-30ms.
[20:00:43][W][component:214]: Component online_image took a long time for an operation (0.16 s).
[20:00:43][W][component:215]: Components should block for at most 20-30ms.
[20:00:44][W][component:214]: Component online_image took a long time for an operation (0.16 s).
[20:00:44][W][component:215]: Components should block for at most 20-30ms.
[20:00:44][W][component:214]: Component online_image took a long time for an operation (0.14 s).
[20:00:44][W][component:215]: Components should block for at most 20-30ms.
[20:00:44][D][online_image:178]: Image fully downloaded
[20:00:44][W][component:214]: Component online_image took a long time for an operation (0.15 s).
[20:00:45][W][component:215]: Components should block for at most 20-30ms.
[20:00:45][W][component:214]: Component display took a long time for an operation (0.14 s).
[20:00:45][W][component:215]: Components should block for at most 20-30ms.
[20:00:46][W][component:214]: Component display took a long time for an operation (0.14 s).
[20:00:46][W][component:215]: Components should block for at most 20-30ms.
[20:00:47][W][component:214]: Component display took a long time for an operation (0.15 s).
[20:00:47][W][component:215]: Components should block for at most 20-30ms.
[20:00:48][D][api:102]: Accepted 10.0.10.42
[20:00:48][D][api.connection:1121]: Home Assistant 2024.3.0b5 (10.0.10.42): Connected successfully
[20:00:48][W][component:214]: Component display took a long time for an operation (0.15 s).
[20:00:48][W][component:215]: Components should block for at most 20-30ms.
[20:00:49][W][component:214]: Component display took a long time for an operation (0.15 s).
[20:00:49][W][component:215]: Components should block for at most 20-30ms.
[20:00:50][D][esp32_camera:196]: Got Image: len=3008
To pull this off it was all bleeding edge case stuff to get working especially this PNG library which is not finished yet. So there will be dragons.
Here are all the things I discovered in my attempt to get everything working on this board with ESPHome. Hope it helps someone if you learn something interesting please share back.
ESPHome working things
ESPHome doesn't currently support SDCards
Issues: 1.) Devices use flash pins 2.) The camera uses the same I2C pins as the other I2C devices BME, MPU6050, IP5306 3.) The display code required a non-existent reset pin. 4.) Voice Assistant requires esp-idf to function properly
Fixes: 1.) Use DIO mode 2.) ESPHome ssieb added a patch below to fix this issue. 3.) ESPHome Clyde added a patch to use a different display driver to not require the reset pin. 4.) Switch code to esp-idf but other fixes won't work as they only work with Arduino builds. :(
Uncomment different parts of the code if you want to play with different features some won't currently work with everything.
The last thing I was trying to do was to display the camera feed on the display with an imgproxy docker as online_image only supports PNG currently. Got it displaying online images just not the camera feed (Currently crashes when you try to use interval to load images)
Voice Assistant works pretty good displays what you say on the LCD display etc.
Have fun!