noxx
(Ralf B)
August 29, 2023, 5:59am
1
hello, i want display a image on my screen. but i get this error:
Component not found: online_image.
nickrout
(Nick Rout)
August 29, 2023, 8:16am
2
Where did you see that online_image was an esphome component?
koying
(Chris B)
August 29, 2023, 8:38am
3
esphome:dev
← guillempages:online_image_buffer
opened 10:06PM - 19 Apr 23 UTC
# What does this implement/fix?
This PR implements the possibility of downloa… ding PNG images at runtime and showing them in a compatible display.
## Types of changes
- [ ] Bugfix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Other
**Related issue or feature (if applicable):** fixes https://github.com/esphome/feature-requests/issues/1463
**Pull request in [esphome-docs](https://github.com/esphome/esphome-docs) with documentation (if applicable):** esphome/esphome-docs#2076
## Test Environment
- [x] ESP32
- [ ] ESP32 IDF
- [ ] ESP8266
- [ ] RP2040
## Example entry for `config.yaml`:
<!--
Supplying a configuration snippet, makes it easier for a maintainer to test
your PR. Furthermore, for new integrations, it gives an impression of how
the configuration would look like.
Note: Remove this section if this PR does not have an example entry.
-->
```yaml
# Example config.yaml
esphome:
# ...
on_boot:
then:
- wait_until: api.connected
- component.update: example_image
online_image:
- url: "https://www.example.org/image.png"
id: example_image
type: RGB565
on_download_finished:
- component.update: my_display
on_error:
- logger.log: "Could not download the image"
display:
id: my_display
# ...
lambda: |-
it.image(0, 0, id(example_image));
```
## Checklist:
- [x] The code change is tested and works locally.
- [ ] Tests have been added to verify that the new code works (under `tests/` folder).
If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated in [esphome-docs](https://github.com/esphome/esphome-docs).
OP, unsurprisingly, vscode does not know about custom components (or components pulled by PR)
noxx
(Ralf B)
August 29, 2023, 10:46am
4
and now… its not possible to show a “online” on my screen?
nickrout
(Nick Rout)
August 29, 2023, 10:52am
5
So this hasn’t been merged into esphome. Have patience.
koying
(Chris B)
August 29, 2023, 10:52am
6
What vscode tells is not the truth.
The only truth is installing the firmware. Do you have an error then?
nickrout
(Nick Rout)
August 29, 2023, 10:54am
7
I think vscode tells the truth. This component is not yet part of esphome.
koying
(Chris B)
August 29, 2023, 10:59am
9
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]
noxx
(Ralf B)
August 29, 2023, 11:03am
10
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 =========================
nickrout
(Nick Rout)
August 29, 2023, 11:06am
11
Maybe that is why it isn’t merged yet. Not ready. Have patience.
koying
(Chris B)
August 29, 2023, 11:33am
12
Where did you find that piece of code in the first place?
noxx
(Ralf B)
August 29, 2023, 12:03pm
13
i looked here
esphome:dev
← guillempages:online_image_pngle
opened 07:33PM - 27 Feb 22 UTC
# What does this implement/fix?
This PR implements the possibility of downloa… ding PNG images at runtime and showing them in a compatible display.
## Types of changes
- [ ] Bugfix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Other
**Related issue or feature (if applicable):** relates to https://github.com/esphome/feature-requests/issues/1463
**Pull request in [esphome-docs](https://github.com/esphome/esphome-docs) with documentation (if applicable):** esphome/esphome-docs#2076
## Test Environment
- [x] ESP32 (Inkplate10)
- [ ] ESP32 IDF
- [ ] ESP8266
## Example entry for `config.yaml`:
<!--
Supplying a configuration snippet, makes it easier for a maintainer to test
your PR. Furthermore, for new integrations, it gives an impression of how
the configuration would look like.
Note: Remove this section if this PR does not have an example entry.
-->
```yaml
# Example config.yaml
online_image:
- url: "https://www.example.org/image.png"
id: example_image
format: PNG
display:
# ...
lambda: |-
it.image(0, 0, id(example_image));
```
## Checklist:
- [x] The code change is tested and works locally.
- [ ] Tests have been added to verify that the new code works (under `tests/` folder).
If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated in [esphome-docs](https://github.com/esphome/esphome-docs).
and here
esphome:dev
← guillempages:online_image_buffer
opened 10:06PM - 19 Apr 23 UTC
# What does this implement/fix?
This PR implements the possibility of downloa… ding PNG images at runtime and showing them in a compatible display.
## Types of changes
- [ ] Bugfix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Other
**Related issue or feature (if applicable):** fixes https://github.com/esphome/feature-requests/issues/1463
**Pull request in [esphome-docs](https://github.com/esphome/esphome-docs) with documentation (if applicable):** esphome/esphome-docs#2076
## Test Environment
- [x] ESP32
- [ ] ESP32 IDF
- [ ] ESP8266
- [ ] RP2040
## Example entry for `config.yaml`:
<!--
Supplying a configuration snippet, makes it easier for a maintainer to test
your PR. Furthermore, for new integrations, it gives an impression of how
the configuration would look like.
Note: Remove this section if this PR does not have an example entry.
-->
```yaml
# Example config.yaml
esphome:
# ...
on_boot:
then:
- wait_until: api.connected
- component.update: example_image
online_image:
- url: "https://www.example.org/image.png"
id: example_image
type: RGB565
on_download_finished:
- component.update: my_display
on_error:
- logger.log: "Could not download the image"
display:
id: my_display
# ...
lambda: |-
it.image(0, 0, id(example_image));
```
## Checklist:
- [x] The code change is tested and works locally.
- [ ] Tests have been added to verify that the new code works (under `tests/` folder).
If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated in [esphome-docs](https://github.com/esphome/esphome-docs).
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));
koying
(Chris B)
August 29, 2023, 12:41pm
14
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
noxx
(Ralf B)
August 29, 2023, 6:31pm
15
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);
danhiking
(Daniel)
February 27, 2024, 9:20pm
16
Hi Ralf, which of the two PRs ended up working for you?
Or was it github://guillempages/esphome@online_image_buffer
?