Direkt zum Hauptbereich

Posts

Es werden Posts vom 2021 angezeigt.
 I found some old HID IR Remote - https://www.delock.com/produkte/S_62442/merkmale.html and combined the usb dongle with a learnable universal control. It was straight forward to use left, right, up, down, enter, back and escape which makes most of the kodi functions accessable, but I missed access to context menues - things you access hitting "i" and "o" on keyboard. On the other hand, the functions keys which are discreatly mapped to IR-Codes on the delock remote. The solution is a custom key map file that maps function keys to kodi functions - https://kodi.wiki/view/List_of_keynames   An example is https://github.com/xbmc/xbmc/blob/master/system/keymaps/keyboard.xml To find out what remote key codes which keyboard key the cli tool "evtests" was great help. Result is ~/.kodi/userdata/keymaps/keymaps.xml: <? xml version = "1.0" encoding = "UTF-8" ?> < keymap > < global > < keyboard > < F

Howto diff pdfs on cli - on windows

Pixel Diff  Get ImageMagick cli tool Windows: choco install imagemagick Convert every pdf page to a rastrized image, use different directories magick convert inputA.pdf output%d.png magick convert inputB.pdf output%d.png   Use winmerge to compare the output   Text Diff Get pdftotxt http://www.xpdfreader.com/download.html create inputA.txt file xpdf-tools-win-4.03\bin64\pdftotext.exe .\inputA.pdf create inputB.txt file xpdf-tools-win-4.03\bin64\pdftotext.exe .\inputB.pdf Use winmerge to compare the output

Wait till hdmi is connected before starting kodi... and poll tvheadend for activity before shutdown

What?  If you run tvheadend and kodi on one device you want to wait to start kodi until hdmi is conected, Why? kodi has bugs that cause issues when started before connected to hdmi Sometimes it crashes Sometimes it stops to render text in menu How to work arround? Wait for HDMI and timeout if no recording is upcomming #!/bin/bash # This scripts wait <TIMEOUTINSECONDS> till hdmi connection got established or shutdown if no tvheadend recording is running, upcomming or some stream is consumed, served by tvheaden # Howto https://debianisttoll.blogspot.com/2021/07/wait-till-hdmi-is-connected-before.html # Source https://gist.githubusercontent.com/stesee/9ebb11cc2db6a58e6b42afb2d74e7e7b/raw/7327e42950c449c1153ebf546f60ee1d8e3d0d0d/waitTillHdmiConnected.sh # install stuff before using this script #   sudo apt install libxml-xpath-perl curl # setup systemconfiguration #   allow current user to execute shutdown and waskup - add this line to /etc/sudoers - replace "username" with
Kodi keeps crashing when it is started without connected displays. Sometimes I want to startup my kodi setup for some other reasen and start using kodi later.... then kodi was already closed with some crash log file... :( This script works arround by waiting to start kodi until some hdmi port is connected (modify the grep query to adapt to some other port name). #!/bin/bash # Some programs have issues when run without connected display. E.g. Kodi likes to crash when started without any display connected on my system. # This script starts after some hdmi port is connected. # Depends on xrandr. WARNINGTIMEOUTINSECONDS=840 TIMEOUTINSECONDS=900 POLLINGDURATIONINSECONDS=5 LOGFILE= " $HOME /waitTillHdmiConnected.log" #set start conditions SECONDS=0 triggerTimeoutActions (){      echo   "Shuting down"  | tee -a  " $LOGFILE "      echo   $(date  &&   echo  "shutting realy down")  | tee -a  " $LOGFILE "      # e.g. shutdown the system   

Send to sleep and wake up - Tvheadend / Kodi Setup

Shutdown and timed startup automation saves your setup from running 24/7. Configure Kodi         setwakeup.sh #!/bin/sh #$1 is the first argument to the script. It is the time in seconds since 1970 #this is defined in mythtv-setup with the time_t argument #this clears your alarm. echo  0 > /sys/class/rtc/rtc0/wakealarm       #this writes your alarm echo   $1  > /sys/class/rtc/rtc0/wakealarm      set script to be executable sudo chmod   +x /usr/bin/setwakeup.sh Reference https://forum.kodi.tv/showthread.php?tid=155128