8 ms·
How-to normalize home volume levels with Node-RED
- SparkyMcUnicorn 6y agoI've been doing a lot with Home Assistant lately, and lots of things that play nicely like node-red. Does anyone have a set up to manage music service playback to media players like Google Home (or I guess it's Nest now) speakers? It would be fantastic to start playing music via Spotify from the dashboard, or based on events and node-red flows. Not sure if the new forked-daapd integration will help me out here, but last time I tried to work with MPD specifically (unrelated project) I ran into walls left and right trying to get something working.
- niemyjski 6y agoYou can kind of do this with the mini-media-player and Spotify card. I guess I need to do a write up on this. It doesn't work the greatest unless you have audio groups setup. You could define a scene with the speakers and playlist you want to play as well.
- godot 6y agoI know this article is about Alexa/Echo, but I wish a feature like this is built into TVs :) I have a young kid now and she's in bed by 8:30. I'd like to watch TV in the living room in the evening after her bed time. I want to watch a movie like say, Avengers. I want to listen to the dialogue instead of/in addition to reading subtitles. The problem is in most movies, you have low volume dialogues, and then there's explosions and stuff with high volume (intended effect; which is nice at the theater, but not nice with a kid sleeping in the next room). I don't want to wear headphones. So I end up with a remote in hand, keep adjusting the volume high or low on reaction as quickly as my reflex allows me to.
- SparkyMcUnicorn 6y agoThere are a bunch of different ways to do exactly this. Definitely would be nice if it was a built-in feature. Just have to hook up a mic to listen, and tune the audio level results so it's somewhat smart. For TVs that connect to your network, there might be a built-in integration, or you can keep it simple and write API calls yourself in node-red. If you have a dumb TV (not internet connected), then you'll probably be limited to solutions involving IR Trasmitters via MySensors[0] or EspHome[1]. [0] https://www.mysensors.org/build/ir https://www.mysensors.org/build/ir [1] https://esphome.io/components/remote_transmitter.html https://esphome.io/components/remote_transmitter.html
- cgriswald 6y agoYou want dynamic range compression, which will quiet explosions and louden whispers, usually at the expense of some minor audio quality. It’s probably already in your TV, cable box, or whatever other device.
- ZeroGravitas 6y agoThere's often also explicit human voice boosters too.
- IanCal 6y agoThere may already be something built in (as another commenter noted) but this is also a feature sold in soundbars, here's the page for it for sonos https://support.sonos.com/s/article/1948?language=en_US https://support.sonos.com/s/article/1948?language=en_US
- strogonoff 6y agoThe article is not about sound level normalisation, despite the title (which confused me), but rather about automating and/or synchronizing volume levels across speakers with presets invoked based on time of day or other conditions. It’s also not so much about Alexa but about Node Red, I believe Alexa is just one possible source of sound in the whole system.
- detaro 6y agoIf you have/can use external speakers, there's devices to put in the audio line to do this if your devices can't do it.
- mikeyjk 6y agoI find this an issue with nearly every TV show or movie ever made. The intro music is typically far too loud, and as you say dialogue is significantly quieter than the action scenes. I basically have to watch with the remote in my hand. I've considered making a bastardised IR Arduino/raspberry pi remote based on sound levels. But of course I can never muster the motivation and don't have practical experience.
- xsmasher 6y agoIf your center channel speaker was broken or misconfigured, it would have exactly this effect. Most dialogue comes through the center channel. Also if one speaker was connected backward it would cancel out part of the mix.
- mikeyjk 6y agoThat's interesting, thank you. I do suspect for some media it's just that they expect me to listen to action scenes/intro jingles louder than I want to (maybe assuming a bigger room / TV further back?) But I will keep that in mind - can't rule it out, my TV is pretty old, haha
- Domenic_S 6y agoApple TV has this built in, called "Reduce Loud Sounds". Various external sound systems can do it, too.
- JamesSwift 6y agoI generally have the opposite problem on my AppleTV... I have to crank HBO/Netflix _way_ up to get a reasonable audio level.
- anamexis 6y agoIn addition to what others have mentioned, many A/V receivers have this feature as well. It's often called something like "night mode".
- jjjensen90 6y agoIt's probably more of an investment than other replies to your comment, but having a receiver with at least a center channel and left/right speakers does wonders to level the volume between dialogue and other sounds. My receiver even has a dialogue setting which emphasizes the human vocal frequencies on the center channel.
- lostlogin 6y agoThis makes me pause before going to a movies (especially when combined with the other 99 downsides). The dialogue there is normal to loud, and the loud parts are so loud it hurts. Do people want it like this?
- RNCTX 6y agoIt baffles me that more people have not found and found uses for Node Red. It's one of the coolest utilities that I've stumbled across in the past 5 years. In a sane world there would be no more Zapiers and IFTTT because of it, at the very least.
- lukifer 6y agoIt's got the AppleScript problem: incredibly close to pro-sumer zero-code development, but in practice still requires some prior tech knowledge. I'd love to see pre-packaged Node-RED binaries for Mac and Windows. Requiring an install via Terminal / package manager is going to lose a lot of potential users right at the start. That said, I absolutely adore Node-RED. It's the most powerful and intuitive GUI-based development system I've ever seen, without sacrificing the ability to go down to the metal when it's needed.
- RNCTX 6y agoI think their biggest oversight was not having all of the core programming functions that we take for granted (loops in particular). They have core nodes for if/else and breaks, but you have to go find a third party implementation for while/for loops. There's a third party set of nodes called "action flows" that does a pretty good job of implementing for/while loops, but it's not trivial to just install and use, you have to learn its conventions to use it properly. I gotta think most developers would install it, poke around for awhile, see that there's no obvious way to implement a loop, and throw it away when they don't find one.
- johntash 6y agoI've been using Node Red for automation using home assistant (instead of their built-in automation) and generally like it. I'd like to use it more like IFTTT, but haven't really found any good uses so far since I was never a fan of IFTTT and connecting all my various accounts to one service. Do you have any examples of what you use it for?
- RNCTX 6y ago
- tunesmith 6y agoAnd then you have devices like the seemingly-cool Sonos One, that has two different internal volume levels, one for Alexa, and one for the music, and they're wildly different. And there doesn't appear to be any way to normalize them. Maybe you could use this to hack it by adjusting volume levels immediately before and after any music is played.
- rcarmo 6y agoI've been using Node-RED for a few years now, and I can automate my LG TV's volume (handy for when the kids punch it up for cartoons) and control it via Siri (which is wired into Node-RED). One of the medium-complexity things I do with it is check the iOS App Store prices for apps I'm interested to get notifications when they're discounted, but all my home automation runs on it, and this post has links to most of the series: https://taoofmac.com/space/blog/2019/01/13/1900 https://taoofmac.com/space/blog/2019/01/13/1900 I also maintain my own Node-RED docker images for ARM and Intel: https://github.com/insightfulsystems/node-red https://github.com/insightfulsystems/node-red
- andrepd 6y agoI don't get the fixation on wiretapping one's home for marginal convenience gains.
- function_seven 6y agoThis blog post happens to use Echos to play the music. That's not the interesting part, though. Home Assistant and Node-RED are the cool bits, and they're completely local network services; no wiretapping required. I've done a lot of automation using HA and Zigbee and Tasmota devices, and it's been awesome. I have no cloud I rely on for anything. When my Internet service goes down seemingly every night at 12:30am, I'm glad I can still control lights, alarms, etc.
- niemyjski 6y agoYou can also use a slightly modified version of these sub flows to mute all Alexas of which I do. I try to do everything local behind a firewall. There is just somethings like Spotify / speakers / mic that is really hard to do / very few products that work local only.