ESP-MQTT-JSON-Digital-LEDs icon indicating copy to clipboard operation
ESP-MQTT-JSON-Digital-LEDs copied to clipboard

adding simple music visualizer

Open hamidzr opened this issue 6 years ago • 12 comments

Are people insterested in having this music visualizer added as an option to the list of effects as an option? it would require that you also add a 1$ sound detector to your setup.

hamidzr avatar Apr 24 '18 23:04 hamidzr

But how do you add the code ? I dont think it will work as an effect

encor50 avatar Apr 25 '18 00:04 encor50

i've already merged it with my own use it's possible I can clean it and make a pull request if @bruhautomation thinks this repo is a good place for it.

hamidzr avatar Apr 25 '18 05:04 hamidzr

Can you send me your code ? On pastebin or so ? If you want here is my code https://github.com/bruhautomation/ESP-MQTT-JSON-Digital-LEDs/issues/32#issuecomment-336731495

encor50 avatar Apr 25 '18 09:04 encor50

thanks. why didn't you fork and make a PR from it? I will prepare and share it when I get a chance. weekend at the latest.

hamidzr avatar Apr 25 '18 22:04 hamidzr

I forked the repo and added in my changes. it's available at my fork. I'll clean up the code and make a pull request once @bruhautomation approves

I'm not home so I can't test if I did this correctly. But I am using this at my apartment so it's doable. Let me know if it works for you

hamidzr avatar Apr 25 '18 22:04 hamidzr

I implemented it into my code, but when I set it to the visualizer effect in HomeAssistant the ledstrip just turns off and when I turn it on again it's solid. I can't find out where it goes wrong.

roandegraaf avatar Apr 29 '18 13:04 roandegraaf

do you have a sound detector attached and working properly?

hamidzr avatar Apr 29 '18 15:04 hamidzr

Yes, I tested it on another Arduino and the sound detector does work.

roandegraaf avatar Apr 29 '18 15:04 roandegraaf

I assume you also defined the port in the code properly. This is the exact code i'm using in my own setup (minus the passwords, IPs, sensor name and mqtt topics) https://pastebin.com/tXGJb28X take a look and see if it helps. If you managed to find out whats missing from my fork let me know so I can update it.

If you still failed to make it work I encourage you to take a look at the original music visualizer's repo and get that to work first then come back to this.

hamidzr avatar Apr 29 '18 15:04 hamidzr

Thank you so much! I'm not home the next two days but when I get home I'll check if I can get it working

roandegraaf avatar Apr 29 '18 17:04 roandegraaf

@gfhoihoi72 could you get it to work?

hamidzr avatar May 25 '18 19:05 hamidzr

I have implemented a music visualizer in my fork. https://github.com/cyanlabs/ESP-MQTT-JSON-Digital-LEDs

Fma965 avatar Dec 26 '18 18:12 Fma965