Comments (11)
@aptonline indeed the battery reporting feature was added by a community member only in this repo and only some patching instructions for the onlinescreensaverplugin were documented: https://github.com/sibbl/hass-lovelace-kindle-screensaver#patch-for-kinde-online-screensaver
So yes, this needs some additions in the script.sh of the special adaptation of the plugin for the Kindle 4.
Without having tested it, I think this might already work:
- DOWNLOADRESULT=$(wget -q "$IMAGE_URI" -O $TMPFILE)
+ DOWNLOADRESULT=$(wget -q "$IMAGE_URI?batteryLevel=$CHECKBATTERY&isCharging=$IS_CHARGING" -O $TMPFILE)
Please also update your rendering Docker container as I just added support for the $IS_CHARGING
values which should be 0
and 1
(instead of the previously solely supported Yes
and No
values from a different source).
Maybe you can give it a try and give me some feedback whether this worked for you already? Thanks a lot!
from hass-lovelace-kindle-screensaver.
Sods law it started working after leaving it for the next automated refresh. Thank you for getting back to me though. It is all working now.
from hass-lovelace-kindle-screensaver.
the automation in HA seems to be failing with:
Stopped because an error was encountered at 7 May 2022, 20:10:49 (runtime: 0.02 seconds)
Error rendering data template: UndefinedError: 'dict object' has no attribute 'json
from hass-lovelace-kindle-screensaver.
Thanks I’ll give it try and report back 👍
from hass-lovelace-kindle-screensaver.
Ok so the good news in the battery percentage is working after editing script.sh
and updating the docker container. The charging status however is not updating as expected.
from hass-lovelace-kindle-screensaver.
Oh so an update on the battery percentage. How often should this be updated, on every webhook call or only when there is a battery change? In the docker logs I’m only seeing 4 initial battery updates since I implemented the changes and nothing overnight.
from hass-lovelace-kindle-screensaver.
@aptonline the Kindle device includes its battery percentage into each HTTP request when retrieving the image. These parameters are then forwarded to HA whenever they changed. I might be possible that the device wasn't awake too long and couldn't read the battery percentage from its hardware.
Maybe you can check the on device log whether the battery changes were present there? If so and you say they weren't sent to the image renderer and thus to HA, then we might have a bug somewhere.
from hass-lovelace-kindle-screensaver.
I’ll tweak the setting and she what happens. Also trying @lanrat’s fork to see how they compare.
from hass-lovelace-kindle-screensaver.
I am also having trouble with this. I have it setup and running on a kindle 4. I just cant get Battery updates to work. I have updated the script.sh and can see entries for charging / battery in the logs.
It took me a while to work out I had to add to add a new ENV Variable to my docker. But now I get the Battery %.
What I am unclear on is how to change the....
"Please also update your rendering Docker container as I just added support for the $IS_CHARGING values which should be 0 and 1 (instead of the previously solely supported Yes and No values from a different source)."
I am sorry I don't understand where I need to change this.
Could you please point me in the right direction.
from hass-lovelace-kindle-screensaver.
HI @SurfingSpider,
the comment you quoted does not require any further action if you've just pulled your docker container. It was just a hint that I've changed something in the Docker container to support this line, so the Docker container had to be updated if created before my comment.
"Please also update your rendering Docker container as I just added support for the $IS_CHARGING values which should be 0 and 1 (instead of the previously solely supported Yes and No values from a different source)."
So only the change in the script.sh
is necessary. But keep in mind that it's untested, so I'd appreciate any feedback. If it's working, I can add this line to the main repository so this issue can be closed. I couldn't find the time to test this yet, especially since my Kindle is plugged in all the time.
from hass-lovelace-kindle-screensaver.
Thanks for the confirmation! I've added the diff mentioned above to the README of this plugin, so we have both the onlinescreensaver and the custom Kindle 4 extension covered.
from hass-lovelace-kindle-screensaver.
Related Issues (20)
- Error and questions connecting with Hassio Addon HOT 3
- failed to start browser in docker HOT 8
- Feature Request: Multiple Dashboards/Instances HOT 1
- docker failed to start HOT 1
- HA OS 32bit not supported? HOT 9
- Timeout Errors HOT 2
- Feature Request: .monochrome and .crop would be awesome!
- Feature request: output to jpg file format HOT 8
- Multiple request array doesnt appear to accept configuration HOT 13
- Error: Command failed: convert: unrecognized dither method `-background' HOT 8
- Feature request - Stop container exiting after error HOT 2
- How to select which theme to take? HOT 2
- Feature Check - ARM Builds HOT 2
- Extension extremely unstable HOT 5
- Failed to render TimeoutError: Navigation timeout of 60000 ms exceeded HOT 6
- Brightness difference between HA addon and standalone docker
- Add healthcheck endpoint at /health
- Add Support for Bitmap-Output HOT 2
- Failed to get TZ variables in container HOT 1
- "Loading data" after first image generation HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hass-lovelace-kindle-screensaver.