diff options
author | Hender | 2023-04-12 21:04:16 -0400 |
---|---|---|
committer | GitHub | 2023-04-12 21:04:16 -0400 |
commit | e8bbd0f7708cae971b21145accc0896f2b0f180a (patch) | |
tree | d0be281700f6b1960080810a7e479e8835ffd6cb /README.md | |
parent | b18df2e6f93d8922c6dcf818f98b9de983ca661b (diff) | |
download | bash-cec-e8bbd0f7708cae971b21145accc0896f2b0f180a.tar.gz bash-cec-e8bbd0f7708cae971b21145accc0896f2b0f180a.tar.bz2 bash-cec-e8bbd0f7708cae971b21145accc0896f2b0f180a.zip |
Update README.md
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 31 |
1 files changed, 9 insertions, 22 deletions
@@ -35,54 +35,41 @@ You should see some diagnostic messages. Press numeric keys (as they are most li something something **key pressed: 8** something something If you see this kind of messages, then this should work for you. -If not, make sure you've got CEC enabled on your TV (see this WIKI 162 for more info). +If not, make sure you've got CEC enabled on your TV. For my TV, pressing the Source button a couple of times helped (so it kind-of flips trough all the sources and circles back to the Raspberry Pi, detects CEC and connects to it). So, on to the script / installation: -Create the file cecremote.sh and mark it as executable; using terminal: +Download the file cecremote.sh and mark it as executable; using terminal: -´touch cecremote.sh´ ´chmod +x cecremote.sh´ -Finally, save it; using nano in terminal: -press "Ctrl+X" to close the file, then "Y" to confirm saving, then "Enter" to save the file under the right file name - Try executing it, using terminal: `cec-client | ./cecremote.sh` At this point it should be working. + Point the TV Remote at the TV, press up/down/left/right and check if the mouse pointer is moving. Press 9 44 2 8 7777 0 88 7 and it should write "whats up". The script doesn't output anything, except when it encounters a button press that it doesn't recognize, or it doesn't have a function set up for that button yet (play button being one of them). -If you want it to output all the messages it receives, find the line and uncomment it by deleting the # : #echo $keyline --- debugAllLines +If you want it to output all the messages it receives, find the line and uncomment it by deleting the # : +#echo $keyline --- debugAllLines So, if everything works, exit the script in terminal: Press Ctrl+C -Run at startup: -If you want to start this script every time the Raspberry starts, create a new file called cecremotestart.sh and mark it as executable; using terminal: - -`touch cecremotestart.sh` -`chmod +x cecremotestart.sh` - -Then open it; using terminal: +## Run at startup: -`nano cecremotestart.sh` +If you want to start this script every time the Raspberry starts, download the file called cecremotestart.sh and mark it as executable; using terminal: -Copy - paste this in the file: - -#!/bin/bash -cec-client | /home/raspberry/cecremote.sh #<-- change this according to your username / path to the script - -Finally, save it; using nano in terminal: -press "Ctrl+X" to close the file, then "Y" to confirm saving, then "Enter" to save the file under the right file name +`chmod +x cecremotestart.sh` Then add this in the Startup Programs (Menu - System - Control Center - Startup Programs; Add; Give it a name, and enter the path (or press Browse) of the script in the filesystem). Restart, try, report :slightly_smiling: # Modification: + If you want, you can edit the script to change or add the commands executed on certain button presses. You can detect the additional buttons that CEC on your TV supports. Kill the running cec-client, run the cec-client in the terminal, and watch for the output while you're pressing all the keys on your TV Remote; using terminal: |