5 ms·
Show HN: I connected my house lights to video games
- patrickk 10y agoVery impressive. In a similar vein, here's a DIY Ambilght clone, which you can customise to fit different sizes of screen via software and a raspberry pi: http://www.instructables.com/id/DIY-Ambilight-with-Hyperion-Works-with-HDMIAV-Sour/?ALLSTEPS http://www.instructables.com/id/DIY-Ambilight-with-Hyperion-...
- iverjo 10y agoCool project! As many games lack APIs, you could potentially analyze the raw audio and the graphics in real time, and use machine learning for detecting certain events, such as goals in rocket league
- StavrosK 10y agoHmmm, good idea, I didn't think of analyzing the sound. You can pretty easily tell when the "boom" goal sound plays, but not who scored. Maybe you can tell the latter by reading the screen, though. I will have a play when I get back home, although I still need to find a quick method to take screenshots in Windows.
- jdironman 10y agoBrace yourself, Ctrl+Print Screen. I'm just messing with you, I don't know a quick method myself.
- daeken 10y agoThis one is actually way easier than Super Hexagon! You can use a memory cheat tool to look for the current scores, then watch for changes in those addresses. I'd be happy to hunt that down and write up an implementation if you want; I'd love to have the Hue lights in my theater change for Rocket League.
- StavrosK 10y agoThat's actually a great idea! Do you want to email me? My email is in my profile.
- deleted 10y ago[deleted]
- nsedlet 10y agoI've been working on a weekend project to make lights that react meaningfully to music, by taking into account beats and chords. Here's a video of it: https://www.youtube.com/watch?v=h5sRgSmRGpg https://www.youtube.com/watch?v=h5sRgSmRGpg It uses chordify.net to extract the beats and chords from the song. Code is here: https://github.com/nick264/music-processor-master https://github.com/nick264/music-processor-master
- StavrosK 10y agoThat looks fantastic, how do you synchronize the music with the lights? Presumably chordify doesn't return time information?
- nsedlet 10y agoYes Chordify has time information - it's pretty accurate too, and works for folk, rock, classical, whatever. It's just a matter of timing the lights with the audio output. My setup is a Raspberry Pi as a master, and an Arduino to talk to the lights (which is necessary because the RPi's pins are too slow to send signals to an addressable LED strip). The RPi sends chord and beats in real time as they happen, over USB. Every few seconds it syncs the light show clock with the audio player clock.
- aardshark 10y agoFor reading directly from a program's memory, have you tried using Cheat Engine/scanmem to find the location of the variables you're looking for? I think that'd be easier than using IDA.
- StavrosK 10y agoYes, I tried that too, but it's hard for me to find the location of something like a color, which changes every frame. I know that people have done it, I'm just not aware of an efficient way to find something that you don't know the value of or how it changed. If you have any tips, please share, because that would be very useful for this project.
- gridspy 10y agoA combination of the python pixel capture and memory scanning (for the captured value) could work here.
- zabaki 10y agoI find it amazing how he has hacked all of this. Well done. As a non-hacker some of the similar results i've found has been philips hue and lightpack (https://www.kickstarter.com/projects/woodenshark/lightpack-2-ultimate-light-orchestra-for-your-livi https://www.kickstarter.com/projects/woodenshark/lightpack-2...)
- StavrosK 10y agoIt wasn't actually that hard (or at least the learning curve was smooth), I only have a few months' experience with hardware. Plus, it was extremely fun!
- stevenou 10y agoneat! i was just looking at the dreamscreen a few days ago (https://www.touchofmodern.com/sales/dreamscreen/dreamscreen?open=1 https://www.touchofmodern.com/sales/dreamscreen/dreamscreen?...) but the lightpack2 looks even more elegant/smooth in the way it reacts. it even has the "pixels" that add an interesting element...
- famfamfam 10y ago> Ideally, the games themselves would have some sort of API, or some other way to either communicate what’s happening in the game so I can map colors to it A number of games implement Mumble Link (https://wiki.mumble.info/wiki/Link https://wiki.mumble.info/wiki/Link) which provides a memory-mapped file that includes positional data used to provide directional sound by voice-comms software (so when a teammate speaks you hear their voice as if you were both in your relevant locations in the shared virtual space). Some games also expose other data through this including health/mana/ammo levels which could be used to control lighting based on game state.
- StavrosK 10y agoAha! That's very interesting, thank you. I had no idea this was a thing, but it looks like I can use it for some interactions. I'll explore further, thanks again.
- showerst 10y agoAt least some games interface with fancy mice and keyboards to change the colors and pulse. Maybe the author can tap into that data? https://www.reddit.com/r/gaming/comments/4iplar/til_overwatch_makes_deathadder_chroma_change/ https://www.reddit.com/r/gaming/comments/4iplar/til_overwatc...
- StavrosK 10y agoThat's another great idea. I'm looking for a Razer Chroma API, not much luck yet, but their site[1] seems to have some info. Of course, they're going to make it much easier for you to tell their keyboard what the color should be than to read that color... [1]: http://developer.razerzone.com/chroma/ http://developer.razerzone.com/chroma/
- anexprogrammer 10y agoThere's been quite a few people exploring logitech gaming keyboards with LCD (G19 etc), adding pidgin plugins, games widgits etc. Maybe you can get enough from github to figure out what you need? Or there's Roccat's power grid which interfaces games to a phone app. No idea how open or investigated that is though.
- deegles 10y agoI'm building a 100w RGB LED light show that will also be controlled with the ESP8266. The software will just receive UDP packets and maybe do a bit of interpolation if necessary. It's a bit trickier since I need to drive them at ~30v and 1 amp per channel :)
- StavrosK 10y agoHmm, probably not too much trickier, my controller was designed for 1 amp per channel as well, although at 12V... I'm guessing your leds will be individually addressable, though? Or maybe you'll just have more controllers. Either way, it sounds like a lot of fun!
- alimbada 10y agoReminds me of Microsoft Illumiroom: https://www.youtube.com/watch?v=L2w-XqW7bF4 https://www.youtube.com/watch?v=L2w-XqW7bF4
- mplewis 10y agoNext time, you should try some addressable LEDs. Neopixels, aka WS2811/12/12B, let you set the colors of individual bulbs instead of the entire strand. They work great with ESP8266! https://blog.adafruit.com/2015/06/30/updated-neopixel-support-for-esp8266-and-arduino-zero/ https://blog.adafruit.com/2015/06/30/updated-neopixel-suppor...
- StavrosK 10y agoNeoPixels are great, but they're ten times more expensive than this strip, unfortunately...
- Fej 10y agoYeah, I remember Adafruit pushing NeoPixels for a while. I'm sure the margins are pretty high.
- nemik 10y agohttps://www.amazon.com/ALITOVE-WS2812B-Individually-Addressable-Waterproof/dp/B00ZHB9M6A/ https://www.amazon.com/ALITOVE-WS2812B-Individually-Addressa... are perfectly cromulent LEDs and less expensive than Neopixels. Not as cheap as the RGB strips, but if you pick off more points for colour analysis, you could adjust them along the edges, if you really wanted to. Nice work on the project!
- StavrosK 10y agoOoh, that's much cheaper, thanks! I'll order one and play around, it should be much better for an Ambilight-style display as well, thank you.
- agumonkey 10y agoNow play Resident Evil with such setup ;)
- chatmasta 10y agoWould it be possible to implement some sort of "HDMI proxy" using something like the raspberry pi? You would plug the HDMI input (e.g. from xbox) into the raspberry pi, and then another HDMI cable from the raspberry pi to the TV. The raspberry pi would then somehow read the input stream, parse the bits to get the color you want, and forward the input stream unmodified to the output. I have no idea how HDMI works, so I don't know if this is even possible. Would you see a degradation in quality even though you are not re-rendering anything? i.e. Can you do this without a high powered graphics card acting as the HDMI proxy? Is it even possible to intercept HDMI stream, or is it a proprietary protocol? EDIT: Some good info here [0]. tl;dr, seems possible with < $200 hardware. [0] http://stackoverflow.com/questions/32290289/rasberry-pi-hdmi-input-hdmi-output-for-image-processing http://stackoverflow.com/questions/32290289/rasberry-pi-hdmi...
- deleted 10y ago[deleted]