Hackaday Links Column Banner

Hackaday Links: June 26, 2022

Head for the hills!! We’re all doomed! At least that’s the impression you might get from the headlines about the monster Earth-facing sunspot this week. While any sunspot that doubles in size within a matter of days as AR3038 has done is worth looking at, chances are pretty low that it will cause problems here on Earth. About the best this class of sunspot can manage is an M-class solar flare, which generally cause radio blackouts only at the poles, and may present a radiation problem for the crew of the ISS. So no, this sunspot is probably not going to kill us all. But then again, this is the 2020s, and pretty much everything bad seems like it’s possible.

Speaking of bad outcomes, pity the poor Sonos customers and their ongoing battle with the company’s odd “glitches.” For whatever reason, customers have been getting shipments of Sonos products they never ordered, with at least one customer getting over $15,000 worth of products shipped. The customer reports ordering five Sonos items, but the company saw fit to fill the order six times, stuffing their apartment with goods. Sonos doesn’t appear to be doing much to make it right; while offering the customer free shipping labels to return the goods, they were expected to schlep the packages to a UPS store. And then there’s the money — Sonos charged the customer for all the unordered goods, and won’t issue a refund till it’s all returned.

If you’ve ever wondered exactly what the signals going up and down your cable line look like, you’ll want to check out this video from Double A Labs. Using an RTL-SDR dongle and some spectrum analyzer software they probed the RF signals on the cable, with some fascinating results. The first 11 minutes or so of the video are devoted to setting up the hardware and software, although there is some interesting stuff about broadband network architecture right up at the start. The scans are interesting — you can clearly see the 6-MHz quadrature amplitude modulation (QAM) digital channels. We were surprised to learn that these start at just about the FM broadcast band — about 108 MHz. There were a couple of little surprises hiding in the spectrum, like two unmodulated analog TV carriers in one spot, and the fact that there are over 400 virtual channels jammed into 41 6-MHz QAM channels. Broadband indeed.

Continue reading “Hackaday Links: June 26, 2022”

Python Web Proxy Convinces Sonos To Stream YouTube

[Maurice-Michel Didelot] owns a Sonos smart speaker, and was lamenting the devices inability (or plain unwillingness) to stream music from online sources without using a subscription service. YouTube Music will work, but being a subscription product there is a monthly fee, which sucks since you can listen to plenty of content on YouTube for free. [Maurice] decided that the way forward was to dig into how the Sonos firmware accesses ‘web radio’ sources, and see if that could be leveraged to stream audio from YouTube via some kind of on-the-fly stream conversion process.

What? No MP4 support for web radio? Curses!

So let’s dig in to how [Maurice] chose to approach this. The smart speaker can be configured to add various streaming audio sources, and allows you add custom sources for those. The Sonos firmware supports a variety of audio codecs, besides MP3, but YouTube uses the MP4 format. Sonos won’t handle that from a web radio source, so what was there to do, but make a custom converter?

After a little digging, it was determined that Sonos supports AAC encoding (which is how MP4 encodes audio) but needs it wrapped in an ADTS (Audio Data Transport Stream) container. By building a reverse web-proxy application, in python using Flask, it was straightforward enough to grab the YouTube video ID from the web radio request, forward a request to YouTube using a modified version of pytube tweaked to not download the video, but stream it. Pytube enabled [Maurice] to extract the AAC audio ‘atoms’ from the MP4 container, and then wrap them up with ADTS and forward them onto the Sonos device, which happily thinks it’s just a plain old MP3 radio stream, even if it isn’t.

Sonos doesn’t have the best reputation, let’s say, but you can’t deny that there’s some pretty slick tech going on inside. Here’s a neat hack we covered last year, adding Sonos support to an old school speaker, and a nice teardown of a IKEA Sonos-compatible unit, which uses some neat design hacks.

Thanks [mip] for the tip!

Featured image by Charles Deluvio on Unsplash.

Using Ikea Guts To Add Sonos Compatibility To A Vintage Speaker

We’re in a fortunate position when it comes to audio gear, because advances in amplifier and signal processing technology have delivered us budget devices that produce a sound that’s excellent in comparison to those of a few years ago. That said, a decent quality device is good whichever decade it was manufactured in, and a speaker from the 1960s can be coaxed into life and sound excellent with a modern amplifier. It’s something [Sebastius] has explored, as he picked up an attractive-looking set of Swedish speakers from the 1960s. Wanting to bring them into the 21st century, he’s upgraded them for Sonos compatibility by hacking in the guts of an IKEA Symfonisk bookshelf speaker.

The speakers themselves looked good enough, but on closer examination they proved to bear the scars of many decades. After testing new wiring and drivers they still had a good sound to them. Their passive crossover meant that hooking them up to a single amplifier is as straightforward as it was decades ago, but a Symfonisk has an active crossover and two amplifiers. Fortunately there’s a neat hack by which those two amplifiers can be combined as one, and this is what he’s done with the resulting Symfonisk electronic package mounted on the reverse of the speaker.

The fate of the original speaker’s broken mid-range and tweeter drivers was a common enough one back in the day as speakers were ill-matched to amplifiers. Too small an amp would need turning up in volume to get a good sound resulting in distortion that would burn out the top end drivers, while too much power would result in the bass drivers being overloaded and failing. It’s unclear whether the drivers in a vintage speaker would be well-matched to an amplifier such as the Symfonisk, but we’re guessing they are safe while run at sensible volumes. Perhaps of more interest is whatever on-board DSP a Symfonisk contains, because while vintage speakers were designed for as flat a response as possible, modern compact speakers use DSP to equalise the frequency and phase responses of otherwise not-very-good-sounding enclosures. If the Symfonisk does this then those adjustments will appear as distortion in the sound of a different cabinet, but the question remains whether that distortion will be significant enough to be detectable by ear.

If the Symfonisk catches your attention, we’ve covered a teardown of it in the past.

Hackaday Podcast 056: Cat Of 9 Heads, Robot Squats, PhD In ESP32, And Did You Hear About Sonos?

Hackaday editors Elliot Williams and Mike Szczys gab on great hacks of the past week. Did you hear that there’s a new rev of the Pi 4 out there? We just heard… but apparently it’s release into the wild was months ago. Fans of the ESP8266 are going to love this tool that flashes and configures the board, especially for Sonoff devices. Bitluni’s Supercon talk was published this week and it’s a great roadmap of all the things you should try to do with an ESP32. Plus we take on the Sonos IoT speaker debacle and the wacky suspension system James Bruton’s been building into his humanoid robot.

Take a look at the links below if you want to follow along, and as always tell us what you think about this episode in the comments!

Take a look at the links below if you want to follow along, and as always, tell us what you think about this episode in the comments!

Direct download (60 MB or so.)

Continue reading “Hackaday Podcast 056: Cat Of 9 Heads, Robot Squats, PhD In ESP32, And Did You Hear About Sonos?”

Ethics Whiplash As Sonos Tries Every Possible Wrong Way To Handle IoT Right

We’re trying to figure out whether Sonos was doing the right thing, and it’s getting to the point where we need pins, a corkboard, and string. Sonos had been increasing the functionality of its products and ran into a problem as they hit a technical wall. How would they keep the old speakers working with the new speakers? Their solution was completely bizarre to a lot of people.

First, none of the old speakers would receive updates anymore. Which is sad, but not unheard of. Next they mentioned that if you bought a new speaker and ran it on the same network as an old speaker, neither speaker would get updates. Which came off as a little hostile, punishing users for upgrading to newer products.

The final bit of weirdness was their solution for encouraging users to ditch their old products. They called it, “trading in for a 30% discount”, but it was something else entirely. If a user went into the system menu of an old device and selected to put it in “Recycle Mode” the discount would be activated on their account. Recycle Mode would then, within 30 days, brick the device. There was no way to cancel this, and once the device was bricked it wouldn’t come back. The user was then instructed to take the Sonos to a recycling center where it would be scrapped. Pictures soon began to surface of piles of bricked Sonos’s. There would be no chance to sell, repair, or otherwise keep alive what is still a fully functioning premium speaker system.

Why would a company do this to their customers and to themselves? Join me below for a guided tour of how the downsides of IoT ecosystem may have driven this choice.

Continue reading “Ethics Whiplash As Sonos Tries Every Possible Wrong Way To Handle IoT Right”

Teardown Of Sonos And Amazon Smart Speakers Reveals Interesting Engineering Details

Taking things apart is always fun, and this What Cracking Open a Sonos One Tells Us About the Sonos IPO”>excellent writeup of a teardown of a Sonos and Amazon smart speaker by [Ben Einstein] shows what you can learn. [Ben] is a Venture Capitalist and engineer, so much of his write up focuses on what the devices say about how the company spends money. There are plenty of things to learn for hackers, though: he details how the Sonos One uses a PCI daughterboard for wireless communications, while the Amazon Echo has a programmable radio on the main board.

Continue reading “Teardown Of Sonos And Amazon Smart Speakers Reveals Interesting Engineering Details”

A Jukebox For The 21st-Century Kit Blends Raspberry Pi, Sonos, QR Codes

When [Chris Campbell]’s children wanted to play an album in the background over dinner, switching the outputs on his family’s Sonos sound system was perhaps too involved for their budding mastery of technology. This got him thinking about using kid-friendly inputs so they could explore his music collection. Blending QR codes, some LEGO, and a bit of arts and crafts, a kid-friendly QR code reader media controller comes out!

Working with a Raspberry Pi 3 Model B and a cheap camera, [Campbell] whipped up some code to handle producing and reading the QR codes — though he’s running the media server on another computer to maintain fast response times. Once [Campbell] had his QR codes, he printed them out and got his kids involved in cutting and gluing the double-sided cards. Additional cards access different functions — starting a playlist queue, switching output channels, and full album playback, among others. Cue spontaneous dance-parties!

Continue reading “A Jukebox For The 21st-Century Kit Blends Raspberry Pi, Sonos, QR Codes”