• 1(current)
  • 2
  • 3
  • 4
  • 5
  • 8
  •   
WavforHue - a music visualization for Philips Hue lights
#1
Thanks for all the help to get to this stage. This visualization is a heavily modified version of WaveForm. It adds the ability to send beats and rotating color effects to Philips Hue lights. The purpose of this thread is for comments related to the addon.

---
Update 20160401:
- I recompiled the Ubuntu binaries with Isengard. They should both now work with Isengard, Jarvis, and Krypton. Previously I had compiled against Krypton and didn't realize that made the addon incompatible with older versions.

Update 20160229:
- v1.0.0! Binaries available for Android (x86 and arm), Windows x86, Ubuntu x86 and 64-bit (Krypton only), and OpenELEC 6 all flavors. If someone wants to compile and test this on their Apple products, I would appreciate the development help.
- Settings: Easy pairing with the Hue Bridge
- Settings: Easy light configuration
- Settings: Restore lights to previous state
- Settings: Debug mode
- Bug fixes: Windows multithreading works after switching to Winsock2
- Refactoring: Logging now works in python and c++ code
- Known bugs: Transitioning menus is sometimes slow due to the Hue communication. Logging does not work in Android. Using the OpenELEC settings while this visualization is active crashes Kodi.

Update 20160222:
-v0.0.3 multithreading is 99% working for OpenELEC 6 (imx6, RPi, RPi2, WeTek Play, x86_64) and Kodi Isengard for Ubuntu x86 and 64, and Android arm. The binaries are at the link below.
-I refactored the code. I'm now not totally embarrassed that others see it.
-Known bugs
-OpenELEC seems to crash Kodi when switching back from the OpenELEC settings screen.
-I don't know what's wrong with Windows. Building a binary addon with cURL in Windows is hell (_WINSOCKAPI_ buried in the preprocessor directives.. why??). Use v0.0.2 for now for Windows.

Update 20160208:
-Took advantage of the cmake version ironic_monkey offered. The URLs below are updated to reflect the new branch.
-Made this work with OpenELEC's build system. Now you should be able to build this for most platforms! Download package.mk from the source link. Then place it in OpenELEC.tv/packages/mediacenter/kodi-binary-addons/visualization.waveforhue.
-Made the name more uniform - WavforHue / visualization.wavforhue (eliminating the first 'e'), it wasn't consistent until now.
-Updated the icon to match the name.
-Made a minor update to the code that was generating a warning.
-Huge update for me! - visualization.waveform (on which this plugin is based) has a 1/4 flat waveform when used on a Cubox with HDMI audio out selected. I added an option in the visualization settings to adjust for the problem if desired. It's just a workaround. Rudi from the Solidrun forums identified the problem and has a patch here: https://github.com/OpenBricks/openbricks...ation.diff
-Implemented a ton of new settings for what happens after the music stops and which lights to dim. Generally this addon is sending so much traffic to the Hue Bridge that only three lights can really be actively changing. More than that and the curl library starts hanging up on waiting for the Hue Bridge to respond. That causes a jerky waveform and possibly stuttering music. This will happen regardless of your hardware. It's a Hue Bridge / network limitation.

Todo:
-Figure out how to do .deb packaging.
-Possibly speed up Kodi navigation transitions. This requires another complete refactoring of the code into two addons. I'm not ready to tackle this yet.
-Allow for saving presets with different colors and light configurations.

---

Video of the effect: https://youtu.be/vZYE5RDOuGc

Setup instructions for v1.0.0
1. Install the plugin from the zip or build/install it yourself from the source.
2. Go to System->Settings->Add-ons->My Add-ons->All->WavforHue
3. Configure
4. Setup tab
5. Hue Bridge Registration will walk you through the entire setup.
6. Adjust other settings in the Lights and Behavior tabs as desired.
7. Play a song and select the WavforHue visualization.

Setup instructions for < v1.0.0
1. Install the plugin from the zip or build/install it yourself from the source.
2. Play a song and select WavforHue as your visualization
3. Open the settings screen
3a. Set the IP of your bridge
3b. Set the number IDs of your lights (no spaces, separate light names with commas). These numbers can be found in your Hue mobile app under Settings -> Lights. You'll see all your lights listed. The number next to them is the number this addon requires.
3c. Get out of the settings screen
4. Press the Hue bridge button.
5. Play another song. This will register the addon with the Hue Bridge.
At this point the bridge and the plugin should be paired
6. If the lights don't start reacting, check your light ID numbers or trying stopping and playing another song.

Source: https://github.com/hardyt/visualization.wavforhue

v1.0.0 Binaries: https://github.com/hardyt/visualization....tag/v1.0.0
v0.0.3 Binaries for Android arm, OpenELEC 6 (all platforms), Ubuntu x86 and 64-bit: https://github.com/hardyt/visualization....tag/v0.0.3
v0.0.2 Binaries for Windows, Ubuntu 32 and 64-bit, and OpenELEC (imx6, WeTek Play, Raspberry Pi, RPi2, and generic x86_64): https://github.com/hardyt/visualization....e/releases

In the releases is a skin.confluence-full.zip addon. You can Install this skin and enable it to achieve a nice effect of the visualization going full screen immediately upon play. Or you can achieve this manually by placing Custom_MusicFullscreenEnabled.xml in your kodi/addons/skin.confluence/720p folder (or the equivalent for the skin you are using). The contents of that xml file are:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<window type="dialog" id="3001">
    <allowoverlay>no</allowoverlay>
    <onload condition="!Window.IsActive(visualisation)">FullScreen</onload>
    <visible>Player.HasAudio</visible>
    <controls></controls>
</window>

Note from a member that installed WavforHue on a Sony Android TV:
Quote:I opened Kodi APK and copied over the plugin into the APK then used "One Click Apk Signer" to sign it. Reinstalled Kodi on the device. Once installed, for some reason the hue bridge configuration doesn't work - so I copied the settings.xml from the previous time I was able to pair the bridge with the plugin and copied that over to the addons folder manually.
Reply
#2
I have my hue lights packed away because of our temporary premises difficulty (ref earthquakes, christchurch). However I look forward to trying this when we get back to our house.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#3
file doesn't work for me (windows)
https://github.com/hardyt/xbmc/blob/Heli...ntux86.zip


the zip file is empty or no way to download ?
Reply
#4
Im not sure how i add this. Is it possible to make it like an addon, so i can download it as a zip and install it? Or get a little more descriptive guide how to install it?
Either way thanks for making it, wish there was more Phillips hue addons, only just one other out there and since it's about a year since it was updated it think there could be done more to it.
Reply
#5
The links were working when I posted the files, but I'll be honest, I have no idea how github works and now it's just showing me a stupid looking pink unicorn. I'll figure out somewhere else to upload the binaries.

@Kiggerbare: it is a zip addon for OpenELEC imx6 (CuBox), Windows, and Ubuntu.
Reply
#6
Ok, when you click on the links for binaries you can click on "View Raw" and the zip downloads. Then you can install the zip like any other addon. Grab the right flavor for your machine/distro.
Reply
#7
and can you tell us how it should works ?

i have enabled it, but when i play music with the vaweforhue vizualisation effect, there is nothing on the led. there is no configuration for identifying the bulb ?

I use XBMC Hue addon at the same time for video and it works
Reply
#8
(2015-03-30, 13:02)fabd Wrote: and can you tell us how it should works ?

i have enabled it, but when i play music with the vaweforhue vizualisation effect, there is nothing on the led. there is no configuration for identifying the bulb ?

I use XBMC Hue addon at the same time for video and it works

1. Install the plugin
2. Play a song and select WavforHue as your visualization
3. Open the settings screen
3a. Set the IP of your bridge
3b. Set the names of your lights (no spaces, separate light names with commas)
3c. Get out of the settings screen
4. Play another song and within 30 seconds hit the bridge's button
At this point the bridge and the plugin should be paired
5. Play another song and the lights should be reacting to the music and shifting colors

Please let me know if that works/doesn't work for you.

Someone else did get this to work, so it is possible!
Reply
#9
What i did (and it's not working):

1. Install the plugin
2. go to Settings>Music>Playback and select WaveforHue as your visualization
3. Open the Settings>Add-ons>Enabled Add-ons> Visualisation> WaveforHue> Configure
3a. Set the IP of my bridge
3b. Renamed my lights in Hue "LeftTv and RightTv" since before they had spaces in them and then put in the names like "LeftTv,RightTv" To make sure there are no spaces.
Image
3c. Left the settings screen
4. Open SpotiMC and play a song while hitting the bridge's button several times with no luck.
5. Play another song and still nothing. Undecided
Reply
#10
To troubleshoot any Hue app you can use the CLIP debugger built into your Hue Bridge by going to:

http://<bridge_ip>/debug/clip.html ... in your case http://192.168.1.55/debug/clip.html

In the URL field type /api/KodiVisWave and hit Get. If in fact you pressed the bridge button within 30 seconds of playing a song with this visualization enabled (i.e., you saw a waveform changing colors and moving to the music) then you should see a bunch of output. If you see anything about "unauthorized user" than there is something blocking the registration of the plugin with your bridge.

If you do see a bunch of stuff the first thing you see is lights and then the name of the first light. What's the name? Is it "1" or is it LeftTv?
Reply
#11
I see a bunch of Output.
And when you say first light and second light, you don't mean witch bulb are number 1 and 2 right?
I got 7 bulbs and 1 lightstrip.
So when i look in my Hueapp i can see that RightTv is number 2, and LeftTv is number 7.
Here is the response i got btw.
http://pastebin.com/mg5hEzLA
Reply
#12
(2015-04-22, 08:44)Kiggerbare Wrote: I see a bunch of Output.
And when you say first light and second light, you don't mean witch bulb are number 1 and 2 right?
I got 7 bulbs and 1 lightstrip.
So when i look in my Hueapp i can see that RightTv is number 2, and LeftTv is number 7.
Here is the response i got btw.
http://pastebin.com/mg5hEzLA

Use the Hue numbered names. I.e., type "2,7" into the Names of Hue Lightbulbs. I'll look into how to address the bulbs by their Name attribute next week... But for now, the plugin needs the Hue internal names (1,2,3,4,5, etc).

Try it, it will work! Smile Thanks for finding this bug.
Reply
#13
Thanks alot, it's working now.
Only reason i renamed it and did it by name was that i thought that you only had a startkit and those was just standard name and called 1-3.
So no need on my end to change it up so you can use the names. But it's a great addon, and i'm sure a lot more are going to use it if it was a little more user friendly.
Thanks once more for the support. Smile
And a Video of how it looks.
https://www.youtube.com/watch?v=5P4GxlHyfMI
Reply
#14
(2015-04-26, 08:20)Kiggerbare Wrote: Thanks alot, it's working now.
Only reason i renamed it and did it by name was that i thought that you only had a startkit and those was just standard name and called 1-3.
So no need on my end to change it up so you can use the names. But it's a great addon, and i'm sure a lot more are going to use it if it was a little more user friendly.
Thanks once more for the support. Smile
And a Video of how it looks.
https://www.youtube.com/watch?v=5P4GxlHyfMI

If you could give me a list of what would make it more user friendly I'll give it a shot. I have lots of downtime next week.

Some things I was thinking of:
-better connection process.. maybe instead of showing the waveform, show instructions until the link is made?
-query the names of the lights and let the lights be selected individually.. not sure if the settings api can handle that.. any other way you can think of making light selections easy?
-It would be nice if the lights sync'ed better.. I play around more with the beat detection

What else?
Reply
#15
Well if you could query the name of the lights and make people choose it would be a lot easier.
Or perhaps incorporate a way like in the official hue app when you select a bulb or lightstrip in settings, it will slowly dim and "undim" so you know what light are in use.
Perhaps you could do that with a "test" in settings, make those lights you got flash, so you are sure it's the correct lights, and make the bridge link in settings right there and then.

Also i'm not sure what the rules are, but i'm pretty sure that your addon qualifies for the official repository, so perhaps you could get it there, so it would auto update when you make any changes to it.

Also perhaps instead of just being the one waveform you could make an addon just for visualization where you could choose between 2-3 different ones, and all working with Hue, but i guess that's not making it more user friendly and more new features for some other time.

In short, you should focus on an easy way to choose bulbs, and try get the addon on the official repository.
I'm no help at making them, but if you should need a tester let me know.
I'm subscribed to this thread anyway, and answer as soon as i see the mail. Smile
Reply
  • 1(current)
  • 2
  • 3
  • 4
  • 5
  • 8
  •   



Logout Mark Read Team Forum Stats Members Help
WavforHue - a music visualization for Philips Hue lights0
This forum uses Lukasz Tkacz MyBB addons.