Live data from Hacker News

Reverse-engineering my speakers' API to get reasonable volume control

jamesbvaughan.com

11–20 of 144 posts

Re: Reverse-engineering my speakers' API to get reasonable volume control

#11
post #8

Why do speakers even expose a web api in the first place? It’s just easily available without any security? Hope this person segmented this device away from other devices. The lack of basic security in the IoT space is astounding to me.

It is concerning. On this particular model, it's available over plain HTTP, provides no auth settings, and provides an easy input for uploading new firmware.

https://jamesbvaughan.com/volume-controller-1/basic-web-inte...

Re: Reverse-engineering my speakers' API to get reasonable volume control

#12

This runs in your laptop? Very interesting.

For now, yes. I'd also like to make a standalone wireless physical volume knob and I may try to make an iPhone app for it. Ideally I'd be able to override the behavior of the volume buttons, similar to how Spotify is able to do that on iPhones when you're using Spotify Connect.

Re: Reverse-engineering my speakers' API to get reasonable volume control

#14

That position of the couch infuriating! And yes I bet you moved that lovely looking couch back after the photo :)

Don't worry - that couch isn't for listening :)

I've got a very comfy and intentionally positioned chair on the other side of the room for that.

Re: Reverse-engineering my speakers' API to get reasonable volume control

#15
post #3

While I’m all for physical controls, especially ones that self-adjust to reflect the state of the remote device at all times, I wonder if the author just doesn’t know you can finely adjust volume in iOS control center by force/long pressing and then dragging.

This is a great point! When I'm using AirPlay, that feature is really useful. I'm more often using Spotify Connect though, where I'm limited to either using the physical volume buttons on my phone, the small slider in the desktop app, or the slider that's many clicks in to the Spotify mobile app. In reality though, this project is more about the fun of it than about it being a really pressing need.

It also works when using Spotify Connect on your iOS device. If you can use your volume buttons to control it you can also adjust it with the slider in the control centre.

Re: Reverse-engineering my speakers' API to get reasonable volume control

#16

Earlier quoted context omitted.

This is a great point! When I'm using AirPlay, that feature is really useful. I'm more often using Spotify Connect though, where I'm limited to either using the physical volume buttons on my phone, the small slider in the desktop app, or the slider that's many clicks in to the Spotify mobile app. In reality though, this project is more about the fun of it than about it being a really pressing need.

It also works when using Spotify Connect on your iOS device. If you can use your volume buttons to control it you can also adjust it with the slider in the control centre.

You're correct, TIL!

That's really helpful to know. At this point though, I'm excited enough to build a volume knob that I'll probably still do it.

edit: After trying this out it a bit, it's definitely an improvement over the small sliders and a huge improvement over the stepped volume changes from the buttons, but I'm still left wishing I could make use of more than ~10% of the slider's full range.

Re: Reverse-engineering my speakers' API to get reasonable volume control

#17
post #6

I know it is tangential, but this about his old system caught my attention: With that system, I could set the amplifier’s analog volume knob such that the max volume out of the streamer corresponded to my actual maximum preferred listening volume, giving me access to the full range of Spotify or AirPlay’s volume controls. Assuming an analog input, this might result in a noticable quality reduction at low volumes.

Reducing excessively before the DAC and high gain after the DAC is far more likely to result in quality reduction, due to quantization error. Having reasonable levels before the DAC and just the right amount of gain after the DAC (e.g., via an amplifier's attenuator setting) is the best possible scenario. So TFA's prior setup may have been superior in this regard, depending on how the digital volume control on the ne…

We really don't want to be touching the digital signal. The state of the art is to change the DAC reference level, putting the DAC output at the sweet spot for the analog stage for any given ultimate output level.

Re: Reverse-engineering my speakers' API to get reasonable volume control

#20
> Those methods either give me a tiny slider that I can only use 10% of or about 15 steps where the jump from step 3 to step 4 takes the speakers from “a bit too quiet” to “definitely bothering the neighbors” levels.

Volume controls need to be logarithmic, not linear.

To a first degree approximation, everybody gets this wrong.

Post reply on HN