Skip to content

Hue+ #84

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 7 commits into from
Closed

Hue+ #84

wants to merge 7 commits into from

Conversation

Bl4d3s
Copy link
Contributor

@Bl4d3s Bl4d3s commented Feb 10, 2017

Adds functionality for the HUE+ with Aer RGB fans (possibly with LEDs too, as I dont have any I cannot test it)

Syntax in the settings.txt: hueplus=port,channel,num_leds
channel: 0,1,2 | 0 means both channels
num_leds: foreach fan you have connected times 8, so 3 fans -> 24

IMPORTANT: Do NOT add more than 5 fans per channel.

If you have 4fans on channel 1 and 3 fans on channel 2, you have to count only the fans on the channel with the most fans, so in this case channel 1. So you have 4*8=36 leds. Instead of a total of 60

@CalcProgrammer1
Copy link
Owner

CalcProgrammer1 commented Feb 11, 2017

Nice work! I'll review it tomorrow. I will probably squash your commits and clean up the tab/space issues first but it's definitely going to be merged. I'll also copy your hueplus code into the KeyboardVisualizerQT main.cpp which will allow it to work on Linux. Nice work on figuring out the channels and the LED protocols. This will help a lot of people I'm sure, as it seems the Hue+ is ridiculously popular.

Any chance you could take a short video of it in action? I'm curious as to what RGB fans look like reacting to music. might have to include some in my next rebuild (RYZEN HYPE TRAIN CHOO CHOO).

@Bl4d3s
Copy link
Contributor Author

Bl4d3s commented Feb 11, 2017

Yeah I can do that :) Just the speed of the reaction is not as smooth as with other leds :/

Here it is: https://youtu.be/0m0ZQwImMYI

One thing regarding the speed, atleast for the rainbow effect I could implement the build-in feature? As well as the built-in audio feature, it seems like the hue+ is really slow with processing the input

@Bl4d3s
Copy link
Contributor Author

Bl4d3s commented Feb 11, 2017

Update: I looked into the speed issues, if I implement it, as if music is always playing the speed is no problem anymore. The rainbow effect works nice and the music effect too. I will test it a little bit more and update the pull request. I thin max time should be in 3h :)

@Bl4d3s
Copy link
Contributor Author

Bl4d3s commented Feb 11, 2017

Update II: speed is no longer a problem. Now I dont know anything, that does not work. But this comes with the restriction, that you can no longer select only one channel of the hue+.

To achieve optimal results, fans should be connected equally to both channels. If you connect 3 fans more on channel 1 than on channel 2, you miss some parts of the amplitude on channel 2. So I recommend a maximum of 2 fans difference. ex. ch1: 4 fans, at least 2 on ch2 (or none)

Edit: I uploaded a new video with the latest commits included. https://www.youtube.com/watch?v=MwRvDDyH0GQ

@CalcProgrammer1
Copy link
Owner

Have you tried just slowing down the send rate? If you send too fast that might be causing problems. May have to implement a minimum delay for hue+ if you're using the original code with channels. You can adjust the Delay field to change this at runtime.

@Bl4d3s
Copy link
Contributor Author

Bl4d3s commented Feb 11, 2017

If I slow down the baud rate (do you mean this rate with send rate) the hue cant process the input. I tried with every baud rate :/

@Bl4d3s
Copy link
Contributor Author

Bl4d3s commented Feb 11, 2017

For what would you implement the delay? In the current code no channels are selectable

@CalcProgrammer1
Copy link
Owner

Don't slow down the baud rate. Serial devices only operate at one baud rate, anything else and they won't detect it. However, you send serial data as packets, clumps of bytes all sent in a row. Likely it will receive a complete packet and then do some processing. If you send another packet before it's done processing the previous one, it may not receive the entire packet and discard it, causing the slowdown. In the current code without selectable channels it looks like timing is fine (the video looked smooth) but I'm saying if you did want to have selectable channels, messing with the delay may make it workable. The delay is basically the time between calls to SetLEDs.

I'll go ahead and merge what you have since it's in a working state.

@Bl4d3s
Copy link
Contributor Author

Bl4d3s commented Feb 11, 2017

Okay thank you, I will look into it when I have time, possibly next week.

@CalcProgrammer1
Copy link
Owner

Squashed, cleaned up, and merged.

@JamesDarkness
Copy link

i have the lads if you want me to test you code on them Bl4d3s

@Bl4d3s
Copy link
Contributor Author

Bl4d3s commented Feb 13, 2017

The code was merged from CalcProgrammer1, so feel free to clone the latest repository and test it out

@Bl4d3s Bl4d3s deleted the HUE+ branch February 17, 2017 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants