sibbl / hass-lovelace-kindle-screensaver

This tool generates a png from a Home Assistant Lovelace view, which can be displayed on a Kindle device which has the Online Screensaver plugin installed.
MIT License
311 stars 71 forks source link

Error and questions connecting with Hassio Addon #100

Closed ultraloveninja closed 6 months ago

ultraloveninja commented 6 months ago

I'm kinda stumped on how to proceed to get this to connect to my Kindle. I've gone through all the steps on jailbreaking my kindle, setting KUAL and USBnet. I added the Hassio Addon for Lovelace Kindle Screensaver to my Home Assistant setup, but now I'm not sure what I need to do next. The one thing I've noticed is when I run the Hassio Addon in HA, I do get an error:

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
[11:52:19] INFO: Starting npm server...
[11:52:19] INFO: Using base_url: https://homeassistant.local:8123

> hass-lovelace-kindle-screensaver@1.0.5 start
> node index.js

Starting browser...
Visiting 'https://homeassistant.local:8123' to login...
/app/node_modules/puppeteer/lib/cjs/puppeteer/common/FrameManager.js:155
                    ? new Error(`${response.errorText} at ${url}`)
                      ^

Error: net::ERR_SSL_PROTOCOL_ERROR at https://homeassistant.local:8123
    at navigate (/app/node_modules/puppeteer/lib/cjs/puppeteer/common/FrameManager.js:155:23)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async FrameManager.navigateFrame (/app/node_modules/puppeteer/lib/cjs/puppeteer/common/FrameManager.js:130:21)
    at async Frame.goto (/app/node_modules/puppeteer/lib/cjs/puppeteer/common/FrameManager.js:500:16)
    at async Page.goto (/app/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:1167:16)
    at async /app/index.js:41:3

Node.js v18.18.2
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

Not really sure if I have setup something incorrectly, but that seems to be crashing as well.

Let me know if there is anything else that I'm getting confused on or if I am missing something.

ultraloveninja commented 6 months ago

Ok, so after some digging, turns out I needed to update the URL from https:// to http:// and that got rid of the error. But now I'm not sure how to get it over to the kindle. I think I see the URL for the image, just not sure where to plug that into on the kindle side of things.

sibbl commented 6 months ago

Hi, if I understand you correctly, the HA addon is working and generating images already.

The next step on your Kindle 4 would be do let it point to your HA addon. You can probably follow step 7 in the Kindle extension's readme: https://github.com/sibbl/hass-lovelace-kindle-4

Set the variables inside this repository's extensions/homeassistant/config.sh.

Specifically IMAGE_URI should point to the URL of the HA addon where the image can be accessed. The rest could probably stay to the default values.

I'll take a note that I'm going to update that repository's readme to describe the setup with the HA addon a bit more precisely. At the time when I wrote this, the HA addon didn't exist yet.

ultraloveninja commented 6 months ago

Yep, after reading into it a bit more I was able to update the config on the HA addon and I'm able to get an image generated. So the HA part is all good. The issue I'm having now is getting it over to my Kindle. I'm using a Kindle3 non-touch WiFi and I'm having an uphill battle with SSH (I can connect to it, but I'm hung up on the root password part) which is not part of this. I've been trying to use the Online Screensaver extension, but it keeps erring out, so I'm tempted to try and fork that and see if I can't try to conjure up something on my own.