esphome:
name: isaac-e-ink
friendly_name: Isaac e-ink
esp32:
board: esp32-s3-devkitc-1
framework:
type: arduino
# Enable PSRAM support since online_image requires more than the available RAM capacity
psram:
mode: octal
speed: 80MHz
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key:
ota:
- platform: esphome
password: ""
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# ...
manual_ip:
# Set this to the IP of the ESP
static_ip: 10.0.0.5
# Set this to the IP address of the router. Often ends with .1
gateway: 10.0.0.50
# The subnet of the network. 255.255.255.0 works for most home networks.
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
#ap:
# ssid: "Isaac-E-Ink Fallback Hotspot"
# password: "ACqlmxv6yeR1"
captive_portal:
# Here is deep sleep part
#deep_sleep:
# id: deep_sleep_1
# run_duration: 90s # Device wake up and run 60s (enough to pull data and update)
# sleep_duration: 30min # deep sleep for 30m
http_request:
verify_ssl: false
timeout: 13s #changed from 10s to 13s to see if a little more time helps?
watchdog_timeout: 15s
online_image:
- id: dashboard_image
format: BMP
type: BINARY
buffer_size: 50000 #changed from 30000 to 50000 just to see what happens, someone else on community had
url: http://homeassistant.local:10000/epaper-test/0?viewport=800x480&eink=2&invert&format=bmp #change this link to your screenshot link
update_interval: 5min #changed from 90s to 5min, if this works I may add the 300s timer to the link
on_download_finished:
- delay: 100ms #added a delay here, why not?
- component.update: main_display
spi:
clk_pin: GPIO7
mosi_pin: GPIO9
display:
- platform: waveshare_epaper
id: main_display
model: 7.50inv2
cs_pin: GPIO44
dc_pin: GPIO10
reset_pin: GPIO38
busy_pin:
number: GPIO4
inverted: false
update_interval: never
lambda: |-
it.image(0, 0, id(dashboard_image));
It seems to work okay if I set things to 90 second updates, but if I try to slow them down some to save battery life, it fails more often than not. Home Assistant is running on a Yellow with the CM4 with 2 GB of RAM. I have suspected that it may not be enough horsepower to be running Puppet, but I am not sure.
Also yes Puppet launches a new browser session, so it is slow and uses a bit of memory, so you may be asking a bit much. It probably works with the shorter interval because the resources haven’t had time to unload.
Along with what Daryl suggested, I’d replace homeassistant.local with the actual IP address. I have found mDNS to be slow in many cases. I won’t use it anymore.
I checked and I am up to date with my addon. I actually had some difficulty updating in the past, so I am wary of ever updating again.
I used the updated string above and it helped, it works every time now!
I’m not sure if I should be at all concerned about the messages I am getting in my logs now. It seems to be working, but it is giving timeout errors.
[22:01:09.183][D][http_request.arduino:135]: Received response header, name: etag, value:
[22:01:09.192][D][http_request.arduino:135]: Received response header, name: last-modified, value:
[22:01:09.218][D][http_request.arduino:141]: Content-Length: 1152054
[22:01:09.228][D][online_image:175]: Starting download
[22:01:09.243][D][online_image:180]: Allocating BMP decoder
[22:01:09.253][I][online_image:212]: Downloading image (Size: 1152054)
[22:01:18.211][D][online_image:226]: Image fully downloaded, read 1152054 bytes, width/height = 800/480
[22:01:18.213][D][online_image:228]: Total time: 9s
[22:01:18.213][D][http_request:039]: Header with name etag found with value
[22:01:18.228][D][http_request:039]: Header with name last-modified found with value
[22:01:19.555][I][waveshare_epaper:3965]: Power on the display and hat
[22:01:29.765][E][waveshare_epaper:3910]: Timeout while displaying image!
[22:01:40.995][E][waveshare_epaper:3910]: Timeout while displaying image!
If things are good I think I might move to trying to delay these updates. I really need about 4 per day based on the very basic information I am trying to display.
I was several versions of Puppet behind I believe, so I am up to date now at v.2.4.3.
I used the addon’s built in UI to generate my current URL, substituting the IP address of Home Assistant manually. I also manually inserted the wait parameter and bumped it up to 20000. I don’t think it is doing anything to help me though.
Is there any documentation I could look at for wait? I can’t seem to find it on the ESP website.
online_image:
- id: dashboard_image
format: BMP
type: BINARY
buffer_size: 50000 #changed from 30000 to 50000 just to see what happens, someone else on community had
url: http://10.0.0.44:10000/epaper-test?viewport=800x480&colors=000000%2CFFFFFF&palette_colors=191E21%2CE8E8E8%2C2157BA%2C125F20%2CB21318%2CEFDE44&format=bmp&theme=Graphite+E-ink+Light&wait=20000&invert&next=120 #&wait=10000 #&lang=en #change this link to your screenshot link
update_interval: 2min #changed from 15min to 30s
on_download_finished:
- delay: 100ms #added a delay here, why not?
- component.update: main_display
Here are my current error logs. It now is taking about 13 seconds to download the image (I think?) but failing more often than not.
[16:24:52.114][I][online_image:109]: Updating image http://10.0.0.44:10000/epaper-test?viewport=800x480&colors=000000%2CFFFFFF&palette_colors=191E21%2CE8E8E8%2C2157BA%2C125F20%2CB21318%2CEFDE44&format=bmp&theme=Graphite+E-ink+Light&wait=20000&invert
[16:25:05.152][W][http_request.arduino:116]: HTTP Request failed; URL: http://10.0.0.44:10000/epaper-test?viewport=800x480&colors=000000%2CFFFFFF&palette_colors=191E21%2CE8E8E8%2C2157BA%2C125F20%2CB21318%2CEFDE44&format=bmp&theme=Graphite+E-ink+Light&wait=20000&invert; Error: read Timeout
[16:25:05.155][E][component:362]: http_request set Error flag: unspecified
[16:25:05.161][E][online_image:154]: Download failed.
[16:25:05.163][W][component:490]: online_image took a long time for an operation (13048 ms)
[16:25:05.167][W][component:493]: Components should block for at most 30 ms
[16:25:05.171][W][component:490]: api took a long time for an operation (13057 ms)
[16:25:05.175][W][component:493]: Components should block for at most 30 ms
[16:25:06.160][E][component:379]: http_request cleared Error flag
[16:26:52.115][I][online_image:109]: Updating image http://10.0.0.44:10000/epaper-test?viewport=800x480&colors=000000%2CFFFFFF&palette_colors=191E21%2CE8E8E8%2C2157BA%2C125F20%2CB21318%2CEFDE44&format=bmp&theme=Graphite+E-ink+Light&wait=20000&invert
[16:27:05.132][W][http_request.arduino:116]: HTTP Request failed; URL: http://10.0.0.44:10000/epaper-test?viewport=800x480&colors=000000%2CFFFFFF&palette_colors=191E21%2CE8E8E8%2C2157BA%2C125F20%2CB21318%2CEFDE44&format=bmp&theme=Graphite+E-ink+Light&wait=20000&invert; Error: read Timeout
[16:27:05.137][E][component:362]: http_request set Error flag: unspecified
[16:27:05.149][E][online_image:154]: Download failed.
[16:27:06.146][E][component:379]: http_request cleared Error flag