hi guys,
i send a cec request for the power status to the TV
echo "pow 0" | cec-client -s
and get this answer:
DEBUG: [ 67] unregistering all CEC clients
DEBUG: [ 68] Broadcast (F): osd name set to 'Broadcast'
DEBUG: [ 68] InitHostCEC - vchiq_initialise succeeded
DEBUG: [ 68] InitHostCEC - vchi_initialise succeeded
DEBUG: [ 68] InitHostCEC - vchi_connect succeeded
DEBUG: [ 70] logical address changed to Free use (e)
DEBUG: [ 70] Open - vc_cec initialised
NOTICE: [ 70] connection opened
DEBUG: [ 71] processor thread started
DEBUG: [ 71] << Broadcast (F) -> TV (0): POLL
DEBUG: [ 71] initiator 'Broadcast' is not supported by the CEC adapter. using 'Free use' instead
TRAFFIC: [ 72] << e0
DEBUG: [ 137] >> POLL sent
DEBUG: [ 137] TV (0): device status changed into 'present'
DEBUG: [ 137] << requesting vendor ID of 'TV' (0)
TRAFFIC: [ 137] << e0:8c
TRAFFIC: [ 329] >> 0f:87:00:00:f0
DEBUG: [ 330] >> TV (0) -> Broadcast (F): device vendor id (87)
DEBUG: [ 330] TV (0): vendor = Samsung (0000f0)
DEBUG: [ 330] expected response received (87: device vendor id)
DEBUG: [ 330] replacing the command handler for device 'TV' (0)
NOTICE: [ 330] registering new CEC client - v2.2.0
DEBUG: [ 331] detecting logical address for type 'recording device'
DEBUG: [ 331] trying logical address 'Recorder 1'
DEBUG: [ 331] << Recorder 1 (1) -> Recorder 1 (1): POLL
TRAFFIC: [ 331] << 11
TRAFFIC: [ 421] << 11
DEBUG: [ 511] >> POLL not sent
DEBUG: [ 512] using logical address 'Recorder 1'
DEBUG: [ 512] Recorder 1 (1): device status changed into 'handled by libCEC'
DEBUG: [ 512] Recorder 1 (1): power status changed from 'unknown' to 'on'
DEBUG: [ 512] Recorder 1 (1): vendor = Pulse Eight (001582)
DEBUG: [ 512] Recorder 1 (1): CEC version 1.4
DEBUG: [ 512] AllocateLogicalAddresses - device '0', type 'recording device', LA '1'
DEBUG: [ 512] logical address changed to Recorder 1 (1)
DEBUG: [ 512] Recorder 1 (1): osd name set to 'CECTester'
DEBUG: [ 513] Recorder 1 (1): menu language set to 'eng'
DEBUG: [ 513] GetPhysicalAddress - physical address = 1000
DEBUG: [ 513] AutodetectPhysicalAddress - autodetected physical address '1000'
DEBUG: [ 513] Recorder 1 (1): physical address changed from ffff to 1000
DEBUG: [ 513] << Recorder 1 (1) -> broadcast (F): physical adddress 1000
TRAFFIC: [ 513] << 1f:84:10:00:01
NOTICE: [ 664] CEC client registered: libCEC version = 2.2.0, client version = 2.2.0, firmware version = 1, logical address(es) = Recorder 1 (1) , physical address: 1.0.0.0, host: armv7l-unknown-linux-gnueabihf, features: 'P8 USB' 'P8 USB detect' 'RPi' 'EXYNOS', compiled on: Tue Nov 4 00:38:22 UTC 2014 by pbuilder@mgorven-pc.thefacebook.com on Linux 2.6.32 (armv7l)
DEBUG: [ 664] << Recorder 1 (1) -> TV (0): OSD name 'CECTester'
TRAFFIC: [ 664] << 10:47:43:45:43:54:65:73:74:65:72
DEBUG: [ 964] << requesting power status of 'TV' (0)
TRAFFIC: [ 965] << 10:8f
TRAFFIC: [ 1108] >> 01:90:00
DEBUG: [ 1108] >> TV (0) -> Recorder 1 (1): report power status (90)
DEBUG: [ 1109] TV (0): power status changed from 'unknown' to 'on'
DEBUG: [ 1109] expected response received (90: report power status)
power status: on
DEBUG: [ 1110] unregistering all CEC clients
NOTICE: [ 1110] unregistering client: libCEC version = 2.2.0, client version = 2.2.0, firmware version = 1, logical address(es) = Recorder 1 (1) , physical address: 1.0.0.0, host: armv7l-unknown-linux-gnueabihf, features: 'P8 USB' 'P8 USB detect' 'RPi' 'EXYNOS', compiled on: Tue Nov 4 00:38:22 UTC 2014 by pbuilder@mgorven-pc.thefacebook.com on Linux 2.6.32 (armv7l)
DEBUG: [ 1110] Recorder 1 (1): power status changed from 'on' to 'unknown'
DEBUG: [ 1110] Recorder 1 (1): vendor = Unknown (000000)
DEBUG: [ 1110] Recorder 1 (1): CEC version unknown
DEBUG: [ 1110] Recorder 1 (1): osd name set to 'Recorder 1'
DEBUG: [ 1110] Recorder 1 (1): device status changed into 'unknown'
DEBUG: [ 1110] unregistering all CEC clients
DEBUG: [ 2072] UnregisterLogicalAddress - releasing previous logical address
DEBUG: [ 2073] logical address changed to Broadcast (f)
How can i parse this message to find the string "power status: ". (on or off)
any ideas?
thanks
dk00000