HomePlate: E-Ink dashboard with Inkplate 10

It could be related to debugging? How might one disable that?

Oh, that’s the time from the RTC the image was last updated. Its currently not configurable, but I agree it should be.

It should be as simple as adding a new configuration option/define and wrapping this like in it: https://github.com/lanrat/homeplate/blob/cc3ad4f37eb597dde62885a59e1d293b8a1dce9d/src/image.cpp#L57

Ah hah. Appreciate the explanation, given that I have zero programming knowledge, that’s probably beyond me. Thanks anyway!

Well, you are in luck, I had some time today and added the option to hide the last refresh time: added option to hide last refresh time · lanrat/homeplate@4d50ca9 · GitHub

Just set DISPLAY_LAST_UPDATE_TIME to false in your config.h.

2 Likes

Amazing, that fixed it! Thanks a bunch for doing that :slight_smile:

Hi everyone,

I’ve been trying to get this going. I setup a new PiZero 2 running docker. I get this error when it starts


> [email protected] start
> node index.js
Starting browser...
Visiting 'http://192.168.0.167:8123' to login...
Adding authentication entry to browser's local storage...
/app/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:265
                throw new Error('Execution context was destroyed, most likely because of a navigation.');
                      ^
Error: Execution context was destroyed, most likely because of a navigation.
    at rewriteError (/app/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:265:23)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async ExecutionContext._evaluateInternal (/app/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:219:60)
    at async ExecutionContext.evaluate (/app/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:110:16)
    at async /app/index.js:52:3
npm notice 
npm notice New major version of npm available! 8.19.4 -> 10.2.5
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.2.5>
npm notice Run `npm install -g [email protected]` to update!
npm notice 

Any Ideas?

I have got a bit further, i’ve got it running taking screenshots but it doesn’t seem to be logging in

I have added the long live access token. Any ideas?

I’ve noticed everyone has https:// at the start of there home assistant. mines http://

does that make a differance

You might need to increase all the timeouts and page load times if running on a Pi zero. By today’s standards, its a pretty underpowered device, especially when running modern chrome on a JS rich website like HASS.

Hi! I am trying to get this all set up on the computer while my inkplate comes. I was able to get MQTT set up and talking to Home Assistant, connects fine. I also got the hass-screenshot docker image set up. I am getting an error when it runs though. Do I need to make a folder somewhere to put the screenshots? Here’s the error message. Thanks for any help!

1. Node.js v17.9.1

2. > [email protected] start
3. > node index.js

4. [12/29/2023, 10:28:17 AM] Operating in realtime mode with cache.
5. [12/29/2023, 10:28:17 AM] Attempting to connect to mqtt://192.168.*.**:1883
6. [12/29/2023, 10:28:18 AM] Starting browser...
7. [12/29/2023, 10:28:18 AM] MQTT Connected!
8. [12/29/2023, 10:28:20 AM] Visiting '192.168.*.**:8123' to login...
9. /app/node_modules/puppeteer/lib/cjs/puppeteer/common/Connection.js:226
10.                 error: new Errors_js_1.ProtocolError(),
11.                        ^

12. ProtocolError: Protocol error (Page.navigate): Cannot navigate to invalid URL
13.     at /app/node_modules/puppeteer/lib/cjs/puppeteer/common/Connection.js:226:24
14.     at new Promise (<anonymous>)
15.     at CDPSession.send (/app/node_modules/puppeteer/lib/cjs/puppeteer/common/Connection.js:222:16)
16.     at navigate (/app/node_modules/puppeteer/lib/cjs/puppeteer/common/FrameManager.js:148:47)
17.     at FrameManager.navigateFrame (/app/node_modules/puppeteer/lib/cjs/puppeteer/common/FrameManager.js:131:13)
18.     at Frame.goto (/app/node_modules/puppeteer/lib/cjs/puppeteer/common/FrameManager.js:500:41)
19.     at Page.goto (/app/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:1167:53)
20.     at /app/index.js:63:14
21.     at processTicksAndRejections (node:internal/process/task_queues:96:5) {
22.   originalMessage: 'Cannot navigate to invalid URL'
23. }

And my docker compose file…

version: '3.7'

services:
  hass-screenshot:
    container_name: hass-screenshot
    image: lanrat/hass-screenshot
    deploy:
    environment:
      - TZ=America/Chicago
      - HA_BASE_URL=192.168.*.**:8123
      - HA_ACCESS_TOKEN=reallylongtoken
      - LANGUAGE=en
      - MQTT_SERVER=192.168.*.**:1883
      - REAL_TIME=true
      - RENDERING_DELAY=2
      - COLOR_MODE=GrayScale
        # image 1
      - HA_SCREENSHOT_URL=/lovelace-infra/hud1?kiosk
      - RENDERING_SCREEN_HEIGHT=825
      - RENDERING_SCREEN_WIDTH=1200
      - GRAYSCALE_DEPTH=3
        # image 2
      - HA_SCREENSHOT_URL_2=/lovelace-infra/hud2?kiosk
      - RENDERING_SCREEN_HEIGHT_2=800
      - RENDERING_SCREEN_WIDTH_2=600
      - GRAYSCALE_DEPTH_2=4
        # image 3
      - HA_SCREENSHOT_URL_3=/lovelace-infra/hud3?kiosk
      - RENDERING_SCREEN_HEIGHT_3=800
      - RENDERING_SCREEN_WIDTH_3=600
      - GRAYSCALE_DEPTH_3=4
    restart: unless-stopped
    ports:
      - 5001:5000
    healthcheck:
      test: "wget --no-verbose --tries=1 --spider http://localhost:5000/ || exit 1"
      interval: 60s
      timeout: 5s
      retries: 3
      start_period: 60s

HA_BASE_URL needs to be a URL. It must start with http:// or https://.

1 Like

Awesome, thanks for the reply. It’s working more now, but timeouts on trying to take a screenshot. I tried RENDERING_DELAY up to 4 and a RENDERING_TIMEOUT up to 30000 with no success. I’m pretty sure it has something to do with the HA_SCREENSHOT_URL. If I wanted to capture http://192.168.x.xx:8123/dashboard-weather2/0 (real browser URL) how would I format the HA_SCREENSHOT_URL parameter? I have it like

- HA_SCREENSHOT_URL=/dashboard-weather2/0

now. Here’s the log from hass-screenshot when I tried to capture just the default view. I can get to the page with the serverip:5000 (in my case it’s 5001) but there’s no image when I click one of the three links.

Oh, and I also tried twice to make new Home Assistant Long-lived access tokens with no change. Do I need to restart HA when making a new token?

> [email protected] start
> node index.js

[12/29/2023, 3:51:09 PM] Operating in realtime mode with cache.
[12/29/2023, 3:51:09 PM] Attempting to connect to mqtt://192.168.x.xx:1883
[12/29/2023, 3:51:09 PM] Starting browser...
[12/29/2023, 3:51:09 PM] MQTT Connected!
[12/29/2023, 3:51:14 PM] Visiting 'http://192.168.x.xx:8123' to login...
[12/29/2023, 3:51:18 PM] Adding authentication entry to browser's local storage...
[12/29/2023, 3:51:20 PM] Starting first render...
[12/29/2023, 3:51:20 PM] Server is running at 5000
[12/29/2023, 3:51:20 PM] Rendering http://192.168.x.xx:8123/lovelace/default_view to image...
[12/29/2023, 3:51:31 PM] Failed to render http://192.168.x.xx:8123/lovelace/default_view
[12/29/2023, 3:51:31 PM] Error: TimeoutError: Navigation timeout of 10000 ms exceeded
[12/29/2023, 3:51:31 PM] Rendering http://192.168.x.xx:8123/lovelace/default_view to image...
[12/29/2023, 3:51:41 PM] Failed to render http://192.168.x.xx:8123/lovelace/default_view
[12/29/2023, 3:51:41 PM] Error: TimeoutError: Navigation timeout of 10000 ms exceeded
[12/29/2023, 3:51:41 PM] Rendering http://192.168.x.xx:8123/lovelace/default_view to image...
[12/29/2023, 3:51:52 PM] Converting rendered screenshot of http://192.168.x.xx:8123/lovelace/default_view to grayscale png...
[12/29/2023, 3:51:53 PM] Finished http://192.168.x.xx:8123/lovelace/default_view
[12/29/2023, 3:51:57 PM] recieved request from ::ffff:127.0.0.1 for /

Are you using my screenshot code or sibl’s?

Your config looks OK (for the information given).

I’m using yours. Dang. Hoping it would be something easy I missed. Any other ideas that you can think of I can try would be helpful. Been trying quite a few things with no luck.