I have an ESP-EYE which includes this code:
esp32_camera:
id: espeye
name: esp-eye
external_clock:
pin: GPIO4
frequency: 20MHz
i2c_pins:
sda: GPIO18
scl: GPIO23
data_pins: [GPIO34, GPIO13, GPIO14, GPIO35, GPIO39, GPIO38, GPIO37, GPIO36]
vsync_pin: GPIO5
href_pin: GPIO27
pixel_clock_pin: GPIO25
resolution: 640X480
jpeg_quality: 10 # max. 63
max_framerate: 5.0fps
idle_framerate: 0.2fps
vertical_flip: true
horizontal_mirror: false
#... deleted for brevity
test_pattern: True
esp32_camera_web_server:
- port: 8080
mode: stream
- port: 8081
mode: snapshot
And an ESP32 using an ili9xxx e-paper display on which I’d like to see a snapshot from the camera. This is the relevant yaml:
display:
- platform: waveshare_epaper
id: epaperdisplay
busy_pin: GPIO39 #BUSY
reset_pin: GPIO37 #RST
dc_pin: GPIO35 #DC
cs_pin: GPIO33 #CS
model: 4.20in-v2
update_interval: 60s
reset_duration: 2ms
rotation: 0
lambda: |-
it.image(20, 200, id(mdi_alert)); //This works
it.image(120,200, id(lpg_level)); //But not this....
http_request:
verify_ssl: false
online_image:
- url: http://192.168.0.21:8081
format: png
id: lpg_level
resize: 80x80
update_interval: 10s #Can't wait. Increase later...
on_download_finished:
then:
- component.update: epaperdisplay
With this setup, the logging shows this:
[20:50:57][I][online_image:103]: Updating image
[20:50:58][D][http_request.arduino:124]: Content-Length: 13687
[20:50:58][D][online_image:128]: Starting download
[20:50:58][I][online_image:144]: Downloading image
[20:50:58][E][online_image.png:058]: Error decoding image: Incorrect PNG signature
[20:50:58][E][online_image:172]: Error when decoding image.
I guess that my problem is that the online_image: requires a png format but the camera server is generating jpeg? How / Where can I convert?
Regards, Martin