Fix HDMI-CEC weirdness with a Raspberry Pi and a $7 cable

Posted by jlian 21 hours ago

Counter271Comment133OpenOriginal

Comments

Comment by recursive 20 hours ago

Modern AV stuff is insane. I have no interest in taking it up as a hobby. I have an xbox, a TV, and a pair of bookshelf speakers. How am I supposed to get the audio to the speakers without a bulky expensive receiver box? Luckily, I have one of the last remaining TVs with a headphone jack. I don't use a remote for any of it.

Side note: Sometimes the TV doesn't come on when you press its power button. After a tremendous amount of experimentation, I determined this was because the "brain" was on, but the backlight was not. Power cycling it blind usually fixes it. That's harder than it sounds though because you have to navigate the menu blind using short and long button presses with the one button. But I'm scared to try a new TV, because then I'm going to have to figure out how to get audio out of the TV.

It seems like AV stuff used to be so simple. Now the simplest scenarios seem to require more and more knowledge about arcane connection standard interactions and network topology. Ugh.

Comment by jimmaswell 20 hours ago

That little headphone jack is seriously driving bookshelf speakers to a reasonable volume? If it works it works but that doesn't sound right, unless these are actually self-powered speakers with their own amplifiers inside. I'd really like to know the details because this sounds crazy.

Also, I collect a lot of old receivers and speakers. It's really not that complicated and the basics have been the same since the 70s and 80s. Any flatscreen TV made in the past 20 years typically has a TOSLINK output which will be compatible with receivers stretching back to the 80s - I have my LG C1 connected to some 90s Marantz receiver this way. Any old receiver you find on Facebook Marketplace for $20 will typically suffice here as long as you check for the TOSLINK port first, but you do need a separate actual amplifier somewhere along the line to drive a speaker larger than a pair of headphones unless the speaker has its own amp built-in.

I find all this stuff fun so my own setup has that chained to a series of other receivers acting as subwoofer amplifiers as well as using the pre-amp output to drive a Mesa Baron tube amplifier/Acoustat electrostats I was gifted, but most people don't need anything so complex.

Comment by recursive 19 hours ago

The jack is not driving the bookshelf speakers. They're active. They have their own internal amps. It's simple if you use a receiver. If someone can point me to a receiver that's more like 4 inches than 18 inches, then I'd consider that a solution. Receivers are big boxes as far as I've seen. I don't have space. Or maybe I don't want to make space.

Comment by tmnvix 17 hours ago

Fosi ZD3 (https://fosiaudio.com/products/fosi-audio-zd3-fully-balanced...). Supports HDMI with CEC. I turn on my Apple TV, it turns on the TV, which in turn turns on the Fosi DAC - all connected with HDMI. The DAC then turns on a ZA3 amp via 12v trigger cable. Volume control etc is via the Apple remote.

All very cheap really. Total cost I think was about $550 (refurbished TV, second hand Apple TV, new Fosi DAC and amp). All this and I get to keep the TV in 'dumb' mode. Never even use the TV remote.

Comment by mikepurvis 18 hours ago

Some of the bigness is just tradition and buyer expectation (big = expensive). But also, modern AVRs are like 1000W devices amplifying 7, 9, even 11 channels of passives. That’s a lot of componentry and corresponding heat to shed— if you open one of those up, it’s not just empty space in there like an NES cartridge or something.

Comment by recursive 1 hour ago

That makes some sense, but for those of us with two channels maxing out at 25W each, there seems to be some use for a smaller one. I think there are more people on the small end of the spectrum than those with a big surround deployment. I suppose they're mostly using sound bars with an HDMI input.

Comment by mikepurvis 1 hour ago

... that said, there is also a small market for "separates" where you have a decoding-only preamp that either feeds active speakers or another box containing just the multi-channel amplification:

https://www.marantz.com/en-ca/category/av-separates/

The output of these units is line-level signals feeding high-impedance loads. They could definitely be a fraction of the size they are.

Comment by Lammy 17 hours ago

> If someone can point me to a receiver that's more like 4 inches than 18 inches

S.M.S.L. make some good ones: https://www.smsl-audio.com/portal/product/index

I use their AD-18 and really love it: https://www.smsl-audio.com/portal/product/detail/id/566.html

Comment by tonyarkles 18 hours ago

Have a look at Fosi Audio. I'm currently using a BT30D to drive the passive speakers from an old Samsung integrated amplifier+receiver+2014-era "Smart TV" type system that died. It only has 1 analog input and Bluetooth, but it looks like they have other products in a similar form factor that can take multiple inputs (e.g. the P4 Mini). I was skeptical but needed something cheap to drive those speakers and am quite impressed.

Comment by timdorr 18 hours ago

https://www.sonos.com/en-us/shop/amp

Sonos makes this specifically. Has an RCA and HDMI input, along with being a Sonos device for streaming audio.

The only downside is the price.

Comment by ryandrake 18 hours ago

Apart from Sonos in general being awful[1][2], their web site seems to be pretty bad, too. Not only is there a modal "subscribe to our newsletter" box in that link, there's also a separate modal cookie warning which blocks the modal newsletter box. It's like frustrating users is core to their mission.

1: https://news.ycombinator.com/item?id=42683753

2: https://news.ycombinator.com/item?id=21895086

Comment by s3graham 18 hours ago

And that Sonos is terrible to its users.

I had a houseful of overpriced speakers, some only 3 years old when they decided they were too old to support in their rewritten app, or some lazy crap like that.

For GP; I use some cheapo (sub $50) "100W mini amps" from Amazon. They seem fine to me.

Comment by jimmaswell 18 hours ago

It sounds like your speakers work for you then. On a modern TV without a headphone jack you would probably be served perfectly well by bluetooth speakers that sync to the TV. Though I'm surprised if a 3.5mm output is really that uncommon, because I just bought an LG C1 a few years ago and it has one. You can also find a small bluetooth receiver that would output to a headphone jack at WalMart.

Comment by ryandrake 19 hours ago

I was kind of in OP's shoes a few months ago. My 2000-2010 era stereo receiver crapped out and I was looking to see if I could simplify my system a bit. Unlike OP, I didn't need anything that could extract audio from the TV. My requirements were:

1. A decoder with at least 5.1 output since that's how many speakers I have

2. At least 3 HDMI inputs + 1 HDMI output to my TV

3. An amplifier with a volume control

That's it! I don't need an FM tuner. I don't need multiple zones. I don't need wild listening modes and DSP effects. I don't need an on-TV setup display. I don't need fiber optic digital audio inputs. I don't need fucking rows and rows of 20 RCA jack inputs, composite video, component video, S-Video. You'd think I could find a small cheap box the size of an AppleTV that I could just hide somewhere that could do this, but I couldn't find anything sufficient. So I got another $20 gigantic, ugly, old 18-inch receiver again from Craigslist and just leave all those features and inputs unused.

Comment by jimmaswell 18 hours ago

I never understood the "ugly" perception. At worst some might look boring to me, but at best some of them are absolutely beautiful. For example, my favorite in my collection appearance-wise has a 70s-style wooden finish on all but the front plate with a polished silver look on the front plate: https://imgur.com/a/DAUeJJW

Comment by ryandrake 17 hours ago

This is going to sound kind of sexist, but I have never met a woman who was OK interior design-wise with 18 inch stereo equipment in the living room. I mean look at the OP article: He's got all this stuff hidden away in a closet. This seems to be the only viable way to keep an "A/V stack" full of black boxes and a marriage.

I've got a great sounding 5.1 system with a receiver and a game console and everything set up. You know where it is? My garage.

Comment by literallywho 15 hours ago

Is it really love if it hinges on the presence of high quality stereo equipment? Also, I have a friend who has similar stuff out in the open and is happily married.

Comment by db48x 15 hours ago

You’ve either been meeting the wrong women or you need more rooms. One room where people can sit and talk to each other and a completely different room where people can sit and listen to music or watch a screen. Ideally if you want music in that first room you would put a piano in there, because playing the piano (and singing along) is a social activity that people can actually do together. Neither of these activities should be relegated to a garage.

Comment by andersa 12 hours ago

So many problems and more money could solve every one of them!

Comment by aidenn0 14 hours ago

Some googling found this, but it might be under-powered if you have 8 ohm speakers:

https://www.snapav.com/shop/en/snapav/episode-mini-51-avr-ea...

the only way it could have a smaller back-panel and all of your requirements would be to eliminate the ethernet connector.

Comment by 17 hours ago

Comment by LargoLasskhyfv 12 hours ago

Depends on what he means by 'bookshelf'. I've still got these collecting dust in a condo in Germany, where I rarely visit anymore.

https://www.highfidelityreview.com/creative-sbs260-speakers....

Clear and distortion-free. Probably depending on how you drive your line-out, but mine just worked.

Stereo 2.0! (Giggle..)

The room isn't that large, but they really could fill it with sound, or the nearest neighborhood, if put on the balcony on summer evenings :-)

Comment by ssl-3 16 hours ago

The audio part can still be made to be simple.

Others have mentioned toslink and I'd like to expand upon that.

When you get a new TV and no longer have a headphone jack to plug your powered speakers into, then you can just add a DAC that converts the toslink digital audio that your new TV outputs into the bog-standard line-level analog audio that your speakers understand.

DACs like this are available at all price points.

At the low end of the scale, some are less than $15 -- and they're tiny. If you can't hide it somehow then I might insist that you're not really trying.

And that's it. That's the entire missing link for where we are in 2025, wherein: A new TV will still have a toslink output, and your powered speakers still have an analog input.

(Tomorrow? Who knows, man. We aren't there yet.)

Comment by hebejebelus 7 hours ago

It's quite hard to know if the DAC is actually decent quality though. I've bought two from Amazon (admittedly at the low price point) and both of them have line noise - one of them even has a ground loop buzz, which surprised me, since it's powered by USB-C. I'm unconvinced that any of the higher price points (that are still within my budget) aren't just these cheapo ones in slightly fancier cases.

My old TV had real analogue out for speakers and it really did sound a lot better than what I've been getting through TOSLink and this cheapo DAC. Same Hi-Fi and speakers. I'm sure the problem could be solved with a more expensive DAC, but which one? How could I know?

I find this is one of those things where it's quite hard for the uninitiated to see through the cloud of 'audiophiles' saying that you must buy gold cables or your audio will sound like garbage, and still getting decent quality audio.

Comment by dontlaugh 12 hours ago

But you’d be left without volume control, or at least from the same remote you control the TV with.

Comment by ssl-3 11 hours ago

I've successfully set up sound bars with toslink and used the TV's remote to run the volume up and down. Toslink doesn't have to be a fixed level.

If future-TV lacks this functionality: DACs that have remote volume controls are very nearly as inexpensive as those that don't.

Comment by recursive 10 hours ago

Thanks. Those are some helpful search terms.

Comment by p1necone 19 hours ago

A receiver has always been a pretty standard part of even really simple AV setups - you can get half decent ones pretty cheap, and then you just run either the HDMI ARC port or the optical/coax digital audio out from your tv to the receiver so that everything you plug into your tv has it's audio go out to the speakers.

Comment by recursive 19 hours ago

I know I could do this. But I don't really have space for a box. And I'd rather not have it.

Comment by k4rli 5 hours ago

I've seen new cheap LG tv-s with horrible port selection while their premium OLEDs have everything necessary (except Displayport).

I had my LG C9 audio via the headphone jack going to amp and it worked fine. On one of the cheaper LGs I set it up similarly with optical cable and a tiny optical->rca converter.

Comment by amluto 20 hours ago

> How am I supposed to get the audio to the speakers without a bulky expensive receiver box?

You can get a small ARC/eARC audio extractor with RCA or S/PDIF output and use your favorite amplifier or DAC with it.

Comment by adamweld 18 hours ago

Correct answer, HDMI audio extractor.

Personally I use an eARC extractor to run S/PDIF to an audio interface (MOTU Ultralite Mk5) and an RPi running camilladsp handles room correction and active crossovers. Overkill at the moment for just a few studio monitors and a sub, but it'll be a great solution when I get around to building some custom speakers.

Comment by ewoodrich 19 hours ago

Yep, I have a bunch of those audio extractors, they're awesome. In my home office setup I even have an HDMI output that's mirrored to several screens and extract audio at various points along the same path (two using the dedicated mini extractor boxes, one just using the headphone out on a monitor).

Comment by monster_truck 19 hours ago

It's still very simple and you have never needed anything expensive to do so. Stop with the learned helplessness and "being afraid to try a new TV"

Comment by recursive 18 hours ago

I'm not going to buy a TV just to "try" to figure out how to get audio out of it. I mean, I'm sure there must be a way to do this. I've seen a few options in this thread. If I were to buy a TV, I would want to avoid making it more difficult than I have to. To that end, I'd want to figure out specifically how to get audio to the speakers. In my case, they're active bookshelf speakers without HDMI input.

If the only possible way of doing this is with a bulky receiver, I'd feel justified in complaining about modern AV stuff. Not because of the cost, but because of the size.

Anyway, thanks for your input.

Comment by moduspol 18 hours ago

Nah man I'm with you. I've gone chest-deep into this pool and still get issues 5-10% of the time with pretty simple use cases. And I've got a top-of-the-line TV and a pretty good receiver. It's maddening that such conceptually simple use cases don't "just work" even when you DO sink hundreds or thousands of dollars on the stuff you're supposed to.

Comment by nottorp 9 hours ago

I've solved the problem by slapping myself whenever I catch myself looking at sound bars, receivers etc for the living room.

Comment by 19 hours ago

Comment by da768 17 hours ago

You can get a WiiM Amp or Ultra with HDMI eARC, but you can go cheaper if optical out is good enough. Many TVs still have that one

Comment by kevin_thibedeau 17 hours ago

It seems you have amplified speakers. The low friction solution is to use a Toslink to RCA/TRS adapter. That will be a bulletproof digital output readily available on many TVs.

Comment by systemtest 20 hours ago

> How am I supposed to get the audio to the speakers without a bulky expensive receiver box?

You can have bookshelf speakers with an integrated amplifier and HDMI-ARC. All you need is an HDMI cable between the TV and the speakers.

Comment by recursive 18 hours ago

I'm not home at the moment, but I'm pretty sure they don't have an HDMI input. I haven't seen speakers that do, except sound bars. I don't like the general premise of sound bars. You either need a subwoofer, or you're limited to too-many too-small drivers.

Comment by muti 17 hours ago

Active bookshelf speakers with HDMI Arc input are getting more common. Kanto Ren, Kef LSX II, Klipsch The Fives, Elac Debut ConneX

There's also the compact, simple alternatives to bulky receivers that are becoming available: Wiim amp, Sonos amp, Eversolo play, and the cheaper chinese makers like SMSL and Fosi. Each of those brands has a small device the size of an apple tv that will take an HDMI Arc input, and output an amplified signal to power some passive bookshelf speakers.

Comment by systemtest 18 hours ago

There are a couple of brands that sell them, that’s what I meant. I prefer bookshelf speakers over a soundbar due to the larger drivers and better stereo separation

Comment by kristianp 17 hours ago

TVs seem to expect you to use HDMI-ARC to return sound to the receiver or soundbar. I wonder if there's any HDMI-ARC to audio dongles out there?

Comment by rhinoceraptor 19 hours ago

Another infuriating issue is TVs with so few HDMI inputs. I have tried many different HDMI switchers and none of them work reliably, so it kind of puts me off of buying a receiver which would also have that function.

Comment by jonhohle 19 hours ago

I’ve mostly had no issues with HDMI through Yamaha receivers and that includes weird things like an OSSC and Framemeister.

On the other hand, HDMI switchers haven’t fared as well. I built a mini console rack with a switch and it doesn’t recognize several devices, even when manually selected.

Comment by exmadscientist 19 hours ago

> Yamaha receivers

In my limited experience, Yamaha handles HDMI-CEC significantly better than Denon/Marantz. As evidenced by the fact that I currently own a Marantz receiver and am reading this page, but back when I owned a Yamaha receiver, I had no need to care about all of this crud. Things somehow worked on the first try! I did not expect that. However, it conditioned me to expect that again with a different receiver (the sources and sinks are the problems, right? the receivers are super well tested because sitting in the middle and passing these commands around is their entire job, right? right?) which was a mistake.

(The actual issue with the Marantz is that it seems to be eating some kind of power-on command from the source, and not passing it on, so the TV never turns on if you try to turn on the receiver or the source. I have no idea how to fix this, short of following in the path of this article.)

Comment by mschuster91 19 hours ago

Personally, I run a Yinker 4x4 matrix (in: nintendo switch 1, chromecast, mac pro 4.1 I use as a gaming rig, raspberry pi 5, out: projector, TV, pi 5) and am quite happy with it - no outages so far in half a year of uptime.

I desperately need to work with CEC though lol, never had the time to actually test that.

[1] https://www.amazon.de/Yinker-hintergrundbeleuchteter-Unterst...

Comment by justinsaccount 19 hours ago

> It seems like AV stuff used to be so simple.

> without a bulky expensive receiver box

A "receiver" has been one of the standard options for making bookshelf speakers work for more than 50 years. A receiver is also not expensive. You can get a basic used one for under $100. I paid $30 for a perfectly working 5.1 Denon receiver with HDMI.

Your problem is that you aren't even using "Modern" AV stuff. If you were, your speakers and TV would both have HDMI Arc ports. Arc has been a thing since 2009.

> That's harder than it sounds though because you have to navigate the menu blind using short and long button presses with the one button.

Or you could unplug it and plug it back in.

Comment by recursive 19 hours ago

Why are receivers so big? It's not exactly a money issue. I just don't want the big box.

Comment by gabrielhidasy 1 hour ago

Usually receivers are intended for passive speakers, a lot of the bulk is for housing and cooling amplifiers.

If your speakers are active and don't need an amp, you can use a HDMI audio extractor, those are pretty small (mine is about half the size of my phone)

Comment by ianburrell 14 hours ago

Receivers are big because of the amplifiers. AV receivers have to drive lots of channels. They are all 5.1 or 7.1. But stereo receivers are also huge.

I suspect that some of this is tradition because there are small solid state amplifiers. I'm surprised no one has made a small receiver for 2.1 system cause would be pretty common.

Comment by kenhwang 12 hours ago

If you open a standard sized receiver up, you'll probably see that 50% the space is empty for airflow, 25% of the space is for a large heatsink because they're passively cooled to minimize noise (thus the need for airflow), and 20% of the space is really big capacitors.

They do make half size receivers, but they typically only have half the power output. The space savings comes from removing space for airflow and the heatsink, and using smaller capacitors for less heat and smaller power output.

If you only need 2.1 output and a quarter of the power, there are offerings that are basically the size of the minimum amount of ports: 2 pairs of speaker terminals, a pair of RCA terminals for subwoofer out, a HDMI port, a optical port, and power. But then it's not really a receiver and more just of an amplifier+DAC because they only have one HDMI input/output, having space for multiple HDMI ports or speaker terminals basically increases the size to the offering above.

They're big mostly because consumers demand a lot of big connectors on them.

Comment by adamweld 18 hours ago

HDMI Audio Extractor is what you need. Look at OREI.

Comment by recursive 17 hours ago

Perfect! This looks like the one.

Comment by jauntywundrkind 20 hours ago

Thankfully there are fun engaged hackery people.

The article here seemed to dive in, look at what was happening, and figure out some altogether decent & not absurd flows. It wasn't "easy", but it also wasn't totally absurd.

I get why you'd whinge & argue for a simple cable. But this was also a wonderful study, that showed steps, that I hope can bring joy & not just derision. That said, I also have no receiver box & rely on headphone out... which my not that old LG C4 has. Also, if that goes away: SPDIF decoder boxes are very cheap!

Comment by lysace 20 hours ago

Your quest is thankfully unrelated to ARC/CEC.

Find a tiny TPA3255- or TPA3116-based amp. These are class D amplifier chips made by TI.

https://en.wikipedia.org/wiki/Class-D_amplifier

Buy one of these from e.g. Amazon.

Optionally: Throw away/recycle away the supplied chinese noname power supply. Buy a used laptop PSU from a reputable brand locally for cheap instead. I scored a Lenovo 135W/20V laptop PSU for $5 at my local Goodwill equivalent. Solder on a 5.5mm barrel jack connector.

My fav for your use case: Fosi Audio TB10D.

Comment by jtbayly 19 hours ago

1. His speakers are powered already. He doesn't need an amp. 2. Even if they weren't, how is he supposed to connect to the Fosi without a headphone jack coming out from the TV? The Fosi only has RCA input.

Comment by lysace 18 hours ago

1. That information just arrived as a reply to my comment.

2. "Luckily, I have one of the last remaining TVs with a headphone jack."

Comment by recursive 19 hours ago

I'm using active bookshelf speakers with integrated amps. They are working fine.

Comment by lysace 19 hours ago

I really dislike this behavior. You presented a problem, but you didn't want a solution. You wanted attention.

Comment by recursive 17 hours ago

I do want a solution. You haven't provided one.

You suggested an amp. The fact that I'm able to use a headphone jack to connect my speakers should tell you I don't need an amplifier. The question posed is how to connect those speakers if I no longer had access to a headphone jack. Currently the headphone jack is working fine.

For what it's worth, here's a comment that seems like it's get a perfect solution for me.

Sorry if I was unclear.

Comment by davidczech 19 hours ago

A side note: I am very sad that HDMI-CEC apparently can only support like 3 "console-like" devices. I have an Apple TV, Nintendo Switch 2, Sound Bar (eARC) and PS5 hooked up, but only 3 can really interact with CEC.

It took me a long time to diagnose why it seemingly wouldn't work with my Nintendo Switch 2.

I ended up disabling it on my PS5 because I never use the darn thing, but it kind of stinks since most TV's have 4 HDMI inputs.

Comment by Terretta 13 hours ago

AppleTV, Hisense 75" U7, Hisense sound bar, and Xbox Series X, tapping the Xbox logo on controller switches from Apple TV input to console input. Great!

But long press on Xbox logo button to e.g. accept a party invite -- switches to Apple TV. Not great.

The consoles are indeed awkward, but so are soundbars. And really, it seems like the TVs are the worst.

All can be solved with the boxes from HD Fury like VRRoom.

Comment by hackernudes 15 hours ago

Yes, the three playback limit is so annoying. Just... why?! CEC is so stupid. Way overengineered yet completely undercooked. I'm imagining some day soon TVs/receivers will start proxying the CEC bus instead of sharing it globally.

Comment by dwood_dev 17 hours ago

This is my exact setup. Maybe I don't have many issues because I literally only have the NS2/PS5Pro turn on the TV/change input. I still use the AppleTV remote to adjust volume no matter the input.

Comment by codepoet80 21 hours ago

Yup, my AppleTV is the only device that gets CEC right. Even my LG TV and LG soundbar get confused. And don’t get me started on the PS4 Pro’s garbage implementation. I’m sad that Logitech killed Harmony because CEC was supposed to make universal remotes obsolete — they’re still the only way my full home theater can function without juggling a dozen remotes.

Comment by Spoom 20 hours ago

I dread the day that Logitech kills the servers for Harmony. If they don't release the IR code database, they're going to have a lot of people (myself included) pretty annoyed.

(To be clear, they still work today if you can get a second hand remote / hub.)

Comment by tacoman 18 hours ago

As someone who works in this industry and has access to commercial HDMI debugging equipment, I can’t agree more.

I will use Harmony for my home setup until it no longer functions.

The horrors I have seen related to CEC and ARC are something else.

Comment by ssl-3 14 hours ago

I also love the Harmony remote in my living room. It's imperfect, but it's plenty good enough. It flows well and works predictably. It's easy to reconfigure.

And no matter what bizarro-world co-dependent cacophony of AV gear I manage to pile up together, any person can pick up the remote and watch TV or play a game or whatever.

I will be particularly unhappy when Logitech finally pulls the plug on Harmony servers.

At that point, I'll definitely need something different.

But IR codes are only part of the puzzle. And that is perhaps the easiest part to solve: We've already got lots of databases with IR-stuff available. There's databases focused on RC5, and the sleepy LIRC project, and some other things (all of which tend to be very Old Web in appearance).

License-permitting, it's simple enough to use this work as a foundation onto which newer codes can be placed.

That just leaves making the Harmony hardware interface work (hah, hahah -- and it's a dead-end anyway), or developing a new open-source remote to rule them all (which actually might not be too terrible of a task).

That all covers the first 90% of the problem.

The remaining 90% of the problem is just creating software that has a usable UI and actually works.

Comment by lsaferite 17 hours ago

Having just swapped to a new TV on my Harmony setup I was concerned if it was still going to work. Lucky me, it did.

I really REALLY want someone to manufacture the thin harmony RF remote with a simple receiver puck with an open firmware. That's all we'd need because the HA crowd would be all over it and have it doing anything you want.

Comment by artificialLimbs 4 hours ago

Assuming ir means infrared, you could get one of these (or any ir transceiver) and decode the signals and use it or whatever to send them out if your $thing dies.

https://www.athom.tech/blank-1/tasmota-ir-controller

Comment by zimpenfish 19 hours ago

Amusingly, my AppleTV is currently the one thing that doesn't even though it used to - for some reason, with no changes, it just stopped turning on the TV. Switch 2 can happily turn on the TV though. Most peculiar.

(I've tried updating the AppleTV, replugging the HDMI cable, unplugging the HDMI cable for <period of time>, etc. Nothing has worked. TV does not have any network which means it can't have had any nefarious updates.)

Comment by daoistmonk 10 hours ago

try rebooting the remote: https://support.apple.com/en-us/102569 it always fixes problems with either turning the tv on/off or volume issues for me

Comment by spacecrafter3d 19 hours ago

This has happened to me several times. I believe what fixes it is power cycling my AV receiver, in case it helps you.

Comment by zimpenfish 10 hours ago

Might if I had an AV receiver. Apple TV is plugged directly into the TV. But the TV does have a weird junction box (consolidates all the connections into a single cable up to the TV, maybe it counts as an AV receiver) and it might be worth unplugging everything from that and that from the TV. Will give it a try.

Comment by jnaina 18 hours ago

this. power cycling my Marantz fixed it. Otherwise Apple TV is rock solid.

Comment by SchemaLoad 20 hours ago

I've had pretty good luck with the Steam Deck for CEC, at least with the Apple USB-C hub.

Comment by crtasm 19 hours ago

Anyone know how to make a LG TV wake an AppleTV from sleep?

Once it's awake buttons presses on the LG remote are passed through to it but I have to keep the Apple remote around for that first step.

Comment by codepoet80 18 hours ago

I had to go the other way. The Apple TV controls the LG. It wakes it, controls the volume and turns it off when it sleeps.

Comment by robflynn 17 hours ago

Mine will turn my LG on, control the volume, do all of that, it just won't ever turn it off. The AppleTV will turn itself off, but the TV itself will revert back to its screen saver display complaining about No Input.

Comment by skunkworker 13 hours ago

I've got a Apple TV -> Denon -> LG C3. CEC on the appleTV remote will turn all 3 on, and long pressing (power button on appletv remote) will turn all 3 off, not just screen saver with input.

Comment by rblatz 16 hours ago

My Samsung frame does that too, some TVs ignore the off CEC command. It might be a setting you can control on the tv. Last time I checked the frame did not have that option.

Comment by star-glider 1 hour ago

heh I really enjoyed reading this because I went on a RPI-fueld CEC deep-dive about a year ago when we put a gym in our house. I wanted a simple media center control for the TV/Receiver we had in there. An RPI sits at the center of the thing, and by reading the CEC bus I can respond to various remote commands to launch the media center, bring up security camera feeds, switch the receiver to Bluetooth, start Spotify Connect, etc.

It works well, but CEC most definitely is the buggiest part of the setup. It's a reasonably elegant system, but it's just not implemented very well by most electronics. I ended up putting in a lot of retries: stuff like "send active source command; wait five seconds and send it again." Still, if you're willing to dive into the weeds, you can do some nifty stuff.

Comment by sudobash1 20 hours ago

I am using a raspberry pi pico with a modified pico-cec program to control my Jellyfin-client media PC. CEC is actually really fun to hack on, and once you get a custom setup working, it is (at least in my experience) rock solid.

Jellyfin even has a TV mode that you can enable in a normal desktop browser. So my media PC runs the browser in kiosk mode, and it has CEC buttons mapped to keyboard presses. Guests have used it, and I don't think anyone could tell that it wasn't a "smart" TV.

https://github.com/gkoh/pico-cec

Comment by bsimpson 20 hours ago

I saw the Steam Machine bragging about CEC and being able to turn the TV on when it does, which made me wonder why my setup doesn't do that.

Turns out that there's a special pin on your APU that has to be wired up, and AMD didn't bother for the Z1 Extreme chips. I wish "wake on signal" was a universal option.

Comment by extraduder_ire 19 hours ago

For some reason, GPU makers don't usually expose the CEC interface for the HDMI ports on their cards. Even the raspberry pi's ability to support it wasn't standard/default for years.

The common workaround if you had a kodi PC or something was to buy one of these things: https://www.pulse-eight.com/p/104/usb-hdmi-cec-adapter and run a HDMI cable through it. Because CEC is open drain like i2c is, connecting to it anywhere in your network of devices should work. (the HDMI spec mandated that the CEC pin needs to be connected, even if you aren't using it, from the first version) Just connect it to a spare HDMI port anywhere and you're off to the races.

Comment by bsimpson 12 hours ago

It's cool that that exists, and also feels silly to spend $50 + need to buy/run an extra HDMI cable just to make your TV turn on when your device does.

Real shame these gaming-tailored devices don't support it natively. I wonder if the DP vs HDMI licensing battle is involved.

Comment by sedatk 20 hours ago

Huh, is that why my Steam Deck won't wake up my TV?

Comment by jonah-archive 20 hours ago

A long time ago I used one of these HDMI-CEC-to-USB/serial bridges: https://web.archive.org/web/20110219131237/http://rainshadow...

(I'd gotten a large LG monitor instead of a flatscreen tv, and it didn't talk HDMI-CEC but it had a serial-over-TRRS control interface, so I listened for messages on the bus and my media PC translated and relayed them to the monitor.)

Comment by kimos 6 hours ago

I’ve tried getting CEC working with my pretty average setup: Samsung Frame, Marantz receiver, couple of console games.

It has been worse than doing all the remote juggling switching mysel because it is non-deterministic. This article will help me debug it, but it’s a toss up which audio device the screen will pick, if game mode activates or not, and if some device waking in the wrong order will put another one right back to sleep. Even if I follow the same steps every time.

Comment by baq 21 hours ago

Assuming you’re ok with connecting your receiver to the network, you should be able to wake the receiver if you detect the tv is on without any cables at all - if your tv is also on the network (I’ve got a home assistant automation doing exactly that) or you can use a $10 smart plug with power metering.

That said props for actually using HDMI-CEC! And it’s cheaper than most smart plugs (and probably safer, too)

Comment by FatherOfCurses 4 hours ago

I have what I believe is an acceptable setup at home (Denon AVR-X1700H and Apple TV like the OP, a decent Sony display, 7.1 speaker setup, but the plethora of audio coding options completely mystify me. I know this is a me problem. I'm hoping in the new year to watch more movies with the family and would like to make better use of the surround system for sci-fi and action movies but for whatever reason I have no idea where to start.

Comment by rgovostes 19 hours ago

This is the lord’s work. It’s ridiculous that in 2025 my $500 gaming PC GPU cannot tell the receiver to change inputs. Even my Apple TV, which is considered a model citizen here, steals the receiver’s input every few hours if I have another device active.

Comment by avidiax 18 hours ago

Yeah, the Apple TV isn't better so much as it is very aggressive. I usually have to long press the power button on the Apple TV remote to get it to power off and let go of my receiver.

Other devices like an nVidia Shield or the XBOX require that you press power/home a couple of times to take control of the receiver and switch inputs.

Comment by nullhole 16 hours ago

I used a similar setup to translate CEC user commands (volume/fwd/reverse/etc), that travelled from my TV remote to the TV to the CEC bus to a pi that was plugged into the TV via HDMI. The pi was running jukebox software (moode audio). Similar to the article, the pi had a shell script that reads all the loglines coming from cec-client and acted on them when appropriate, in my case translating a subset of the CEC user commands to moode commands.

Worked pretty well, was nice to CEC-ify a pi program and eliminate the need for special-purpose hw/sw to interact with the audio player.

The CEC spec has all of the user control codes on the 2nd last page[1], in table 27.

[1] https://storage.googleapis.com/google-code-archive-downloads...

Comment by sho_hn 16 hours ago

I made myself a little HDMI dongle (about half the size of a classic Fire Stick) with a WiFi modem that I use to remote control my TV from Home Assistant. My remote is the HA app.

Why? Because Google Home's TV remote stuff can do a lot, but not turn on the TV. CEC can.

Comment by InterlooperX 9 hours ago

Agreed that CEC is weird. Never thought about adding yet another device like the Pi into the mix to help control everything, though...

I have accepted that I am apparently in the minority with my setup. In fact I was actually surprised to read that OP has a Denon as, just by what I have read about the topic of home theater", everyone else seems to be doing just fine with a simple soundbar which has one! hdmi socket.

So, here is my setup: -Dumb TV (Panasonic. So old it doesn't have a CI+ module built in, it is "just" a CI module) -Denon AV Receiver -Nintendo Wii -Nintendo Switch Dock -Original Xbox -Blueray Player -HTPC -Satellite Receiver -AppleTV

Excessive? Maybe but I still own all that stuff, have room for it in my cabinet so I like to convenience of powering each of these on when I feel like it without having to unearth them from a storage room and then fiddle with cables to connect everything for just a short time of usage.

Basically everything is plugged into the Denon. And then a single HDMI cable goes from the Denon to the TV. So the TV stays on one HDMI channel and everything else happens on the Denon. Switch Inputs on there and you get the corresponding Audio/video signal from the chosen device.

So far I have been lucky that in order to switch everything on, I could use a Harmony One. I could simply program the power on command for the TV, then switch to HDMI1 and turn on the Satellite receiver. This was the default. Put it on a news station and you got yourself some background noise. If you want to switch, you just had to tell the Harmony to switch its input to any other device listed above.

It really irks me that the Harmony line is dead and I don't know what I will do should the remote, one day, stop to function. Now I wonder if I would have to go the Pi route to have that switch things around depending on devices announcing themself when turned on.

Comment by kayson 20 hours ago

Would love to know more about the magic Apple bytes and why the Denon is behaving differently with consoles.

Comment by pottertheotter 20 hours ago

“every console behaves like it missed the last week of CEC school. They wake the TV, switch the input, then leave the Denon asleep so I’m back to toggling audio outputs manually.”

My Roku does this! It will turn on the TV but not the soundbar, which is so frustrating. Guess it’s somewhat normal.

Comment by davidmurdoch 17 hours ago

My shield turns my receiver on, sets it to the right input (then the wrong input, then back to the right input), then... disables the decoder so there is no sound. Then sometimes enables the decoder about 20 seconds later.

Comment by hackernudes 17 hours ago

I wrote a program in Golang to control my a/v setup. Included within are small pkgs to control Linux CEC and LIRC devices (ioctl/read/write) as well a pkg for LG TV commands over serial port. Link here: https://github.com/EBADBEEF/tvman

One really useful thing when getting started was to use `cec-ctl -M` to monitor the CEC traffic live. Like the author, I used the v4l-utils commands to interact with CEC but eventually got frustrated with them and rewrote my program in in Go!

I have found CEC to be flaky and hard to work with. I had to turn off CEC on my TV because it breaks everything, almost randomly switching inputs and turning on and off devices.

Comment by nfriedly 17 hours ago

My TV and soundbar have the same issue: CEC works for everything except the "turn on" command. I ended up fixing it with an arduino-ish IR blaster that's powered by the TVs USB port - so as soon as the TV powers on, the Arduino boots up and tells the soundbar to turn on too. https://www.nfriedly.com/techblog/2015/01/samsung-tv-turn-on...

I also had a NUC that I installed a Pulse Eight CEC module into, but I never ended up using it, so it got passed on to someone else.

Comment by ghm2199 19 hours ago

An analogous audio binding issue used to happen with my Jabra Bt headphones. It was generally connected to my phone and my computer. After finishing a phone call — if previously the computer was playing some music — the music would turn back on but it would be a very poor quality, I suspect the audio "mode" was stuck at "transmitting" phone call audio quality even though the BT software on the headset detected devices being switched from phone -> computer. Toggling the BT sound output on the mac to and fro between Computer and Headphones, fixed it.

I suspect it was probably a vendor — jabra — software issue when sending a signal to apple's BT stack when switching between types of devices? But probably not worth fixing on my own.

Comment by deepspace 18 hours ago

I am not sure why the author specifically mentions a $7 cable when the Raspberry Pi and accessories are going to set you back close to $100. That is by far the most expensive component. The money is possibly better spent buying a programmable remote.

Comment by ihaveone 18 hours ago

I'm assuming he could have used a Pi zero instead

Comment by Arbortheus 19 hours ago

In my home media setup (LG UQ81 TV, WiiM Amp via ARC, Xbox Series X, Chromecast with Google TV), the CEC setup _almost_ works perfectly.

* I can use the LG TV’s remote alone to control everything including the Chromecast and amp’s volume controls.

* The amp automatically switches on and off with the TV.

* Turning the Xbox on/off via its controller also turns on/off the TV and the amplifier together.

Mostly good, except sometimes when I have my Chromecast on and switch the Xbox on via the controller it gets stuck in an endless loop of flicking back and forth between HDMI 1 and HDMI 2, between Chromecast and Xbox. Nothing I can do will stop it except to power cycle the TV.

If anyone has experienced anything similar or has any tips on how to debug this that would be much appreciated!

Comment by retsyx 15 hours ago

In a similar vein, I created a project, Amity, that uses HDMI-CEC to control the whole home theater with one remote. Using a simple streamer remote you can select an activity (watch Apple TV, play on the PlayStation) navigate interfaces, control the system's volume, and power it off. One of several fairly common streamer or TV remotes can be used.

Amity, too, is based on a Raspberry Pi but also uses a very simple custom PCB to hook into the HDMI-CEC bus between the TV and the receiver. One of the most common problems encountered with HDMI-CEC is that different components will often compete to be displayed by the TV (for example, turning on your Apple TV, turns on the TV, which turns on the PlayStation, which requests to be displayed, which switches the TV to displaying the PlayStation. So you end up viewing the PlayStation when you wanted to stream Netflix on your Apple TV). I found that the only way to fix this problem is to sit between the receiver and the TV to break the cycle. Hence, the PCB.

Amity is available here:

https://github.com/retsyx/amity

Comment by pier25 17 hours ago

I have an Apple TV and Nvidia Shield connected to a home theater receiver which is connected to the LG TV.

Sometimes when turning any of the set top boxes, the other one would turn on and its HDMI would become the active one. I couldn't simply turn off the box I didn't want to use because all the system would turn off.

The solution was to disable CEC on the TV. I still get CEC between the boxes and the receiver (for volume and HDMI active input) but I need to manually turn the tv on and off.

Comment by paulbgd 21 hours ago

Super cool, I'm definitely going to have to grab a pi and set this up. Now if we could also solve the ps5/switch/etc not turning off the TV, my setup would be perfect!

Comment by Hackbraten 20 hours ago

Nice hack! The cat seems to be happy with the setup, too!

Comment by thebruce87m 20 hours ago

Strange place for a cat to lie - must be a hot water pipe under the floor there or perhaps a sliver of sunshine that’s since gone away.

Comment by askvictor 19 hours ago

I wrote related kind of thing a while back: https://github.com/askvictor/ChromecastControls . Though I haven't used it since upgrading most of my AV gear.

Comment by theLegionWithin 19 hours ago

that was an interesting read. glad I do all of my video watching & games playing on a computer instead of consumer grade hardware!

Comment by VerifiedReports 16 hours ago

Well, from the article I learned about Homebridge, which integrates non-Homekit products into Homekit.

Yay!

Comment by rcarmo 19 hours ago

Genius. I might have a pretty good use for this, since I have constant issues with my consoles fighting for the TV.

Comment by colechristensen 20 hours ago

The first time I "discovered" CEC was when the arrow keys on my TV remote inadvertently navigated the PS3 system menu. I thought I was hallucinating because there was no mechanism for this magic to happen.

Comment by neilv 20 hours ago

I was thrilled when I saw a Reddit comment about this, and it actually worked with my Sony dumb TV + PS5 + Sony RM-VZ320 universal remote.

(I was sad at having to give up my nice PS4 universal remote, and not finding an equivalent for the PS5.)

However, I couldn't find a button on the remote that was the equivalent of pressing a PS5 controller's PS Button, and that's pretty important to the messy PS5 UI. But the TV had menus that could simulate pressing that button. So I upgraded to a Sony RM-VLZ620, which added programmable macro buttons, which I kludged hard to navigate the TV menus. From my notes:

  ### Programming PS Button

  1. SET(Hold 3 seconds, for LED, then keep holding)
  2. middle-circle
  3. (Release SET)
  4. System-Control-1
  5. 9, 8, 1
  6. Options
  7. Up
  8. Down, Down, Down, Down
  9. middle-circle, middle-circle
  10. SET

  Note: The **Up** is a timing NOP, since otherwise
  the TV usually only sees only 3 Down rather than 4.

Comment by Crespyl 17 hours ago

I've had this happen a handful of times with my Frame TV and Steam Deck, though it's inconsistent for some reason. It's pretty cool when it works.

The Deck can pretty consistently turn the TV on from standby(/picture mode) and grab the input, but if the TV is completely off (black screen) CEC doesn't work anymore.

Comment by sandos 10 hours ago

I really need this in my life. Once upon a time, things were good and our Chromecast with Google TV knew _exactly_ how to turn on our soundbar, set our TV to output sound to said soundbar, control the volume on that soundbar using IR.

Now absolutely nothing of that works. The audio output on the TV is set seemingly semi-randomly depending on content!?. The volume controls just stopped working, and I can not FIND THE SETTINGS in the menus? I suspect it is required to completely redo the remote setup to see those settings, OR as I rather suspect: they broke this shit in purpose to get us to buy a new Google TV Streamer.

Comment by jauntywundrkind 20 hours ago

I know it's called a bus, but I'm still surprised that all devices get the HDMI-CEC stream of all other devices. Being able to watch the Apple TV from the Pi was super cool, and I never would have guessed it was possible to see what was going on there (short of building a man in the middle hardware proxy)!

Comment by tylerflick 20 hours ago

CEC is just i2c which is a bus. In fact you can hook regular i2c devices up to an HDMI port and communicate with them. You’ll need a resistor and shouldn’t draw more than 50 mA.

Comment by amluto 20 hours ago

I always assumed that it was a separate i2c bus per HDMI link and that it was the AVR’s job to handle a request from something and send the right requests to everything else.

Comment by extraduder_ire 19 hours ago

Much like i2c, any message put on the bus is transmitted to everything on the bus.

Version 1.0 and later of the HDMI spec even mandate that you have to connect those pins across all HDMI ports on your device even if you don't do anything with them.

Comment by amluto 18 hours ago

Okay, now I’m curious. If the pins are just connected across all ports, how does the AVR tell which CEC-speaking device is on which port? Chip select or similar pins?

Comment by waerhert 19 hours ago

Isn't DDC the I2C bus? Interesting article about that here: https://mitxela.com/projects/ddc-oled

Comment by tylerflick 17 hours ago

Doh, you’re right. I’m over here getting my protocols mixed up. IIRC it is very similar though.

Comment by extraduder_ire 19 hours ago

It's electrically similar, but not directly compatible. (if you know better than me, please let me know)

Comment by rogerallen 16 hours ago

This is the content I come here for.

Comment by neuroelectron 19 hours ago

"Media closet tour"

Just looks like a Rube Goldberg server to me. This is really illustrative of the nonsense that media copyright has manufactured. I'm not going to solve "HDMI-CEC weirdness with a XYX" I'm going to download the movie from a torrent or run an emulator.

Comment by bijant 15 hours ago

As if the sight of this dystopian thread wasn't depressing enough, there is your one gold nugget of a comment, downvoted into oblivion, grayed out at the bottom of the comment section. A hundred comments of people reverse-engineering vendor handshakes, writing Python daemons, and debating the finer points of CEC frame injection - and not one of them asking why this is necessary. The answer is in three letters: DRM. Your PlayStation is a computer. Your Xbox is a computer. Your Apple TV is a computer. Your "smart TV" is a computer. You already own a computer. The reason you can't just... use it... is that the entertainment industry spent two decades making sure the bits know who owns them at every step of the pipeline. HDCP, HDMI licensing, CEC's vendor-specific "quirks".I see no interoperability failure, it's interoperability prevention. Meanwhile, a $200 mini-PC running VLC, connected via DisplayPort to a monitor and 3.5mm to powered speakers, plays anything in any format at any bitrate with zero handshake failures. One "remote": a wireless keyboard. This solution has existed since before some commenters here were born. What you're all debugging isn't technology. It's compliance.

Comment by pyrolistical 20 hours ago

Now package that into a tiny device with an hdmi plug.

Better hurry befor-, too late it’s cloned in china.

Actually it would be funny if somebody integrated this fix into a cable

Comment by mongol 20 hours ago

I think it will be a while. There is not even a Pulse-Eight clone on Aliexpress

Comment by lawlessone 20 hours ago

Someone invent the cornucopia machine