/visualization.wavforhue

WavforHue visualization addon for Kodi

Primary LanguageC++GNU General Public License v3.0GPL-3.0

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.

I'm actively seeking input on how to improve this visualization. You may help me by discussing your ideas at http://forum.kodi.tv/showthread.php?tid=217183.

---

Update 20160229: 
- v1.0.0!
- Settings: Easy pairing with the Hue Bridge
- Settings: Easy light configuration
- Settings: Restore lights to previous state
- Settings: Debug mode
- Bug fixes: Window 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.

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 preprossor 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: 
-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: 
-Apply the slick Hue Bridge pairing used in the script.xbmc.hue.ambilight addon.
-Figure out how to do .deb packaging.
-Fix Windows bugs.

---

Old video of the effect (no more jerky motion from the waveform: https://www.youtube.com/watch?v=Yc7vfwCW5mQ

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. 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

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

v1.0.0 Binaries for everything except Android: https://github.com/hardyt/visualization.wavforhue/releases/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.wavforhue/releases/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.wavforhue/releases/tag/v0.0.2
Note: These binary zips now include skin.confluence-full. You can Install this skin and enable it to achieve a nice effect of the visualization going full screen immediately upon play. You can do 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>