ESPhome: Component not found: online_image

hello, i want display a image on my screen. but i get this error:
Component not found: online_image.

image

image

Where did you see that online_image was an esphome component?

OP, unsurprisingly, vscode does not know about custom components (or components pulled by PR)

and now… its not possible to show a “online” on my screen?

So this hasn’t been merged into esphome. Have patience.

What vscode tells is not the truth.
The only truth is installing the firmware. Do you have an error then?

I think vscode tells the truth. This component is not yet part of esphome.

yes
cant create a *.bin

You have to manually include the component until it’s merged an released, ofc,

e.g.

external_components:
  - source: github://guillempages/esphome@online_image_buffer
    components: [online_image]

looks better, but now i get

In file included from src/esphome/components/online_image/image_decoder.cpp:4:
src/esphome/components/online_image/online_image.h:5:10: fatal error: esphome/components/image/image.h: No such file or directory
#include “esphome/components/image/image.h”
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
*** [/data/display-7-5/.pioenvs/display-7-5/src/esphome/components/online_image/image_decoder.cpp.o] Error 1
========================= [FAILED] Took 39.92 seconds =========================

Maybe that is why it isn’t merged yet. Not ready. Have patience.

Where did you find that piece of code in the first place?

i looked here

and here

code

esphome:
  name: display-7-5
  friendly_name: Display_7_5
  on_boot:
    then:
      - wait_until: api.connected
      - component.update: example_image

esp32:
  board: esp32dev
  framework:
    type: arduino

external_components:
  - source: github://guillempages/esphome@online_image_buffer
    components: [online_image]

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "**************************"

ota:
  password: "************************"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Display-7-5 Fallback Hotspot"
    password: "***********************"

captive_portal:
       
spi:
  clk_pin: 13
  mosi_pin: 14

online_image:
  - url: "http://192.168.1.8:5000"
    id: example_image  
    format: PNG
    on_download_finished:
      - component.update: epaperdisplay
    on_error:
      - logger.log: "Could not download the image"

display:
  - platform: waveshare_epaper
    id: epaperdisplay
    cs_pin: 15
    dc_pin: 27
    busy_pin: 25
    reset_pin: 26
    model: 7.50inV2alt
    update_interval: 30s
    lambda: |-
     it.image(0, 0, id(example_image));

Hint for the future: If a pull request has the “Open” status, it means it’s a proposal that could be included in some future

If you look down in the comments, you’ll see references to using that component in its current state and reference to the issue you now have.

1 Like

thx. with a “fake” image it was possible to compile the code…

Image is there, quality bad. looks like image noise

Edit
now is good

online_image:
  - url: "http://192.168.1.8:5000"
    id: example_image  
    on_download_finished:
      - component.update: epaperdisplay
    on_error:
      - logger.log: "Could not download the image"

image:
  - file: mdi:alert-outline
    id: alert
    resize: 1x1

display:
  - platform: waveshare_epaper
    id: epaperdisplay
    cs_pin: 15
    dc_pin: 27
    busy_pin: 25
    reset_pin: 26
    model: 7.50inV2alt
    update_interval: never
    lambda: |-
     it.image(0, 0, id(example_image), COLOR_OFF, COLOR_ON);

Hi Ralf, which of the two PRs ended up working for you?

Or was it github://guillempages/esphome@online_image_buffer ?