Guten Abend Raspberry Pi Forum,
ich habe ein Problem. Ich möchte das wenn mein Raspberry Pi mein iPhone erkennt meinen Fernseher einschaltet wird, bzw. wenn mein iPhone außer Reichwiete ist ausschaltet wird.
Dazu installierte ich libCEC nach folgender Anleitung um den An-/Aus- Befehl in das Script einzufügen. Nur irgendwie funktioniert das nicht.. =( Ich bitte um Hilfe!
Danke im Vorraus.
Ein paar Daten:
-Raspberry Pi B Verison
-LG Fehrnseher CEC möglich (wenn Pi angeht geht der TV mit an)
-HDMI-Kabel CEC fähig
-Raspian
sudo apt-get update;
sudo apt-get install gcc;
sudo apt-get install autoconf;
sudo apt-get install libtool;
sudo apt-get install pkg-config;
sudo apt-get install libselinux1-dev;
sudo apt-get install liblockdev1-dev;
sudo apt-get install gawk;
sudo apt-get install g++;
sudo apt-get install c++;
sudo apt-get install libgudev-1.0-dev;
sudo apt-get install libudev-dev;
mkdir -p $HOME/distr/libcec;
wget -P $HOME/distr/libcec https://github.com/Pulse-Eight/libcec/archive/master.zip;
unzip $HOME/distr/libcec/master.zip -d $HOME/distr/libcec/;
cd $HOME/distr/libcec/libcec-master;
./bootstrap;
./configure --with-rpi-include-path=/opt/vc/include --with-rpi-lib-path=/opt/vc/lib --enable-rpi;
make;
sudo make install;
sudo apt-get install cec-utils;
[code]Quelle:
http://raspberrypi.stackexchange.com/questions/7054/cec-wake-up-command
Alles anzeigen
_________________________________________________________________________________
Soweit hat die installation auch gut funtioniert nur beim ausführen des Befehls zum Ausschalten des Fernsehers bekam ich folgende Fehlermeldung:
pi@raspberrypi ~ $ echo "standby 0" | cec-client -s
libcec.so.2: cannot open shared object file: No such file or directory
Cannot load libcec.so
Dann hab ich ein bisschen herum gesucht und auch eine Lösung dafür gefunden:
libcec, once built on my Raspberry Pi had "installed" into the following folders
/usr/local/bin
/usr/local/lib
I then noticed that the following folders existed
/usr/bin
/usr/lib
so I just created a hard link(shortcut) to the libcec.so.2.0.1 using the following command
ln /usr/local/lib/libcec.so.2.0.1 /usr/lib/libcec.so.
Alles anzeigen
So nun zu meinem Problem nachdem ich jetzt den Befehl eingebe:
Kommt diese Ausgabe:
pi@raspberrypi ~ $ echo "standby 0" | cec-client -s
opening a connection to the CEC adapter...
DEBUG: [ 99] unregistering all CEC clients
DEBUG: [ 103] Broadcast (F): osd name set to 'Broadcast'
DEBUG: [ 107] InitHostCEC - vchiq_initialise succeeded
DEBUG: [ 110] InitHostCEC - vchi_initialise succeeded
DEBUG: TRAFFIC: NOTICE: [ 2917] registering new CEC client - v2.1.4
DEBUG: [ 2918] detecting logical address for type 'recording device'
[ 112] InitHostCEC - vchi_connect succeeded
DEBUG: TRAFFIC: [ 364] << e0
DEBUG: [ 365] processor thread started
DEBUG: [ 517] >> POLL sent
DEBUG: [ 518] TV (0): device status changed into 'present'
DEBUG: [ 519] << requesting vendor ID of 'TV' (0)
TRAFFIC: [ 520] << e0:8c
DEBUG: [ 1732] expected response not received (87: device vendor id)
TRAFFIC: [ 1734] << e0:8c
DEBUG: [ 364] << e0
DEBUG: NOTICE: [ 2917] registering new CEC client - v2.1.4
DEBUG: [ 2918] detecting logical address for type 'recording device'
[ 112] InitHostCEC - vchi_connect succeeded
DEBUG: TRAFFIC: [ 364] << e0
DEBUG: [ 365] processor thread started
DEBUG: [ 517] >> POLL sent
DEBUG: [ 518] TV (0): device status changed into 'present'
DEBUG: [ 519] << requesting vendor ID of 'TV' (0)
TRAFFIC: [ 520] << e0:8c
DEBUG: [ 1732] expected response not received (87: device vendor id)
TRAFFIC: [ 1734] << e0:8c
DEBUG: [ 2916] expected response not received (87: device vendor id)
NOTICE: [ 2917] registering new CEC client - v2.1.4
DEBUG: [ 2918][ 365] processor thread started
DEBUG: [ 517] >> POLL sent
NOTICE: [ 2917] registering new CEC client - v2.1.4
DEBUG: [ 2918] detecting logical address for type 'recording device'
[ 112] InitHostCEC - vchi_connect succeeded
DEBUG: TRAFFIC: [ 364] << e0
DEBUG: [ 365] processor thread started
DEBUG: [ 517] >> POLL sent
DEBUG: [ 518] TV (0): device status changed into 'present'
DEBUG: [ 519] << requesting vendor ID of 'TV' (0)
TRAFFIC: [ 520] << e0:8c
DEBUG: [ 1732] expected response not received (87: device vendor id)
TRAFFIC: [ 1734] << e0:8c
DEBUG: [ 2916] expected response not received (87: device vendor id)
NOTICE: [ 2917] registering new CEC client - v2.1.4
DEBUG: [ 2918] detecting logical address for type 'recording device'
DEBUG: [ 2919] trying logical address 'Recorder 1'DEBUG: [ 518] TV (0): device status changed into 'present'
DEBUG: [ 519] << requesting vendor ID of 'TV' (0)
TRAFFIC: [ 520] << e0:8c
DEBUG: [ 1732] expected response not received (87: device vendor id)
TRAFFIC: [ 1734] << e0:8c
DEBUG: [ 2916]NOTICE: [ 2917] registering new CEC client - v2.1.4
DEBUG: [ 2918] detecting logical address for type 'recording device'
[ 112] InitHostCEC - vchi_connect succeeded
DEBUG: TRAFFIC: [ 364] << e0
DEBUG: [ 365] processor thread started
DEBUG: [ 517] >> POLL sent
DEBUG: [ 518] TV (0): device status changed into 'present'
DEBUG: [ 519] << requesting vendor ID of 'TV' (0)
TRAFFIC: [ 520] << e0:8c
DEBUG: [ 1732] expected response not received (87: device vendor id)
TRAFFIC: [ 1734] << e0:8c
DEBUG: [ 2916] expected response not received (87: device vendor id)
NOTICE: [ 2917] registering new CEC client - v2.1.4
DEBUG: [ 2918] detecting logical address for type 'recording device'
DEBUG: [ 2919] trying logical address 'Recorder 1'
DEBUG: [ 2919] << Recorder 1 (1) -> Recorder 1 (1): POLL
TRAFFIC: [ 114] expected response not received (87: device vendor id)
NOTICE: [ 2917] registering new CEC client - v2.1.4
DEBUG: [ 2918] detecting logical address for type 'recording device'
[ 112] InitHostCEC - vchi_connect succeeded
DEBUG: TRAFFIC: [ 364] << e0
DEBUG: [ 365] processor thread started
DEBUG: [ 517] >> POLL sent
DEBUG: [ 518] TV (0): device status changed into 'present'
DEBUG: [ 519] << requesting vendor ID of 'TV' (0)
TRAFFIC: [ 520] << e0:8c
DEBUG: [ 1732] expected response not received (87: device vendor id)
TRAFFIC: [ 1734] << e0:8c
DEBUG: [ 2916] expected response not received (87: device vendor id)
NOTICE: [ 2917] registering new CEC client - v2.1.4
DEBUG: [ 2918] detecting logical address for type 'recording device'
DEBUG: [ 2919] trying logical address 'Recorder 1'
DEBUG: [ 2919] << Recorder 1 (1) -> Recorder 1 (1): POLL
TRAFFIC: [ 114] logical address changed to Broadcast (f)
DEBUG: [ 115] RegisterLogicalAddress - registering address e
TRAFFIC: [ 364] << e0
DEBUG: [ 365] processor thread started
DEBUG: [ 517] >> POLL sent
DEBUG: [ 518] TV (0): device status changed into 'present'
DEBUG: [ 519] << requesting vendor ID of 'TV' (0)
TRAFFIC: [ 520] << e0:8c
DEBUG: [ 1732] expected response not received (87: device vendor id)
TRAFFIC: [ 1734] << e0:8c
DEBUG: [ 2916] expected response not received (87: device vendor id)
NOTICE: [ 2917] registering new CEC client - v2.1.4
DEBUG: [ 2918] detecting logical address for type 'recording device'
DEBUG: [ 2919] trying logical address 'Recorder 1'
DEBUG: [ 2919] << Recorder 1 (1) -> Recorder 1 (1): POLL
TRAFFIC: [ 2920] << 11
DEBUG: [ 2920]DEBUG: [ 356] logical address changed to Recorder 1 (1)
DEBUG: [ 357] logical address changed to Free use (e)
DEBUG: [ 358] Open - vc_cec initialised
NOTICE: [ 359] connection opened
DEBUG: [ 361] << Broadcast (F) -> TV (0): POLL
DEBUG: [ 363]TRAFFIC: [ 364] << e0
DEBUG: [ 365] processor thread started
DEBUG: [ 517] >> POLL sent
DEBUG: [ 518] TV (0): device status changed into 'present'
DEBUG: [ 519] << requesting vendor ID of 'TV' (0)
TRAFFIC: [ 520] << e0:8c
DEBUG: [ 1732] expected response not received (87: device vendor id)
TRAFFIC: [ 1734] << e0:8c
DEBUG: [ 2916] expected response not received (87: device vendor id)
NOTICE: [ 2917] registering new CEC client - v2.1.4
DEBUG: [ 2918] detecting logical address for type 'recording device'
DEBUG: [ 2919] trying logical address 'Recorder 1'
DEBUG: [ 2919] << Recorder 1 (1) -> Recorder 1 (1): POLL
TRAFFIC: [ 2920] << 11
DEBUG: [ 2920] UnregisterLogicalAddress - releasing previous logical address
DEBUG: [ 2922] logical address changed to Broadcast (f)
DEBUG: initiator 'Broadcast' is not supported by the CEC adapter. using 'Free use' instead
TRAFFIC: [ 364] << e0
DEBUG: [ 365] processor thread started
DEBUG: [ 517] >> POLL sent
DEBUG: [ 518] TV (0): device status changed into 'present'
DEBUG: [ 519] << requesting vendor ID of 'TV' (0)
TRAFFIC: [ 520] << e0:8c
DEBUG: [ 1732] expected response not received (87: device vendor id)
TRAFFIC: [ 1734] << e0:8c
DEBUG: [ 2916] expected response not received (87: device vendor id)
NOTICE: [ 2917] registering new CEC client - v2.1.4
DEBUG: [ 2918] detecting logical address for type 'recording device'
DEBUG: [ 2919] trying logical address 'Recorder 1'
DEBUG: [ 2919] << Recorder 1 (1) -> Recorder 1 (1): POLL
TRAFFIC: [ 2920] << 11
DEBUG: [ 2920] UnregisterLogicalAddress - releasing previous logical address
DEBUG: [ 2922] logical address changed to Broadcast (f)
DEBUG: [ 2923] RegisterLogicalAddress - registering address 1
DEBUG: [ 3224] logical address changed to Free use (e)
DEBUG: [ 3225] logical address changed to Recorder 1 (1)
TRAFFIC: [ 3226] << 11
DEBUG: [ 3227] >> POLL not sent
DEBUG: [ 3228] using logical address 'Recorder 1'
DEBUG: [ 3228] Recorder 1 (1): device status changed into 'handled by libCEC'
DEBUG: [ 3229] Recorder 1 (1): power status changed from 'unknown' to 'on'
DEBUG: [ 3231] Recorder 1 (1): vendor = Pulse Eight (001582)
DEBUG: [ 3231] Recorder 1 (1): CEC version 1.4
DEBUG: [ 3231] AllocateLogicalAddresses - device '0', type 'recording device', LA '1'
DEBUG: [ 3233] Recorder 1 (1): osd name set to 'CECTester'
DEBUG: [ 3233] Recorder 1 (1): menu language set to 'eng'
DEBUG: [ 3234] GetPhysicalAddress - physical address = 2000
DEBUG: [ 3236] AutodetectPhysicalAddress - autodetected physical address '2000'
DEBUG: [ 3237] Recorder 1 (1): physical address changed from ffff to 2000
DEBUG: [ 3237] << Recorder 1 (1) -> broadcast (F): physical adddress 2000
TRAFFIC: [ 3238] << 1f:84:20:00:01
NOTICE: [ 3389] CEC client registered: libCEC version = 2.1.4, client version = 2.1.4, firmware version = 1, logical address(es) = Recorder 1 (1) , physical address: 2.0.0.0, host: armv6l-unknown-linux-gnueabihf, features: 'P8 USB' 'P8 USB detect' 'RPi', compiled on: Sun Jan 19 15:15:12 UTC 2014 by pi@raspberrypi on Linux 3.6.11+ (armv6l)
DEBUG: [ 3391] << Recorder 1 (1) -> TV (0): OSD name 'CECTester'
TRAFFIC: [ 3393] << 10:47:43:45:43:54:65:73:74:65:72
DEBUG: [ 3695] << requesting power status of 'TV' (0)
TRAFFIC: [ 3696] << 10:8f
TRAFFIC: [ 3875] >> 01:90:00
DEBUG: [ 3878] >> TV (0) -> Recorder 1 (1): report power status (90)
DEBUG: [ 3880] TV (0): power status changed from 'unknown' to 'on'
DEBUG: [ 3881] expected response received (90: report power status)
DEBUG: [ 3883] << requesting vendor ID of 'TV' (0)
TRAFFIC: [ 3885] << 10:8c
TRAFFIC: [ 4130] >> 0f:87:00:e0:91
DEBUG: [ 4132] >> TV (0) -> Broadcast (F): device vendor id (87)
DEBUG: [ 4132] TV (0): vendor = LG (00e091)
DEBUG: [ 4134] << Recorder 1 (1) -> Broadcast (F): vendor id Pulse Eight (1582)
TRAFFIC: [ 4134] << 1f:87:00:15:82
DEBUG: [ 4286] expected response received (87: device vendor id)
DEBUG: [ 4287] replacing the command handler for device 'TV' (0)
DEBUG: [ 4289] TV (0): CEC version 1.3a
DEBUG: [ 4290] TV (0): menu language set to 'eng'
DEBUG: [ 4290] Recorder 1 (1): vendor = LG (00e091)
DEBUG: [ 4292] replacing the command handler for device 'Recorder 1' (1)
DEBUG: [ 4292] Recorder 1 (1): CEC version 1.3a
NOTICE: [ 4294] << putting 'TV' (0) in standby mode
TRAFFIC: [ 4294] << 10:36
DEBUG: [ 4355] unregistering all CEC clients
NOTICE: [ 4356] unregistering client: libCEC version = 2.1.4, client version = 2.1.4, firmware version = 1, logical address(es) = Recorder 1 (1) , physical address: 2.0.0.0, host: armv6l-unknown-linux-gnueabihf, features: 'P8 USB' 'P8 USB detect' 'RPi', compiled on: Sun Jan 19 15:15:12 UTC 2014 by pi@raspberrypi on Linux 3.6.11+ (armv6l)
DEBUG: [ 4357] Recorder 1 (1): power status changed from 'on' to 'unknown'
DEBUG: [ 4359] Recorder 1 (1): vendor = Unknown (000000)
DEBUG: [ 4360] Recorder 1 (1): CEC version unknown
DEBUG: [ 4360] Recorder 1 (1): osd name set to 'Recorder 1'
DEBUG: [ 4361] Recorder 1 (1): device status changed into 'unknown'
DEBUG: [ 4362] unregistering all CEC clients
DEBUG: [ 4371] UnregisterLogicalAddress - releasing previous logical address
DEBUG: [ 4374] logical address changed to Broadcast (f)
Alles anzeigen
Und im Endeffect passiert gar nichts..
___________________________________________________________________________________________________________________________
EDIT(20.01.2014):
Ich habe inzwischen ein bisschen rumgesucht, etc. und bin auf folgendes gestoßen:
https://wiki.mageia.org/en/Remote_Control_with_libCEC
Bei denen sieht das ziemlich anders aus nur komm ich immer noch nicht auf meinen Fehler...
_____________________________________________________________________________________________________________________________________
EDIT 26.01.2014
So nach neu installation bekomm ich eine andere Meldung. Jedoch klappt es immer noch nicht
Wie macht Ihr das ? Wie schaltet Ihr euren TV ein/aus ? (Bitte nicht die langweilige Fernbedienung variante)
[/code]
pi@raspberrypi ~/libcec $ echo 'standby 0' | cec-client -s
opening a connection to the CEC adapter...
DEBUG: [ 109] unregistering all CEC clients
DEBUG: [ 113] Broadcast (F): osd name set to 'Broadcast'
DEBUG: [ 116] InitHostCEC - vchiq_initialise succeeded
DEBUG: [ 119] InitHostCEC - vchi_initialise succeeded
DEBUG: [ 121] InitHostCEC - vchi_connect succeeded
DEBUG: [ 124] logical address changed to Broadcast (f)
DEBUG: [ 126] RegisterLogicalAddress - registering address e
DEBUG: [ 307] logical address changed to Recorder 1 (1)
DEBUG: [ 307] logical address changed to Free use (e)
DEBUG: [ 308] Open - vc_cec initialised
NOTICE: [ 309] connection opened
DEBUG: [ 311] << Broadcast (F) -> TV (0): POLL
DEBUG: [ 312] initiator 'Broadcast' is not supported by the CEC adapter. using 'Free use' instead
TRAFFIC: [ 313] << e0
DEBUG: [ 315] processor thread started
DEBUG: [ 344] >> POLL sent
DEBUG: [ 347] TV (0): device status changed into 'present'
DEBUG: [ 348] << requesting vendor ID of 'TV' (0)
TRAFFIC: [ 349] << e0:8c
DEBUG: [ 1440] expected response not received (87: device vendor id)
TRAFFIC: [ 1443] << e0:8c
DEBUG: [ 2504] expected response not received (87: device vendor id)
NOTICE: [ 2506] registering new CEC client - v2.1.4
DEBUG: [ 2507] detecting logical address for type 'recording device'
DEBUG: [ 2508] trying logical address 'Recorder 1'
DEBUG: [ 2508] << Recorder 1 (1) -> Recorder 1 (1): POLL
TRAFFIC: [ 2509] << 11
DEBUG: [ 2510] UnregisterLogicalAddress - releasing previous logical address
DEBUG: [ 2511] logical address changed to Broadcast (f)
DEBUG: [ 2513] RegisterLogicalAddress - registering address 1
DEBUG: [ 2695] logical address changed to Free use (e)
DEBUG: [ 2696] logical address changed to Recorder 1 (1)
TRAFFIC: [ 2696] << 11
DEBUG: [ 2697] >> POLL not sent
DEBUG: [ 2697] using logical address 'Recorder 1'
DEBUG: [ 2698] Recorder 1 (1): device status changed into 'handled by libCEC'
DEBUG: [ 2699] Recorder 1 (1): power status changed from 'unknown' to 'on'
DEBUG: [ 2700] Recorder 1 (1): vendor = Pulse Eight (001582)
DEBUG: [ 2701] Recorder 1 (1): CEC version 1.4
DEBUG: [ 2702] AllocateLogicalAddresses - device '0', type 'recording device', LA '1'
DEBUG: [ 2703] Recorder 1 (1): osd name set to 'CECTester'
DEBUG: [ 2704] Recorder 1 (1): menu language set to 'eng'
DEBUG: [ 2705] GetPhysicalAddress - physical address = 1000
DEBUG: [ 2706] AutodetectPhysicalAddress - autodetected physical address '1000'
DEBUG: [ 2707] Recorder 1 (1): physical address changed from ffff to 1000
DEBUG: [ 2708] << Recorder 1 (1) -> broadcast (F): physical adddress 1000
TRAFFIC: [ 2709] << 1f:84:10:00:01
NOTICE: [ 2861] CEC client registered: libCEC version = 2.1.4, client version = 2.1.4, firmware version = 1, logical address(es) = Recorder 1 (1) , physical address: 1.0.0.0, host: armv6l-unknown-linux-gnueabihf, features: 'P8 USB' 'P8 USB detect' 'RPi', git revision: 30d9194, compiled on: Sun Jan 26 18:03:51 UTC 2014 by pi@raspberrypi on Linux 3.6.11+ (armv6l)
DEBUG: [ 2863] << Recorder 1 (1) -> TV (0): OSD name 'CECTester'
TRAFFIC: [ 2864] << 10:47:43:45:43:54:65:73:74:65:72
DEBUG: [ 3166] << requesting power status of 'TV' (0)
TRAFFIC: [ 3167] << 10:8f
TRAFFIC: [ 3319] >> 01:8c
DEBUG: [ 3321] >> TV (0) -> Recorder 1 (1): give device vendor id (8C)
DEBUG: [ 3322] << Recorder 1 (1) -> TV (0): vendor id Pulse Eight (1582)
TRAFFIC: [ 3322] << 1f:87:00:15:82
TRAFFIC: [ 3534] >> 01:90:00
DEBUG: [ 3537] >> TV (0) -> Recorder 1 (1): report power status (90)
DEBUG: [ 3538] TV (0): power status changed from 'unknown' to 'on'
DEBUG: [ 3539] expected response received (90: report power status)
DEBUG: [ 3541] << requesting vendor ID of 'TV' (0)
TRAFFIC: [ 3544] << 10:8c
TRAFFIC: [ 3774] >> 0f:87:00:e0:91
DEBUG: [ 3775] >> TV (0) -> Broadcast (F): device vendor id (87)
DEBUG: [ 3775] TV (0): vendor = LG (00e091)
DEBUG: [ 3777] << Recorder 1 (1) -> Broadcast (F): vendor id Pulse Eight (1582)
TRAFFIC: [ 3777] << 1f:87:00:15:82
DEBUG: [ 3929] expected response received (87: device vendor id)
DEBUG: [ 3930] replacing the command handler for device 'TV' (0)
DEBUG: [ 3931] TV (0): CEC version 1.3a
DEBUG: [ 3932] TV (0): menu language set to 'eng'
DEBUG: [ 3934] Recorder 1 (1): vendor = LG (00e091)
DEBUG: [ 3935] replacing the command handler for device 'Recorder 1' (1)
DEBUG: [ 3936] Recorder 1 (1): CEC version 1.3a
NOTICE: [ 3937] << putting 'TV' (0) in standby mode
TRAFFIC: [ 3938] << 10:36
DEBUG: [ 3999] unregistering all CEC clients
NOTICE: [ 3999] unregistering client: libCEC version = 2.1.4, client version = 2.1.4, firmware version = 1, logical address(es) = Recorder 1 (1) , physical address: 1.0.0.0, host: armv6l-unknown-linux-gnueabihf, features: 'P8 USB' 'P8 USB detect' 'RPi', git revision: 30d9194, compiled on: Sun Jan 26 18:03:51 UTC 2014 by pi@raspberrypi on Linux 3.6.11+ (armv6l)
DEBUG: [ 4001] Recorder 1 (1): power status changed from 'on' to 'unknown'
DEBUG: [ 4001] Recorder 1 (1): vendor = Unknown (000000)
DEBUG: [ 4003] Recorder 1 (1): CEC version unknown
DEBUG: [ 4003] Recorder 1 (1): osd name set to 'Recorder 1'
DEBUG: [ 4004] Recorder 1 (1): device status changed into 'unknown'
DEBUG: [ 4005] unregistering all CEC clients
DEBUG: [ 4320] UnregisterLogicalAddress - releasing previous logical address
DEBUG: [ 4322] logical address changed to Broadcast (f)
Alles anzeigen