Comments (27)
There was a problem into connecting all the bulbs, but that was a toolbox problem, here the multiple bulbs on work:
https://youtu.be/XO8njKKdhXk
from colorchord.net.
Hello and welcome!
Currently MQTT is not supported, but I’m not against adding support for it. However, I’m concerned that it may not work very well for what you are trying to do.
The extra hop through a server will add latency, especially when using MQTT, which I don’t think is optimized for low latency. ColorChord really needs a low latency connection to the light emitters in order for the effect to look satisfying.
Are there any other ways of interacting with your home assistant software, or perhaps even the lightbulbs themselves?
I was planning on adding MQTT support to control ColorChord.NET in the future (e.g. to turn output on/off remotely).
from colorchord.net.
@CaiB, thank you for your reply!
Yeah, I'm afraid about extra latency too, but it's the easiest way to do it from homeassistant. I really don't know another way except writing some sort of addon for it, where I don't have any experience. Another way to do what I want is to use python library for my yeelight bulbs. And I think I can use your memory mapped file, but I can't figure out how to deal with it. May be you can share some example?
from colorchord.net.
I remember someone trying to use base ColorChord with some Yeelight bulbs a while back here: cnlohr/colorchord#112
They mention use of a TCP server and JSON commands, could you see if this may work on your lights as well? If so, I can probably implement this pretty easily.
As for memory mapping, note that it only works on Windows. There is a reference implementation of a receiver here, but I don’t use Python so I’m not sure how it would translate: https://github.com/CaiB/ColorChord.NET/blob/master/ColorChord.NET/Visualizers/MemoryMapReceiver.cs
from colorchord.net.
Yeah, I think it would work at most of yeelight bulbs. If it would help, here is a document with yeelight API: https://www.yeelight.com/download/Yeelight_Inter-Operation_Spec.pdf
from colorchord.net.
OK, I can add this, probably within the next week. Do you have a way to enable music mode (and specify a server to connect to) in the software you use, or is this something I'd need to add to CC.NET? (This would mean I'd need to add bulb discovery as well)
from colorchord.net.
Yeah just wanted to say it to you that there is such thing as music mode, and it's enabled on my bulbs. I'm not sure I can specify a server, I never seen something about it. Thank you very much!
from colorchord.net.
Hello again!
My apologies for the delay. I've made a very basic implementation of the Yeelight server. Could you please give it a try?
Start by downloading the latest autobuild, 114 or newer.
Here's a sample config file excerpt that will hopefully work:
...
"Visualizers":
[
{
"Type": "Prominent",
"Name": "YeeSample",
"LEDCount": 1,
"FrameRate": 30,
"SaturationAmplifier": 1.6,
"Enable": true
}
],
"Outputs":
[
{
"Type": "Yeelight",
"Name": "YeeOut",
"VisualizerName": "YeeSample",
"Enable": true
},
{
"Type": "DisplayOpenGL",
"Name": "SampleDisplay",
"VisualizerName": "YeeSample",
"Modes":
[
{
"Type": "BlockStrip"
}
],
"WindowWidth": 400,
"WindowHeight": 400
}
],
...
Once you start ColorChord.NET, you should get asked by Windows to allow opening a port in your firewall. Make sure to accept this, otherwise the Yeelight can't connect to the TCP server.
Then you'll need to have your Yeelight connect in "music mode" to the computer you're running ColorChord.NET on by IP. This connection will need to be made via some other app you use to control your lights now. If you can't find a way to do this, I'll need to add that to ColorChord.NET, just let me know.
The default port is 14887, but you can change this by adding a "Port": 12345
line to the Yeelight
output section.
To stop the music mode, simply close ColorChord.NET and your lights should connect back to however they were configured before.
from colorchord.net.
[ { "Type": "Yeelight", "Name": "YeeOut", "VisualizerName": "YeeSample", "Enable": true }, { "Type": "DisplayOpenGL", "Name": "SampleDisplay", "VisualizerName": "YeeSample", "Modes": [ { "Type": "BlockStrip" } ], "WindowWidth": 400, "WindowHeight": 400 } ],
Thank you very much for your work! So, I have downloaded the latest build, set up the config and enabled the port when firewall has been asked this. But I'm not sure how to connect Yeelight to my computer. Currently the computer and the Yeelight both in the same local network handled by my router. Is this enough? If that's so than something is not working, because I don't see any effect. I thought, I'll need to set the bulbs IPs into the config so the app will know how to find them.
The log says following:
[INF] Reading config for Prominent "YeeSample".
[INF] Reading config for Yeelight "YeeOut"
[INF] Waiting for Yeelight clients
[INF] Reading config for DisplayOpenGL "SampleDisplay".
[WRN] Display mode "ColorChord.NET.Outputs.Display.BlockStrip" does not support configuration.
[INF] Finished reading display modes under "SampleDisplay".
from colorchord.net.
Yes, getting the Yeelight to actually connect to the ColorChord.NET TCP server needs to be done separately.
I asked you previously:
Do you have a way to enable music mode (and specify a server to connect to) in the software you use, or is this something I'd need to add to CC.NET? (This would mean I'd need to add bulb discovery as well)
The Yeelight needs to initiate the connection to the server (CC.NET), not the other way around.
If you don't have a way to tell the Yeelight to initiate the connection, I'll need to add this to ColorChord.NET (which I was planning to do anyways), I was just hoping that you had a way around this for now so we could test the functionality first.
from colorchord.net.
No, sorry. The only app I have is the yeelight android app. Actually there is a yeelight toolbox running on PC, from which I can send commands to my yeelights, but I didn't found list of that commands so maybe there is a way to connect them to the PC in music mode, but I don't now that particular command.
from colorchord.net.
OK, give me a bit more time and I'll implement Yeelight discovery and connection.
from colorchord.net.
Oh hold on, if you have that tool and can send raw commands, try this:
{"id":1,"method":"set_music","params":[1,"MYIP",PORT]}
Replace MYIP
with the IP of your PC, and PORT
with the CC.NET port (14887 default)
from colorchord.net.
Oh hold on, if you have that tool and can send raw commands, try this:
{"id":1,"method":"set_music","params":[1,"MYIP",PORT]}
ReplaceMYIP
with the IP of your PC, andPORT
with the CC.NET port (14887 default)
Give me a minute (somehow I don't get a notify even if I subsribed to this issue 😞)
from colorchord.net.
I think it doesn't work. I tried to run: {"id":1,"method":"set_music","params":[1,"192.168.1.34",14887]}
, and then start your app, but don't see any changes in bulb behaviour. Unfortunately there is no log in the toolbox so I can't say was the command completed successfuly.
from colorchord.net.
You'll need to start CC.NET before you send the command.
from colorchord.net.
Oh, wait, I can see a change in your log:
[INF] Reading config for NoteFinder.
[INF] Reading config for Prominent "YeeSample".
[INF] Reading config for Yeelight "YeeOut"
[INF] Waiting for Yeelight clients
[INF] Reading config for DisplayOpenGL "SampleDisplay".
[WRN] Display mode "ColorChord.NET.Outputs.Display.BlockStrip" does not support configuration.
[INF] Finished reading display modes under "SampleDisplay".
[INF] Yeelight client connecting
The last line. It was not here before.
from colorchord.net.
@HepoH3 OK, so it should theoretically be sending over the commands to turn on, then display the colours. Is the bulb still not doing anything at all?
from colorchord.net.
Nope. Tried to turn off it before start thats all, and tried to reboot the bulbs, but got nothing.
from colorchord.net.
Meanwhile the Visualizer at the window is working so it's not the case that there is no sound or something like this.
from colorchord.net.
@HepoH3 Gotcha, OK. It looks like the bulb is connecting correctly, just something is wrong with what I'm sending it. I'll look into it some more and also add the discovery features. I'll let you know when the new version is ready for testing.
from colorchord.net.
Okay, thank you!
from colorchord.net.
@HepoH3 Actually, I just found a potential issue. Could you try it again with the newest autobuild (115)? Just use the same config.json
as before.
from colorchord.net.
Give me a sec
@HepoH3 Actually, I just found a potential issue. Could you try it again with the newest autobuild (115)? Just use the same
config.json
as before.
from colorchord.net.
yeah, it's working now!
from colorchord.net.
@HepoH3 Yay, that's awesome. How is the latency? (Could you record & upload a short video?)
I'll still add the discovery & connection stuff, since using another program just to connect the bulb isn't exactly very convenient :)
I'm heading to bed now, but will let you know when I get the new features added to try out.
from colorchord.net.
from colorchord.net.
Related Issues (13)
- Effects demo? HOT 1
- Multiple outputs from one visualizer HOT 10
- OpenGL Display to FullScreen HOT 2
- Controllers? HOT 13
- Too Flickery? Decay function HOT 5
- Enable on every output HOT 5
- nothing happens when I execute the program HOT 8
- Wiz bulbs ? HOT 24
- UsIng Different Visualizers HOT 3
- Add traditional FFT-based spectrum for NoteFinder HOT 1
- UDP Sync with WLED HOT 24
- Parameter names for note finder not matching in config HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from colorchord.net.