Jump to content


Photo

Sending HDMI-CEC commands from CLI?


  • Please log in to reply
9 replies to this topic

#1 CescoAiel

  • Senior Member
  • 213 posts

+2
Neutral

Posted 29 November 2020 - 10:46

Hi,

 

I searched for CEC on the forums and could only find the 2011 topic... So here goes nothing...

 

Is there a way to send CEC commands from the command line?

 

I have a Samsung TheFrame, and it shuts down the amplifier when it goes to ART mode, so I intentionally misconfigured the amplifier, so it cannot send the correct command to shut it down. The VuDuo4k stays on, so I could configure that one correctly...

So the majority of the integration just works, however the amplifier doesn't turn on automatically in the morning when my timer turns on the radio station on the VuDuo4k.

 

I would LOVE to be able to send an "ON" command and/or a "use this Input" (if the last used channel was TV due to using one of the TV apps like NetFlix) command to the Amplifier from my tuner...


-- WaveFrontier T90 with LNBs on 13.0E, 19.2E, 23.5E & 28.2E, 17/12 dedicated GSO switch (Sharing the sat signal with the neigbours!)

-- Canal Digitaal DVB-S2[x]: 1x Vu+ Duo 4k (FBC Dual), 1x Xpeed LX S2 (dead-ish), 1x ET-9000 (unused and not updated for ages)

-- Ziggo DVB-C: 1x Vu+ Duo 4k (FBC)

 


Re: Sending HDMI-CEC commands from CLI? #2 mrvica

  • Senior Member
  • 1,271 posts

+87
Good

Posted 29 November 2020 - 10:57

download from the feed v4l-utils package, there is a command line tool cec-ctl

cec-ctl - An application to control cec devices - man page (mankier.com)



Re: Sending HDMI-CEC commands from CLI? #3 CescoAiel

  • Senior Member
  • 213 posts

+2
Neutral

Posted 29 November 2020 - 12:00

Thanks, I shall test that!


-- WaveFrontier T90 with LNBs on 13.0E, 19.2E, 23.5E & 28.2E, 17/12 dedicated GSO switch (Sharing the sat signal with the neigbours!)

-- Canal Digitaal DVB-S2[x]: 1x Vu+ Duo 4k (FBC Dual), 1x Xpeed LX S2 (dead-ish), 1x ET-9000 (unused and not updated for ages)

-- Ziggo DVB-C: 1x Vu+ Duo 4k (FBC)

 


Re: Sending HDMI-CEC commands from CLI? #4 CescoAiel

  • Senior Member
  • 213 posts

+2
Neutral

Posted 29 November 2020 - 12:13

The tuner seems to be missing /dev/cec0, and if I try /dev/hdmi_cec, it reports back as being busy...

 

I will investigate further, but if you have a solution already, I wouldn't mind learning that...


-- WaveFrontier T90 with LNBs on 13.0E, 19.2E, 23.5E & 28.2E, 17/12 dedicated GSO switch (Sharing the sat signal with the neigbours!)

-- Canal Digitaal DVB-S2[x]: 1x Vu+ Duo 4k (FBC Dual), 1x Xpeed LX S2 (dead-ish), 1x ET-9000 (unused and not updated for ages)

-- Ziggo DVB-C: 1x Vu+ Duo 4k (FBC)

 


Re: Sending HDMI-CEC commands from CLI? #5 betacentauri

  • PLi® Core member
  • 7,185 posts

+323
Excellent

Posted 29 November 2020 - 13:00

Maybe stop e2 (init 4) and then test again. With (init 3) you can start again e2
Xtrend ET-9200, ET-8000, ET-10000, OpenPliPC on Ubuntu 12.04

Re: Sending HDMI-CEC commands from CLI? #6 CescoAiel

  • Senior Member
  • 213 posts

+2
Neutral

Posted 29 November 2020 - 13:44

Maybe stop e2 (init 4) and then test again. With (init 3) you can start again e2

Yeah, that works, but defeats the purpose... Can't randomly stop E2 to send commands...  Additionally, when using the command with E2 turned off, it doesn't seem to be seeing any peers when I do a 'cec-ctl -d /dev/hdmi_cec -S', and it cannot enter monitor mode either...

 

I could insert a CEC-USB module, but not sure what that'll bring in additional 'challenges'.


-- WaveFrontier T90 with LNBs on 13.0E, 19.2E, 23.5E & 28.2E, 17/12 dedicated GSO switch (Sharing the sat signal with the neigbours!)

-- Canal Digitaal DVB-S2[x]: 1x Vu+ Duo 4k (FBC Dual), 1x Xpeed LX S2 (dead-ish), 1x ET-9000 (unused and not updated for ages)

-- Ziggo DVB-C: 1x Vu+ Duo 4k (FBC)

 


Re: Sending HDMI-CEC commands from CLI? #7 betacentauri

  • PLi® Core member
  • 7,185 posts

+323
Excellent

Posted 29 November 2020 - 15:59

I thought you boot the Duo4k in the morning. In that case you could send the command. But ok, then you need a possibility to send a command via e2. Don’t know whether that is possible.
Xtrend ET-9200, ET-8000, ET-10000, OpenPliPC on Ubuntu 12.04

Re: Sending HDMI-CEC commands from CLI? #8 WanWizard

  • PLi® Core member
  • 70,839 posts

+1,832
Excellent

Posted 29 November 2020 - 16:03

With a custom plugin that should be possible.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Sending HDMI-CEC commands from CLI? #9 CescoAiel

  • Senior Member
  • 213 posts

+2
Neutral

Posted 30 November 2020 - 10:03

With a custom plugin that should be possible.

I have several [coding and non-coding] projects in the queue, so I might add that to the list... Don't know when I will get to it, though...
(If/Once I do, I might be back for some hints on where to find the relevant chunks of code... :P )


-- WaveFrontier T90 with LNBs on 13.0E, 19.2E, 23.5E & 28.2E, 17/12 dedicated GSO switch (Sharing the sat signal with the neigbours!)

-- Canal Digitaal DVB-S2[x]: 1x Vu+ Duo 4k (FBC Dual), 1x Xpeed LX S2 (dead-ish), 1x ET-9000 (unused and not updated for ages)

-- Ziggo DVB-C: 1x Vu+ Duo 4k (FBC)

 


Re: Sending HDMI-CEC commands from CLI? #10 Pr2

  • PLi® Contributor
  • 6,194 posts

+261
Excellent

Posted 1 December 2020 - 08:27

Did you connect your TV and you amplifier using the HDMI-ARC (Audio Return Channel)? That's how I connect my Sony TV with my amplifier so when I use the plugin from my Android TV the sounds is sent back thanks to ARC to the amplifier which swith automatically to the right entry, when I stop it and return to my STB HDMI entry the amplifier switch back to the STB entry. I never play with the amplifier RCU.

 

But my experience with HDMI-CEC is that when you play too much with all those parameter you can have weird behavior and sometimes I even had to unplug replug the HDMI cable and perform a cold start to validate a particular setup.

 

So perhaps set the HDMI-CEC parameters like you think they should be, cold restart all your installation and check what happens.

 

Another point if your STB has a kind of Universal RCU some keys are then used to send command directly to the TV an no longer to the STB.

For exemple on VU+ when you define the TV code on the RCU than the volume key sent is to TV and no longer the one from the STB.


Edited by Pr2, 1 December 2020 - 08:29.

NO SUPPORT by PM, it is a forum make your question public so everybody can benefit from the question/answer.
If you think that my answer helps you, you can press the up arrow in bottom right of the answer.

Wanna help with OpenPLi Translation? Please read our Wiki Information for translators

Sat: Hotbird 13.0E, Astra 19.2E, Eutelsat5A 5.0W
VU+ Solo 4K: 2*DVB-S2 + 2*DVB-C/T/T2 (used in DVB-C) & Duo 4K: 2*DVB-S2X + DVB-C (FBC)

AB-Com: PULSe 4K 1*DVB-S2X (+ DVB-C/T/T2)
Edision OS Mio 4K: 1*DVB-S2X + 1*DVB-C/T/T2
 



2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users