milight | Reverse engineering MiLight

 by   miek Python Version: Current License: No License

kandi X-RAY | milight Summary

kandi X-RAY | milight Summary

milight is a Python library typically used in Internet of Things (IoT), Raspberry Pi, Arduino applications. milight has no bugs, it has no vulnerabilities and it has low support. However milight build file is not available. You can download it from GitHub.

Documentation and tools for MiLight remote-controlled lightbulb. These docs are specific to the dual-white bulbs/remotes. The protocol differs from the RGBW hardware but there are details of that on Henryk Plötz' Hackaday.io page.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              milight has a low active ecosystem.
              It has 12 star(s) with 2 fork(s). There are 2 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 0 open issues and 2 have been closed. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of milight is current.

            kandi-Quality Quality

              milight has 0 bugs and 0 code smells.

            kandi-Security Security

              milight has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              milight code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              milight does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              milight releases are not available. You will need to build from source code and install.
              milight has no build file. You will be need to create the build yourself to build the component from source.
              milight saves you 28 person hours of effort in developing the same functionality from scratch.
              It has 76 lines of code, 6 functions and 1 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed milight and discovered the below as its top functions. This is intended to give you an instant insight into milight implemented functionality, and help decide if they suit your requirements.
            • Handle incoming packet .
            • Main function .
            • convert a bitstring to bytes
            • Slice a string
            • Calculate the checksum of a given packet .
            • Slice string by count .
            Get all kandi verified functions for this library.

            milight Key Features

            No Key Features are available at this moment for milight.

            milight Examples and Code Snippets

            No Code Snippets are available at this moment for milight.

            Community Discussions

            QUESTION

            Problems with sending UDP packets (milight, limitlessled)
            Asked 2018-Jun-03 at 18:08

            I trying to write a menubar app to get control over my lights via Mac. I'm using the system of milight (limitless, easybulbs...). They have an open system were you can send commands via UDP.

            I'm able to control my lights via python-limitless library in python, so I know the networking thing such as IP and port is right.

            So I think I do anything wrong with this UDP stuff I never worked with. I'm trying to use SwiftSocket library to send my commands but nothing happens, I've been trying it since 2 days.

            Here ist what I'm trying:

            ...

            ANSWER

            Answered 2017-Apr-19 at 21:30

            I'm a bit late, but I hope it can help you :

            Before sending your lighton request you have to send a first request to get, the wifi bridge session. You also need to compute what Milight called the "checksum" based on your request.

            You also make sure about what kind of bulb you have, is it WW bulb or CW? I was stuck for severals days because I was sending wrong request..

            I made an implementation, It's in php but you can use it same way in Objective-C.

            Check it out : https://github.com/winosaure/MilightAPI

            UPDATE :

            According to limitlessled "documentation" (http://www.limitlessled.com/dev/) this is how a request is composed :

            UDP Hex Send Format: 80 00 00 00 11 {WifiBridgeSessionID1} {WifiBridgeSessionID2} 00 {SequenceNumber} 00 {COMMAND} {ZONE NUMBER} 00 {Checksum}

            This is why you must get wifibridge session first then you need to calculate the checksum.

            Let me take one example about how to turn on the light.

            The documentation says that :

            31 00 00 08 04 01 00 00 00 = Light ON

            31 00 00 08 04 01 00 00 00 refer to {COMMAND} above.

            So far the full request must be :

            Source https://stackoverflow.com/questions/42535502

            QUESTION

            How can pixels display brown, while RGB led's lights can't?
            Asked 2017-Oct-23 at 14:23

            While busy with project I'm wondering how you can't make a brown looking color with a RGB led light, but pixel can display brown really well. What is the biggest different between a RGB led light(for example a MiLight or Arduino RGB LED) and a (monitor) pixel what makes it works?

            Is there a way to program any RGB light to output a brown light color?

            ...

            ANSWER

            Answered 2017-Oct-23 at 14:23

            LEDs are rather large so your eye can easily identify only the R and B being on for example, so we see a red and a blue light source. A monitor pixel is so small that our brain sees the R and B as magenta instead.

            You can read about here on Wikipedia.

            Source https://stackoverflow.com/questions/46890436

            QUESTION

            milight api response success but nothing happens
            Asked 2017-Apr-14 at 23:12

            I'm trying to implement milight api using http://www.limitlessled.com/dev.

            I wrote a small php script which based on that. According to the documentation I always received the good response from my UDP request, all the request is successfull but nothing happens (Link light, siwth on/off etc..)

            What I've done so far :

            ...

            ANSWER

            Answered 2017-Apr-14 at 23:12

            I figured out what was wrong.

            First I noticed that request are not exactly the same between CW bulb and WW bulb. For example, the request you have to send to switch on the light with CW bulb is :

            Source https://stackoverflow.com/questions/42940389

            QUESTION

            Compare pointer chars
            Asked 2017-Mar-07 at 11:23

            First of all I have searched a lot and also tried many things but unfortunately no solution for my problem.

            Below, I tried to compare two char* values. But I do not understand why this does not work. What my intention is that this function performs the sendCommand() only when temp does not equal IDMilight. Temp values will be different if there is an adjustment to the database. So if there issn't any adjustment it must delay for 2sec and check again.

            I'm pretty new to C++ so I hope someone can help me with this

            ...

            ANSWER

            Answered 2017-Mar-07 at 11:23

            Since you are pretty new to C++, the right answer is this:

            Don't use char*. Try to avoid pointers at all and if you have to use them, use pointer classes like unique_ptr. One simple reason, for example, is that you have to manage memory if those pointers don't simply point at some other variables that exist within some scope. Thus, memory leaks are quite easy to produce if you use pointers. (That said, you can use pointers, but usually you do this in some controlled environment, like wrapped within some class, like a linked list class, or in a very small scope in which you need polymorphy - although again, in such a case you could use unique_ptr or shared_ptr)

            Pointers that are essentially arrays like the typically used char* should be replaced by something that wraps arrays. In this case, clearly std::string, which can be used just like char*. In other cases, for example instead of int* or int[] arrays, you'd use std::vector.

            Now, you have some function from outside that you need for SQL, that's ok, but try to limit the time in which something stays a char*. Transform char* to string simply by putting it in the constructor: std::string my_string(functions_that_returns_char());, then compare simply by string_1 == string_2. You can access single letters as usual by my_string[some_index]. Take a look yourself for more functionality:

            http://www.cplusplus.com/reference/string/string/

            That said, I can only second the comment from Baum mit Augen, get a book or read through some tutorials. And be aware that C-style is totally not C++-style, C-programmers will use pointers a lot, for instance.

            As for your original question, a pointer that is essentially an array points to the first element of that array. Dereferencing produces that element, not the array. No need to use a pointer here anyway if you could simply directly use the actual array, right?

            Source https://stackoverflow.com/questions/42646271

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install milight

            You can download it from GitHub.
            You can use milight like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/miek/milight.git

          • CLI

            gh repo clone miek/milight

          • sshUrl

            git@github.com:miek/milight.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link