# Accessing Rasplex Libcec hdmi control

**URL:** <https://forums.plex.tv/t/accessing-rasplex-libcec-hdmi-control/154018>\
**Category:** Apps & Creations\
**Created:** [August 7, 2016, 3:05pm UTC](https://forums.plex.tv/t/accessing-rasplex-libcec-hdmi-control/154018 "2016-08-07T15:05:43Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![rtaxerxes](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/rtaxerxes/32/92483_2.png) [@rtaxerxes](https://forums.plex.tv/u/rtaxerxes)\
**Post date:** [August 7, 2016, 3:05pm UTC](https://forums.plex.tv/t/accessing-rasplex-libcec-hdmi-control/154018/1 "2016-08-07T15:05:43Z")

</div>

Hi,

I’m trying to add HDMI CEC control to OpenHab so I can switch off all TV’s at once. I could do this by sending a command like `echo "standby 0" | cec-client -s` but then the remote for the TV stops working as I believe there can only be one HDMI-CEC client at a time.

Is there a way to tell the TV to switch off via Rasplex’s LibCEC? Perhaps a link via REST API or something similar?

Thanks.

---

<div class="post-metadata">

**Author:** ![nilsv](https://avatars.discourse-cdn.com/v4/letter/n/bbce88/32.png) [@nilsv](https://forums.plex.tv/u/nilsv)\
**Post date:** [August 7, 2016, 3:33pm UTC](https://forums.plex.tv/t/accessing-rasplex-libcec-hdmi-control/154018/2 "2016-08-07T15:33:55Z")

</div>

It’s in:

Preferences \> System \> Input devices \> Peripherals \> CEC Adapter

You can select the adapter, then you have a myriad of settings.

From: rtaxerxes

---

<div class="post-metadata">

**Author:** ![rtaxerxes](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/rtaxerxes/32/92483_2.png) [@rtaxerxes](https://forums.plex.tv/u/rtaxerxes)\
**Post date:** [August 7, 2016, 5:41pm UTC](https://forums.plex.tv/t/accessing-rasplex-libcec-hdmi-control/154018/3 "2016-08-07T17:41:46Z")

</div>

Thanks, nice to find that.

But I need an external way to power down the tv that is not the remote. I was thinking perhaps there is an API call like for the rest of Plex. I want to use a 3rd party app that isn’t the remote or the Plex iOS app.

---

<div class="post-metadata">

**Author:** ![nilsv](https://avatars.discourse-cdn.com/v4/letter/n/bbce88/32.png) [@nilsv](https://forums.plex.tv/u/nilsv)\
**Post date:** [August 7, 2016, 7:32pm UTC](https://forums.plex.tv/t/accessing-rasplex-libcec-hdmi-control/154018/4 "2016-08-07T19:32:17Z")

</div>

As far as I’m aware, there’s no API for OpenPHt or Rasplex for this purpose ☹

What might be a possibility is to install the needed tools on the raspi itself, and build you own daemon. Be sure to do this on the part of the file system which is persistent across upgrades!

---

<div class="post-metadata">

**Author:** ![rtaxerxes](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/rtaxerxes/32/92483_2.png) [@rtaxerxes](https://forums.plex.tv/u/rtaxerxes)\
**Post date:** [August 8, 2016, 7:13am UTC](https://forums.plex.tv/t/accessing-rasplex-libcec-hdmi-control/154018/5 "2016-08-08T07:13:09Z")

</div>

The commands to run are already on rasplex, they are the same as plex itself uses to control the TV, but if I access them directly, the TV stops sending HDMI commands to Plex.

---

<div class="post-metadata">

**Author:** ![Valdhor](https://avatars.discourse-cdn.com/v4/letter/v/ebca7d/32.png) [@Valdhor](https://forums.plex.tv/u/Valdhor)\
**Post date:** [August 8, 2016, 4:26pm UTC](https://forums.plex.tv/t/accessing-rasplex-libcec-hdmi-control/154018/6 "2016-08-08T16:26:03Z")

</div>

So, using CEC is really not an option.

Does the TV have ethernet/WIFI and a way to control it via the network? Otherwise you may need an IR Blaster connected to some form of embedded computer.

---

<div class="post-metadata">

**Author:** ![rtaxerxes](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/rtaxerxes/32/92483_2.png) [@rtaxerxes](https://forums.plex.tv/u/rtaxerxes)\
**Post date:** [August 9, 2016, 7:58am UTC](https://forums.plex.tv/t/accessing-rasplex-libcec-hdmi-control/154018/7 "2016-08-09T07:58:20Z")

</div>

It is not a smart TV, old Samsung 32". I already have an IR blaster in the lounge, but it seems overkill to add one to the bedroom when the CEC commands are there and working, I just need to know how to send it a command and then hand back control to Rasplex.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [January 8, 2020, 7:23pm UTC](https://forums.plex.tv/t/accessing-rasplex-libcec-hdmi-control/154018/8 "2020-01-08T19:23:01Z")

</div>


