Title is a little off - I was expecting something like a micro controlling the serial ports on some receiver to tie into a smart home but this is pretty neat. Honestly I think I'd rather just setup a Spotify compatible casting endpoint though.
Given the archaic age of one of my analogue hi-fi systems, the title made me expect something with actuators, solenoids, and related robotics tasks with smart home connectivity.
> all I want is to play Spotify using those speakers
What was wrong with plugging the laptop into the hi-fi system via the 3.5mm port or a USB DAC? Maybe I don't understand just how dumb this hi-fi system is..
Some machines have really bad analog audio output.. either bad quality or noisy. Plus, for systems that have toslink/spdif you can get a USB DAC that has optical out and avoid the issue entirely.
This is like a 21st century version of those cassette tapes with 3.5mm jacks; the ones you could use to play CDs from your Sony discman through your car's stereo.
I replaced the head unit w/ a Pioneer DIN all-in-one. They are cheap, have USB etc. Also frees up the CD player slot for a tray to hold a mobile device and more.
I grew up in the strange time where the cars we got as "hand me downs" had 8-track players. At a yard sale we found an 8-track to cassette adapter, and then put one of those cassette to line input adapters to have a discman playing in these 1970s era cars.
I know I’m gonna get downvoted because this is HN and obviously massive kudos for engineering something amazing… but seriously this is a massive sledgehammer to crack a walnut! Just connect a phone to the Aux jack and run the Spotify app…
That was kinda my thought as well, especially when the "problem" seemed to actually be "my PC is hooked up to these speakers and I want to control Spotify while using my laptop".
I love the pure hack value and I'm sure some of the lessons learned will prove useful since the author mentioned working on USB things in their day job, but I'm sure there's an easier way to control Spotify on one PC from another device. I think they used to even have a remote control device.
Agreed-- hacking value sure, but... I guess there's just so many more pain points to solve in the home theater/discrete audio space that it bothers me a bit to have talented folks twiddling about on problems so handily solved by the big product teams of our era.
I do something similar but with an Amazon Echo Dot with the microphone off instead of a phone. It shows up as an available Spotify Connect device on my computer, tablet, and phone.
It's also good for listening to radio station streams. I've got another Echo whose microphone is on. I can ask Alexa on that or in the Alexa app on my phone or tablet to e.g. "listen to KUOW FM on Dot".
My Denon A/V receiver predates voice control support (its from 2012 or so), but it does have a network connection with a few control options (TELNET, HTTP). I've got a program running on an RPi that can use the receiver's HTTP interface to get the current input/volume/mute settings, and to change inputs, set volume, and mute/unmute.
Apple's "Shortcuts" app on Mac/tablet/phone supports a "run script over SSH" action. I've used that to make a bunch of shortcuts: "Denon Dot", "Denon TV", "Denon Game" to select some sources; "Denon Status" to get the current settings (which the shortcut speaks); "Denon Mute" and "Denon Unmute" to mute/unmute; "Denon Up" and "Denon Down" to slightly adjust the volume; "Denon Set 30", "Denon Set 35", "Denon Set 40", ... to set specific volume levels.
Saying the name of a Shortcut to Siri invokes that Shortcut.
So putting it all together, A couple voice commands to Siri on any of my Apple devices will switch the receiver to the Dot and set the volume, so it is ready for streaming radio or for Spotify, and if it is radio I want a voice command to Alexa will start that.
This has covered pretty much all my "smart" A/V needs, so I can probably happily keep using my existing receiver for quite a while.
Do you know by any chance if wiim is capable of streaming music independently, without relying on a separate computer? I.e. my smart Denon speaker can stream Spotify, so if I start playing on my laptop through that speaker and then close the laptop, streaming continues. I don't have to keep my laptop running. This doesn't work for Apple Music and I am looking for a device that can stream Apple Music without an additional computer.
Maybe a regular Chromecast plugged into an HDMI audio extractor? They are super cheap on Amazon [0] though if using analog audio it might be worth trying a few to compare sound quality; optical should be perfect quality.
Personally, I don't have much interest in doing anything DIY if I can just buy something inexpensively that does the same job at least as well as whatever I'd build. If I'm going to build something, I want it to be unique somehow: to do that job better than the off-the-shelf solution, or add a useful feature I can't get by buying, for instance.
I don't know enough about the subject of this particular article to say if this is the case here, but personally I think doing something that's a poorer version of a cheaper off-the-shelf solution is a bit of a waste of time, but if they're doing something different, that's really interesting to me.
So it's a USB "mass storage device" that doesn't actually store the music on it, but gets it from spotify instead and presents it as a file to the USB host. Kinda neat I guess.
Why not just load up the Spotify client on the desktop PC and use the Spotify client on the laptop to play on it through Spotify Connect? It requires Spotify Premium but it works great. Kudos for finding something else that works!
This is quite a yak shave. You can run Spotify on one computer and have it output to speakers connected to another computer using Spotify. Remote control. I do it all the time.
So you can run Spotify on your desktop, and control it from Spotify on your work laptop.
The article says there is already another machine, their desktop computer which is connected to the hi-fi-- and what do you mean you can't use the skip buttons? They work fine with Spotify Connect.
> what do you mean you can't use the skip buttons?
I think they mean the physical skip buttons on the device. By presenting it as a USB device the skip buttons can work on device.
Except that: "My main next steps, in no particular order, would be... Detecting track navigation: if you go to the previous or next tracks, emit a signal to somewhere. This would allow triggering a track change on the stream source, such as Spotify."
Skip buttons on which device? The HiFi [remote] itself? I'd imagine that doesn't work in the 1-PC route either. If it does, then the problem is solved because it will have the correct effect in the 2-PC route.
It’s mentioned several times in the article that the author wants the physical skip buttons on the HiFi system to work, which can’t be done with any number of computers connected via 3.5mm
In case anyone is unfamiliar, Spotify Connect is Spotify's solution for casting and remote controlling one or more Spotify speakers from a Spotify client on the same network. Any Spotify client can act as a speaker, and the system seamlessly connects to other smart home speaker systems like Google Home.
When multiple Spotify clients connect to the same Connect session, they collaboratively control the music that plays on the clients that are acting as speakers.
It's the state of the art when it comes to built in remote control systems among the various music services. Other music services do have similar capabilities, but Spotify's is for now, unrivaled.
It's both incredibly convenient, and the most impressively disguised DRM. If two users attempt to share the same account, Spotify will helpfully make one of them a remote control for the other rather than being able to listen independently.
Without the remote control feature, it would just have to be some generic blocked message and they would see the same account sharing outrage that Netflix had.
I think the interesting tech here is that you can stream some kind of arbitrary data (in this case Spotify ) onto a USB device and present it as files, possibly executable. Sounds like something the spy world uses or wants.
This was what the Google Chromecast Audio was amazing for. £30, a fibre optic output. Then they killed it. I still have one and use it every day, and they’re fairly sought after so prices on eBay are more than twice the retail price
Mopidy does a great job, either on its own as a player of streams, MP3 files from the local drive or a NAS, or for connecting to various online services. I think you can even integrate shairport-sync to cast to it, but have only got that working on the hifiberry snapcast clients individually.
The only issue I've had with mopidy in general was getting it to work with Spotify. The API changed recently, and doesn't seem to work anymore via raspotify. I set up Tidal instead, and was good to go in ten minutes.
Also, you can send the output to snapcast and have multiple devices in separate rooms playing music synchronously.
There are various web-interfaces, or just use MPD to control the mopidy server.
I'm not sure what hifi system OP has, but another way to do this is by emulating the iPod remote mode over USB. It saves a bunch of trouble with emulating files. Denon/Marantz products have supported (and i believe still do) for a very long time
A much easier way to achieve this goal is to get an FM transmitter - a device that reads audio from Bluetooth or minijack and broadcasts it at low power over wideband FM. They cost around $10-$50.
Spotify max bitrate is 320Kbps compressed lossy audio.
If the physical buttons on your player induce euphoria with every touch and this feeling in no way is lost to hedonic adaptation... This project could be defended in the court of hackernews.
It sounds like you learned a lot during this. That is good. I am glad for you. I have done similar things. They made similar levels of sense(arguably approaching none).
Not for nothing, if you actually care about the 'fidelity' part of hi-fi... Meh... I'm glad you had fun bro. I wish I could waste such time without endless guilt. Maybe in another life.
I thought more and came back to say that you might have considered the following setup:
Employers laptop -> (if newer laptop with no 3.5mm audio, cheap USB DAC) -> 3.5mm analog -> hifi analog input -> your ears
I wouldn't waste money on an expensive DAC. As I mentioned above... 320Kbps lossy audio. No point in a crazy DAC. No point in going through hoops to use your existing DAC.
Can confirm yak shave as commented by another. Full yak shave. I looked it up.
It is going to let you stream everything on virtually any service, it has AirPlay, Spotify, Bluetooth, whatever... and it will output analog using the internal DAC or you can choose to hook up an external DAC if you like.
It's cheap, there is a simpler version, and a more feature rich version.
And if you really want to go and put something OSS together then there are Raspberry Pi equivalents.
I am very into good speakers and a good traditional amp and keeping my DAC separate and my streamer separate from that... but it doesn't have to be hacked together (though knock yourself out if you so desire) and it doesn't have to be "audiophile" expensive either. Every good stereo that served you well for many decades can continue to serve you well with a cheap external streamer.
The only place where audiophile tendencies might kick in if you really want your lossless 96/24 playback (why? you can't hear it!) and you read up and discover that actually your digital path was capped somewhere along the line (probably an older TOSLINK component at 48/20)... but still, no-one has to do this, no-one will hear the difference.
also my research says you can get an airport express gen 2, which has a 3.5mm audio plug. you can use airplay 2 to stream media to it and whatever speakers you have plugged into it.
To the people dismissing this work as a yak shave you are missing the spirit of the article. To me it shows creativity, out of the box thinking, the will to solve a problem and actually doing it and the ability to explore a field which was previously unknown to the author and yet come up with a solution.
Besides that it contains a wealth of information on related and dervative topics for future reference. Great stuff, the world needs more of this.
This is very cool, well done! What struck me the most is that I read your problem description and thought "I'd do something with some electronics", and then really liked how many different solutions there are when you're trying to solve an entirely pointless problem in the most impractical way possible.
I really want to start some sort of hackathon, like the "stupid shit no one needs and terrible ideas" hackathon. I love this kind of hacking entirely for the fun of it, and this reminds me to write up my bubble drone. We'll done OP!
I do like it. I have run my old ARCAM AVR from the optical out on my TV for nearly a decade. I can use the TV's media player, or use the TV as a second screen / audio device for my desktop.
In the latter case, Voicemeeter makes it possible to fill the house with near-perfectly synchronised sound.
In the former, I can throw and control files from my mobile, using Bubbleupnp.
Both good. But there is a big part of me that wants the amp to work on its own. Smart is most definitely not always the answer. Being unable to fiddle with a thing from your main devices can be a big QOL win. And frankly, one afternoon screaming at an Echo Dot was enough. Invasive, demanding, awkward, restrictive.
I feel that in many cases the big wins from modern tech came over a decade ago for me.
I've dropped my interest in most smart / streaming devices - too much choice, too much distraction and advertising. Smart lightbulbs, I will make an exception for - far easier than fitting old style dimmers.
66 comments
[ 4.6 ms ] story [ 128 ms ] threadWhat was wrong with plugging the laptop into the hi-fi system via the 3.5mm port or a USB DAC? Maybe I don't understand just how dumb this hi-fi system is..
[Honest question, thanks HN!]
Great work OP!
I love the pure hack value and I'm sure some of the lessons learned will prove useful since the author mentioned working on USB things in their day job, but I'm sure there's an easier way to control Spotify on one PC from another device. I think they used to even have a remote control device.
It's also good for listening to radio station streams. I've got another Echo whose microphone is on. I can ask Alexa on that or in the Alexa app on my phone or tablet to e.g. "listen to KUOW FM on Dot".
My Denon A/V receiver predates voice control support (its from 2012 or so), but it does have a network connection with a few control options (TELNET, HTTP). I've got a program running on an RPi that can use the receiver's HTTP interface to get the current input/volume/mute settings, and to change inputs, set volume, and mute/unmute.
Apple's "Shortcuts" app on Mac/tablet/phone supports a "run script over SSH" action. I've used that to make a bunch of shortcuts: "Denon Dot", "Denon TV", "Denon Game" to select some sources; "Denon Status" to get the current settings (which the shortcut speaks); "Denon Mute" and "Denon Unmute" to mute/unmute; "Denon Up" and "Denon Down" to slightly adjust the volume; "Denon Set 30", "Denon Set 35", "Denon Set 40", ... to set specific volume levels.
Saying the name of a Shortcut to Siri invokes that Shortcut.
So putting it all together, A couple voice commands to Siri on any of my Apple devices will switch the receiver to the Dot and set the volume, so it is ready for streaming radio or for Spotify, and if it is radio I want a voice command to Alexa will start that.
This has covered pretty much all my "smart" A/V needs, so I can probably happily keep using my existing receiver for quite a while.
[0] https://www.amazon.com/dp/B0BKV9GH99/
I don't know enough about the subject of this particular article to say if this is the case here, but personally I think doing something that's a poorer version of a cheaper off-the-shelf solution is a bit of a waste of time, but if they're doing something different, that's really interesting to me.
So you can run Spotify on your desktop, and control it from Spotify on your work laptop.
I think they mean the physical skip buttons on the device. By presenting it as a USB device the skip buttons can work on device.
Except that: "My main next steps, in no particular order, would be... Detecting track navigation: if you go to the previous or next tracks, emit a signal to somewhere. This would allow triggering a track change on the stream source, such as Spotify."
When multiple Spotify clients connect to the same Connect session, they collaboratively control the music that plays on the clients that are acting as speakers.
It's the state of the art when it comes to built in remote control systems among the various music services. Other music services do have similar capabilities, but Spotify's is for now, unrivaled.
- Reverse engineering and fixing a streaming app
- Bypassing anti-cheat software
- Reverse engineering and fine-tuning Asustor NAS fans
- Reverse engineering Asustor's NAS firmware
- Reverse engineering my NAS fan speed sensor (sort of)
- Reverse engineering Positivo's smart home app
- I got bored, so I hacked my TV
(speaking of yak shaving, do you know of the Yakalo¹, a cross breed between a yak and a bison?)
[1] https://en.wikipedia.org/wiki/Yakalo
Here, the author wants to do this thing, so they do it. They're not shaving yaks, they're doing the thing they set out to do.
It was a very fascinating read, too. I enjoyed how descriptive he was throughout (not exactly implementing the same thing though, haha.)
I wish there was some equivalent still available.
The only issue I've had with mopidy in general was getting it to work with Spotify. The API changed recently, and doesn't seem to work anymore via raspotify. I set up Tidal instead, and was good to go in ten minutes.
Also, you can send the output to snapcast and have multiple devices in separate rooms playing music synchronously.
There are various web-interfaces, or just use MPD to control the mopidy server.
Spotify max bitrate is 320Kbps compressed lossy audio.
If the physical buttons on your player induce euphoria with every touch and this feeling in no way is lost to hedonic adaptation... This project could be defended in the court of hackernews.
It sounds like you learned a lot during this. That is good. I am glad for you. I have done similar things. They made similar levels of sense(arguably approaching none).
Not for nothing, if you actually care about the 'fidelity' part of hi-fi... Meh... I'm glad you had fun bro. I wish I could waste such time without endless guilt. Maybe in another life.
Employers laptop -> (if newer laptop with no 3.5mm audio, cheap USB DAC) -> 3.5mm analog -> hifi analog input -> your ears
I wouldn't waste money on an expensive DAC. As I mentioned above... 320Kbps lossy audio. No point in a crazy DAC. No point in going through hoops to use your existing DAC.
Can confirm yak shave as commented by another. Full yak shave. I looked it up.
Or you can just buy one of these: https://www.wiimhome.com/wiimpro/overview (review: https://www.theverge.com/2023/2/8/23571271/wiim-mini-multi-r... )
It is going to let you stream everything on virtually any service, it has AirPlay, Spotify, Bluetooth, whatever... and it will output analog using the internal DAC or you can choose to hook up an external DAC if you like.
It's cheap, there is a simpler version, and a more feature rich version.
Or if you walk in to a HiFi store you'll probably walk out with one of these https://www.bluesound.com/products/node/ (but IMHO the WiiM is better).
And if you really want to go and put something OSS together then there are Raspberry Pi equivalents.
I am very into good speakers and a good traditional amp and keeping my DAC separate and my streamer separate from that... but it doesn't have to be hacked together (though knock yourself out if you so desire) and it doesn't have to be "audiophile" expensive either. Every good stereo that served you well for many decades can continue to serve you well with a cheap external streamer.
The only place where audiophile tendencies might kick in if you really want your lossless 96/24 playback (why? you can't hear it!) and you read up and discover that actually your digital path was capped somewhere along the line (probably an older TOSLINK component at 48/20)... but still, no-one has to do this, no-one will hear the difference.
also my research says you can get an airport express gen 2, which has a 3.5mm audio plug. you can use airplay 2 to stream media to it and whatever speakers you have plugged into it.
just bought a pair on ebay for ~$30 per
For those who want to hack a little less, I’ve found that a HiFiBerry[1] on a Pi works excellently for me[2].
[1]: https://www.hifiberry.com/
[2]: https://blog.yossarian.net/2022/11/07/Modernizing-my-1980s-s...
Besides that it contains a wealth of information on related and dervative topics for future reference. Great stuff, the world needs more of this.
I really want to start some sort of hackathon, like the "stupid shit no one needs and terrible ideas" hackathon. I love this kind of hacking entirely for the fun of it, and this reminds me to write up my bubble drone. We'll done OP!
In the latter case, Voicemeeter makes it possible to fill the house with near-perfectly synchronised sound.
In the former, I can throw and control files from my mobile, using Bubbleupnp.
Both good. But there is a big part of me that wants the amp to work on its own. Smart is most definitely not always the answer. Being unable to fiddle with a thing from your main devices can be a big QOL win. And frankly, one afternoon screaming at an Echo Dot was enough. Invasive, demanding, awkward, restrictive.
I feel that in many cases the big wins from modern tech came over a decade ago for me.
I've dropped my interest in most smart / streaming devices - too much choice, too much distraction and advertising. Smart lightbulbs, I will make an exception for - far easier than fitting old style dimmers.