sibbl / hass-kindle-screensaver Goto Github PK
View Code? Open in Web Editor NEWThis server generates a png with content fetched from Home Assistant, which can be displayed on a Kindle device which has the Online Screensaver plugin installed.
This server generates a png with content fetched from Home Assistant, which can be displayed on a Kindle device which has the Online Screensaver plugin installed.
There's already a Docker container but ideally, this application should be easy to integrate into any Hass.io instance.
The HA connection details and access token should be automatically requested from the supervisor.
However, it might be necessary to improve some performance as well as it might be possible that Puppeteer might not run very well on supported Hass.io devices like the Raspberry Pi.
Currently unfortunately the °C
unit is hard coded. This should be read from the HA entity and displayed accordingly.
A new config option KINDLE_MODEL
should be introduced, which should allow various values like kindle4
, k4
, pw
or paperwhite
.
Depending on this value, the screen size should be set to the correct resolution.
First off, this is awesome. Thanks so much for writing it, publishing it, and letting others use it.
I built a lovelace dashboard that included the OpenWeatherMap integration. I was putting my thermostats and the weather forecast onto the dashboard that would go to my kindle. I added the MOMENT_TIMEZONE
environment variable (set to EST5EDT
for me). But I was still getting UTC/London time. To help me troubleshoot, and to help me know when the image was last captured, I added a time_date card to the lovelace dashboard. I was seeing the correct local time (e.g., 15:32
) in the time/date card, but I was seeing UTC/London time in the openweather card. The forecast was right (i.e., it's forecasting for my city), it's just that the times were wrong (where you see "9:00 PM" and cloudy, my image would show of "9:00 PM"). The attached image shows what it looks like, except that it's correct. (Still haven't gotten around to beautifying it...)
I needed to add TZ=EST5EDT
to my docker-compose.yaml
file when I deployed it. After adding that environment variable, the images come as you see them.
Interestingly enough, if I visit the URL for the dashboard using a web browser on my laptop, all the dates and times came out correctly. It was only the hass-kindle-screensaver
that was rendering the forecast times incorrectly.
So you might want to update your README file to mention the TZ variable. I suspect others will run into something similar.
The screensaver worked fine for me for a long time, but it stopped after I updated Home Assistant and now I get the following error:
> [email protected] start /app
> node app.js
Node app is running at localhost:5000
Failed to retrieve content: TypeError: Cannot read property 'map' of undefined
TypeError: Cannot read property 'state' of undefined
at Cover.render (/app/views/cover.jsx:34:64)
at processChild (/app/node_modules/react-dom/cjs/react-dom-server.node.development.js:3134:18)
at resolve (/app/node_modules/react-dom/cjs/react-dom-server.node.development.js:2960:5)
at ReactDOMServerRenderer.render (/app/node_modules/react-dom/cjs/react-dom-server.node.development.js:3435:22)
at ReactDOMServerRenderer.read (/app/node_modules/react-dom/cjs/react-dom-server.node.development.js:3373:29)
at Object.renderToStaticMarkup (/app/node_modules/react-dom/cjs/react-dom-server.node.development.js:4004:27)
at View.renderFile [as engine] (/app/node_modules/express-react-views/index.js:69:32)
at View.render (/app/node_modules/express/lib/view.js:135:8)
at tryRender (/app/node_modules/express/lib/application.js:640:10)
at Function.render (/app/node_modules/express/lib/application.js:592:3)
Error: ENOENT: no such file or directory, stat '/app/cover.png'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.