mvkalsbeek / micontrol Goto Github PK
View Code? Open in Web Editor NEWC# application/library for controlling MiLight WiFi enabled lightbulbs
License: GNU General Public License v3.0
C# application/library for controlling MiLight WiFi enabled lightbulbs
License: GNU General Public License v3.0
Hi,
Just wanted to give a comment. I'm currently developing a lightcontrol for a Photobooth and i'm using your C# project.
It has taken a while to get a Milight/Miboxer Wallwasher (RGB+CCT) to work with the ibox2. I could get connection to the box, but no light would be turned on. Finally i found out that one of the main reasons was that the lamptype wasn't ok.
In your example for CCT you would use 0x08, but in my case it is 0x07.
Check my examples:
static readonly byte[] ON = { 0x31, 0x00, 0x00, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00 };
static readonly byte[] OFF = { 0x31, 0x00, 0x00, 0x07, 0x03, 0x02, 0x00, 0x00, 0x00 };
static readonly byte[] LINK = { 0x31, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00 };
static readonly byte[] UNLINK = { 0X31, 0X00, 0X00, 0X07, 0X00, 0X00, 0X00, 0X00, 0X00 };
static readonly byte[] WHITE = { 0x31, 0x00, 0x00, 0x07, 0x03, 0x05, 0x00, 0x00, 0x00 };
static readonly byte[] BLUE = { 0x31, 0x00, 0x00, 0x07, 0x01, 0xBA, 0xBA, 0xBA, 0xBA };
static readonly byte[] AQUA = { 0x31, 0x00, 0x00, 0x07, 0x01, 0x85, 0x85, 0x85, 0x85 };
static readonly byte[] RED = { 0x31, 0x00, 0x00, 0x07, 0x01, 0xFF, 0xFF, 0xFF, 0xFF };
static readonly byte[] LAVENDER = { 0x31, 0x00, 0x00, 0x07, 0x01, 0xD9, 0xD9, 0xD9, 0xD9 };
static readonly byte[] GREEN = { 0x31, 0x00, 0x00, 0x07, 0x01, 0x7A, 0x7A, 0x7A, 0x7A };
static readonly byte[] LIME = { 0x31, 0x00, 0x00, 0x07, 0x01, 0x54, 0x54, 0x54, 0x54 };
static readonly byte[] ORANGE = { 0x31, 0x00, 0x00, 0x07, 0x01, 0x1E, 0x1E, 0x1E, 0x1E };
static readonly byte[] YELLOW = { 0x31, 0x00, 0x00, 0x07, 0x01, 0x3B, 0x3B, 0x3B, 0x3B };
static readonly byte[] BRIGHTNESS = { 0x31, 0x00, 0x00, 0x07, 0x02, 0x64, 0x00, 0x00, 0x00 };
static readonly byte[] MODE = { 0x31, 0x00, 0x00, 0x07, 0x06, 0x02, 0x00, 0x00, 0x00 };
static readonly byte[] MODEDECREASE = { 0x31, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x00 };
static readonly byte[] MODEINCREASE = { 0x31, 0x00, 0x00, 0x00, 0x04, 0x03, 0x00, 0x00, 0x00 };
The MiController
class has become quite a mess with methods for RGBW, RGB and White light bulbs. It might be better to refactor these to subclasses.
Commands might get a syntax like:
Controller.RGB.SwitchOn();
Controller.RGBW.SetColor(2, Color.Blue);
Design a fully usable GUI for the beta release, using all the functionality supported by the MiController
class.
Add more ways of initializing an instance of the MiController
class. For instance not only accepting the IP-address of the MiLight WiFi controller as a string
but also as a System.Net.IPAddress
.
After pulling the new refactor
branch, update the ReadMe and Wiki according to the changes.
Currently, when AutoDelay
is set to true
on an instance of the MiController
class, an automatic delay (Thread.Sleep
) of 50ms is done after sending a command to the the controller. This delay can be 'modified' by setting AutoDelay
to false and implementing your own delay 'handling'.
Making the delay variable might be a welcome addition.
Implement functionality to capture an audio stream (loopback)
Need to design some algorithms (using FFT on the captured audio stream) to visualize music.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.