Kindle als Fhem-Display

Begonnen von alexmetz, 25 März 2014, 22:59:15

Vorheriges Thema - Nächstes Thema

StefanStrobel

Hallo,

anbei nochmal alle Files und die Konfiguration, die bei mir auf einem Kindle Gen. 5 läuft.

Gruss
   Stefan

Wzut

Ich habe diese Woche einen PW3 geschenkt bekommen und wollte nun auch endlich dieses Projekt mal umsetzen.
Leider hat der Kindle die FW 5.12.3 drauf und da schaut es mit den ganzen bestehenden Anleitungen zum Thema Jailbreak eher schlecht aus,
zumindest die simple Variante mit einfach FW File ins root Dir zu kopieren :(
Was ich bis jetzt gefunden habe zum Thema  > 5.12.x ist :
Kindle aufmachen , USB-TTL Konverter mit max. 1,8V anlöten und via serieller Konsole rooten. Den Softwareteil traue ich mir noch zu, aber vor dem öffnen und löten graut mir. Wenn sich das also jemand komplett zutraut bitte Kontakt via PM ( ich zahle natürlich für die Arbeit und den Versand ! )
Maintainer der Module: MAX, MPD, UbiquitiMP, UbiquitiOut, SIP, BEOK, readingsWatcher

bastelfeak

Hallo,
ich habe seit dem einem umfassendem Update folgende Meldungen im LOG:

Recompressing IDAT chunks in /tmp/status.png to /opt/fhem/www/images/kindlestatus.png
   Total length of data found in critical chunks            =     36852
   Best pngcrush method        =   4 (ws 15 fm 0 zl 9 zs 1) =     16537
CPU time decode 0.022066, encode 0.246688, other 0.002830, total 0.276390 sec


Das füllt mir das gesamte Logfile. Kann jemand helfen?

Zweites Phänomen: Das Ausgangs-svg hat noch Icons drin, das Ziel-png leider nicht mehr.

Hat dafür auch jemand eine Lösung?


andi11

Also zum Thema "Kindle4 aktualisiert plötzlich nicht mehr"
Laut FHEM ist die letzte Abfrage 1.11 8:42 (Kann sein das die Uhr im Kindle leicht falsch geht,bzw Sommer/Winterzeit Problem hat)
Scheint als schläft das Teil ein, und es passiert garnix mehr. Wenn ich den Kindle durch druck auf Power On aufwecke, ist er noch an, aber das WLAN ist aus.
Über Nacht ist der Kindle bei uns für ca 5-6h ohne Strom.
Hat jemand eine Idee?
Log:
Fri Nov 1 09:36:17 GMT+02:02 2019: woke up again, switch wireless back on
Fri Nov 1 09:36:18 GMT+02:02 2019: killget called, ps:
Fri Nov 1 09:36:18 GMT+02:02 2019: root 3611 1 0 06:45 ? 00:00:03 /bin/sh /mnt/base-us/extensions/onlinescreensaver/bin/scheduler.sh root 13101 1 0 09:36 ? 00:00:00 sh -c sleep 10; /mnt/us/extensions/onlinescreensaver/bin/killget.sh root 13224 13101 0 09:36 ? 00:00:00 /bin/sh /mnt/us/extensions/onlinescreensaver/bin/killget.sh root 13248 13224 0 09:36 ? 00:00:00 /bin/sh /mnt/us/extensions/onlinescreensaver/bin/killget.sh root 13250 13248 0 09:36 ? 00:00:00 grep online
Fri Nov 1 09:36:18 GMT+02:02 2019: root 13311 13307 0 09:36 ? 00:00:00 grep wget
Fri Nov 1 09:36:18 GMT+02:02 2019: no need for kill
Fri Nov 1 09:36:54 GMT+02:02 2019: wget http://192.168.10.28:8090/fhem/kindle_wohnzimmer/status1.png?KindleBatt=97
Fri Nov 1 09:36:54 GMT+02:02 2019: Screen saver image file updated
Fri Nov 1 09:36:54 GMT+02:02 2019: Updating image on screen
Fri Nov 1 09:36:54 GMT+02:02 2019: Schedule 05:30-23:00=5 used, next update in 5 minutes
Fri Nov 1 09:36:54 GMT+02:02 2019: Next update in 5 minutes
Fri Nov 1 09:36:55 GMT+02:02 2019: wait_for called with 300, now=1572593814, Powerd state: Screen Saver, defer_suspend:0, Remaining time in this state: Unknown, Battery Level: 97% Battery logging: On
Fri Nov 1 09:36:57 GMT+02:02 2019: go to RTC sleep for 300 seconds, wlan off
Fri Nov 1 09:42:03 GMT+02:02 2019: woke up again, switch wireless back on
Fri Nov 1 09:42:05 GMT+02:02 2019: killget called, ps:
Fri Nov 1 09:42:05 GMT+02:02 2019: root 3611 1 0 06:50 ? 00:00:03 /bin/sh /mnt/base-us/extensions/onlinescreensaver/bin/scheduler.sh root 13593 1 0 09:41 ? 00:00:00 sh -c sleep 10; /mnt/us/extensions/onlinescreensaver/bin/killget.sh root 13752 3611 0 09:42 ? 00:00:00 /bin/sh /mnt/base-us/extensions/onlinescreensaver/bin/scheduler.sh root 13937 13593 0 09:42 ? 00:00:00 /bin/sh /mnt/us/extensions/onlinescreensaver/bin/killget.sh root 13940 13937 0 09:42 ? 00:00:00 /bin/sh /mnt/us/extensions/onlinescreensaver/bin/killget.sh
Fri Nov 1 09:42:05 GMT+02:02 2019:
Fri Nov 1 09:42:05 GMT+02:02 2019: no need for kill
Fri Nov 1 09:42:39 GMT+02:02 2019: wget http://192.168.10.28:8090/fhem/kindle_wohnzimmer/status1.png?KindleBatt=96
Fri Nov 1 09:42:44 GMT+02:02 2019: Screen saver image file updated
Fri Nov 1 09:42:44 GMT+02:02 2019: Updating image on screen
Fri Nov 1 09:42:44 GMT+02:02 2019: Schedule 05:30-23:00=5 used, next update in 5 minutes
Fri Nov 1 09:42:44 GMT+02:02 2019: Next update in 5 minutes
Fri Nov 1 09:42:45 GMT+02:02 2019: wait_for called with 300, now=1572594164, Powerd state: Screen Saver, defer_suspend:0, Remaining time in this state: Unknown, Battery Level: 96% Battery logging: On
Fri Nov 1 09:42:47 GMT+02:02 2019: go to RTC sleep for 300 seconds, wlan off
Fri Nov 1 09:42:49 GMT+02:02 2019: killget called, ps:
Fri Nov 1 09:42:49 GMT+02:02 2019: root 3611 1 0 06:50 ? 00:00:03 /bin/sh /mnt/base-us/extensions/onlinescreensaver/bin/scheduler.sh root 14077 1 0 09:42 ? 00:00:00 sh -c sleep 10; /mnt/us/extensions/onlinescreensaver/bin/killget.sh root 14177 3611 0 09:42 ? 00:00:00 /bin/sh /mnt/base-us/extensions/onlinescreensaver/bin/scheduler.sh root 14178 14077 0 09:42 ? 00:00:00 /bin/sh /mnt/us/extensions/onlinescreensaver/bin/killget.sh root 14181 14178 0 09:42 ? 00:00:00 /bin/sh /mnt/us/extensions/onlinescreensaver/bin/killget.sh
Fri Nov 1 09:42:50 GMT+02:02 2019:
Fri Nov 1 09:42:50 GMT+02:02 2019: no need for kill
Fri Nov 1 09:47:53 GMT+02:02 2019: woke up again, switch wireless back on
Sat Nov 2 13:57:14 GMT+02:02 2019: Full two day schedule: 00:00-05:00=30 5:0-5:30=30 05:30-23:00=5 23:00-24:00=20 24:0-29:0=30 29:0-29:30=30 29:30-47:0=5 47:0-48:0=20
Sat Nov 2 13:57:44 GMT+02:02 2019: wget http://192.168.10.28:8090/fhem/kindle_wohnzimmer/status1.png?KindleBatt=91
Sat Nov 2 13:57:45 GMT+02:02 2019: Screen saver image file updated
Sat Nov 2 13:57:45 GMT+02:02 2019: Schedule 05:30-23:00=5 used, next update in 5 minutes
Sat Nov 2 13:57:45 GMT+02:02 2019: Next update in 5 minutes
Sat Nov 2 13:57:46 GMT+02:02 2019: wait_for called with 300, now=1572695865, Powerd state: Active, defer_suspend:0, Remaining time in this state: 561.560790, Battery Level: 91% Battery logging: On


Config:
#############################################################################
### ONLINE-SCREENSAVER CONFIGURATION SETTINGS
#############################################################################

# Interval in MINUTES in which to update the screensaver by default. This
# setting will only be used if no schedule (see below) fits. Note that if the
# update fails, the script is not updating again until INTERVAL minutes have
# passed again. So chose a good compromise between updating often (to make
# sure you always have the latest image) and rarely (to not waste battery).
DEFAULTINTERVAL=30

# Schedule for updating the screensaver. Use checkschedule.sh to check whether
# the format is correctly understood.
#
# The format is a space separated list of settings for different times of day:
#       SCHEDULE="setting1 setting2 setting3 etc"
# where each setting is of the format
#       STARTHOUR:STARTMINUTE-ENDHOUR:ENDMINUTE=INTERVAL
# where
#       STARTHOUR:STARTMINUTE is the time this setting starts taking effect
#       ENDHOUR:ENDMINUTE is the time this setting stops being active
#       INTERVAL is the interval in MINUTES in which to update the screensaver
#
# Time values must be in 24 hour format and not wrap over midnight.
# EXAMPLE: "00:00-06:00=480 06:00-18:00=15 18:00-24:00=30"
#          -> Between midnight and 6am, update every 4 hours
#          -> Between 6am and 6pm (18 o'clock), update every 15 minutes
#          -> Between 6pm and midnight, update every 30 minutes
#
# Use the checkschedule.sh script to verify that the setting is correct and
# which would be the active interval.
SCHEDULE="00:00-05:00=30 05:30-23:00=5 23:00-24:00=20"

# URL of screensaver image. This really must be in the EXACT resolution of
# your Kindle's screen (e.g. 600x800 or 758x1024) and really must be PNG.
#IMAGE_URI="http://enter.the.domain/here/and/the/path/to/the/image.png"
IMAGE_URI="http://192.168.10.28:8090/fhem/kindle_wohnzimmer/status1.png"

# folder that holds the screensavers
SCREENSAVERFOLDER=/mnt/us/linkss/screensavers/

# In which file to store the downloaded image. Make sure this is a valid
# screensaver file. E.g. check the current screensaver folder to see what
# the first filename is, then just use this. THIS FILE WILL BE OVERWRITTEN!
SCREENSAVERFILE=$SCREENSAVERFOLDER/01N.png

# Whether to create log output (1) or not (0).
LOGGING=1

# Where to log to - either /dev/stderr for console output, or an absolute
# file path (beware that this may grow large over time!)
#LOGFILE=/dev/stderr
#LOGFILE=/tmp/onlinescreensaver.log
LOGFILE=/mnt/us/extensions/onlinescreensaver/diags/onlinescreensaver.log

# whether to disable WiFi after the script has finished (if WiFi was off
# when the script started, it will always turn it off)
DISABLE_WIFI=0

# Domain to ping to test network connectivity. Default should work, but in
# case some firewall blocks access, try a popular local website.
TEST_DOMAIN="192.168.10.1"

# How long (in seconds) to wait for an internet connection to be established
# (if you experience frequent timeouts when waking up from sleep, try to
# increase this value)
NETWORK_TIMEOUT=30

#
# show battery level?
BATTDISP=0

#
# sleep extra for 30 seconds to give the kindle time to update his battery status
EXTRASLEEP=1

#
# add Batt level to URI as query string
DO_QUERYSTRING=1

#############################################################################
# Advanced
#############################################################################

# the real-time clock to use (0, 1 or 2)
RTC=1

# the temporary file to download the screensaver image to
TMPFILE=/tmp/tmp.onlinescreensaver.png

andi11

gibts ne Chance den Kindle einmal am Tag o.ä. neu zustarten?

kinghill

#590
Hallo.

Kann mir jemand kurz und bündig erklären, wie eine Bild Datei mit dem Aktuellen Wetter Icon in einem Ordner erstellt wird, und das dann im Kidle Display eingebaut wird. Ich steige da absolut nicht durch.
Möchte nicht die gesamte SVG für das Kindle Display über die 99 My Utils erstellen, sondern nur das Icon für das aktuelle Wetter generieren und das in meine SVG Vorlage einbauen.
Ich nutze momentan Proplanta.

Meine momentane Config:

define kindledisplay FReplacer /opt/fhem/www/images/template1.svg /opt/fhem/www/images/status1.svg 60
setuuid kindledisplay 5dbf11bc-f33f-78d7-dcda-96e5aed95a4cb94d
attr kindledisplay userattr PostCommand Rep01Expr Rep01Regex Rep02Expr Rep02Regex Rep03Expr Rep03Regex Rep04Expr Rep04Regex Rep05Expr Rep05Regex Rep06Expr Rep06Regex Rep07Expr Rep07Regex Rep08Expr Rep08Regex Rep09Expr Rep09Regex Rep14Reading Rep14Regex ReplacementEncode
attr kindledisplay PostCommand convert /opt/fhem/www/images/status1.svg -type GrayScale -depth 8 /opt/fhem/www/images/KindleDisplay.png 2>/dev/null &
attr kindledisplay Rep01Expr sprintf("%.1f", ReadingsVal("Solar","ENERGY_Power","0"))
attr kindledisplay Rep01Regex SNOW
attr kindledisplay Rep02Expr sprintf("%.3f", ReadingsVal("Solar","ENERGY_Total","0"))
attr kindledisplay Rep02Regex SDAY
attr kindledisplay Rep03Expr sprintf("%.1f", ReadingsVal("Aussentemperatur","temperature","0"))
attr kindledisplay Rep03Regex TEM1
attr kindledisplay Rep04Expr sprintf("%.0f", ReadingsVal("Aussentemperatur","humidity","0"))
attr kindledisplay Rep04Regex HUM1
attr kindledisplay Rep05Expr sprintf("%.1f", ReadingsVal("Wohnzimmer.Temp","temperature","0"))
attr kindledisplay Rep05Regex TEM2
attr kindledisplay Rep06Expr sprintf("%.0f", ReadingsVal("Wohnzimmer.Temp","humidity","0"))
attr kindledisplay Rep06Regex HUM2
attr kindledisplay Rep07Expr sprintf("%.1f", ReadingsVal("Schlafzimmer.Temp","temperature","0"))
attr kindledisplay Rep07Regex TEMP3
attr kindledisplay Rep08Expr sprintf("%.0f", ReadingsVal("Schlafzimmer.Temp","humidity","0"))
attr kindledisplay Rep08Regex HUM3
attr kindledisplay Rep09Expr sprintf(ReadingsVal("AgroWeather","fc0_weatherDay","0"))
attr kindledisplay Rep09Regex Wetter
attr kindledisplay Rep14Reading kindledisplay:LastUpdate:never
attr kindledisplay Rep14Regex AKTUALISIERUNG
attr kindledisplay ReplacementEncode 0
attr kindledisplay room KindleDisplay



andi11

ich hab meine aktuelle Config letztens erst gepostet.
https://forum.fhem.de/index.php/topic,21821.msg976351.html#msg976351
Dort hast du Icon für Wetter und zusätzlich Icon für Bodenfrost drin. Alles aus Proplanta.

kinghill

Danke.

Ich verstehe die zuweisung im SVG mit dem Pfad.
Aber wie wird die File /opt/fhem/www/images/plain_weather/flat_black/svg/tagh_imageurl.svg generiert?
Habe die SVG Datein in dem Ordner /opt/fhem/www/images/plain_weather abgelegt.

andi11

tagh_imageurl wird durch REPLACER_Kindle_Wohnzimmer ersetzt
Rep21Regex tagh_imageurl
Rep21Reading Wetter:code

Wetter:code ist aktuell 30
in /opt/fhem/www/images/plain_weather/flat_black/svg/ liegt entsprechend eine 30.svg

Die Icons sind von https://www.deviantart.com/merlinthered/art/plain-weather-icons-157162192

Wobei Wetter Wettermodul ist, nicht proplanta, sorry mein Fehler.



StefanStrobel

Hallo,

da einige aktuelle Perl-Versionen ein Memory-Leak bei der Kompilation von Regexes haben und das bei Regexes, die in einer Schleife aus Variablen verwendet werden zum Problem wird, habe ich das Modul umgebaut.
Wie auch bei HTTPMOD werden die Regexes jetzt bei der ersten Verwendung vorcompiliert und dann compiliert gespeichert, so dass der Speicherverbrauch von Fhem nicht ständig weiter ansteigen kann.

Es wäre schön wenn es ein paar Leute testen könnten bevor ich die neue Version einchecke.

Gruss
    Stefan

andi11

jemand ne Idee wie ich meinen Kindle4 rebooten könnte oder sowas? Der verliert immernoch nach ein paar Tagen die Motivation und WLAN ist dann komplett aus.

StefanStrobel

geht nicht einfach ein shutdown -r in einem cronjob?

Gruß
   Stefan

andi11

danke für den Tipp
hab jetzt in /etc/crontab/root den Eintrag hinzufügt.  Sollte um 2Uhr früh neustarten.
0 2  * * *  shutdown -r now
Und danach noch zur Sicherheit ein
/etc/init.d/cron restart

Mal kucken ob das was bringt.

andi11

Mist, der Kindle4 startet zwar brav regelmäßig neu, aber es ändert auch nix.

Marlen

Zitat von: Billy am 18 Juli 2019, 16:36:21
Gelöst!  :)
So ich antworte mir mal selbst!  --> gelöst durch Änderung meiner KindleDisplay_Vorlage.svg
Ich habe das ganze mal in Anlage dokumentiert, vielleicht hilft es dem Einen oder Anderen! (wiki?)
Gruß Billy
Hallo,

ich habe heute von Jessi auf Buster umgestellt und jetzt auch nur noch schwarze Quadrate in der Anzeige.
Ich hab ein Kindle 5.......
Was kann das sein?

LG
  Marlen