Coder Social home page Coder Social logo

hdmicec's Introduction

HDMI-CEC Controller

Docker

Vendor IDS

  • 0f:87:00:00:f0
  • Samsung = 240
  • LG = ?

Linux libcec install

sudo apt-get update && \
sudo apt-get install -y cmake libudev-dev libxrandr-dev \
python3-dev swig libp8-platform-dev && \
git clone https://github.com/Pulse-Eight/libcec.git && \
cd libcec && mkdir build && cd build && cmake .. && \
make -j4 && \
sudo make install && \
sudo ldconfig

We just need to find the vendor specific codes somehow. XBOX knows these

Send Keypress

// https://github.com/chbmuc/cec/blob/master/cec.go#L89
// https://github.com/chbmuc/cec/blob/master/libcec.go#L187
// https://github.com/Pulse-Eight/libcec/blob/bf5a97d7673033ef6228c63109f6baf2bdbe1a0c/src/libcec/LibCECC.cpp#L355
// echo "tx 1F:44:09" | cec-client -s -d 31 && echo "tx 1F:45" | cec-client -s -d 31
C.libcec_send_keypress( connection , 0xF , C.cec_user_control_code( 9 ) , 1 )

Monitor Mode ???

/usr/local/bin/cec-client-6.0.2 -m

cec-client with Pipes

mkfifo cecpipe
cec-client < /home/morphs/DOCKER_IMAGES/HDMICEC/cecpipe > ceclog.txt 2>&1
echo "tx 1F:82:10:00" > cecpipe

Get Device IDS

echo 'scan' | cec-client -s -d 1

Set Source to HDMI 2

echo "txn 1F:82:20:00" | cec-client -s -d 4

Power On

echo "on 0" | cec-client -s -d 1

Power Off

echo "tx 1F:36" | cec-client -s -d 1

Power Status

echo "pow 0" | cec-client -s -d 1
echo -e "tx 10\ntx 10:8F" | cec-client -s -d 31

Volume Up / Down

echo "volup" | cec-client -s -d 1

Mute Toggle

echo "tx 10:44:43" | cec-client -s -d 1

hdmicec's People

Contributors

0187773933 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.