Beiträge von soulsick

    Assuming your IPs are correct, it's simply a port issue. Let's have a look step by step:


    yee.py looks ok, the IP here should be the IP of your first yeelight.
    For your second yeelight, you need another .py file, for example yee2.py. Obviously use the IP of your second yeelight and another port, for example port 20541.


    Regarding your yeelight.config.json files:
    In the "device" block, the "output" line must not be the same in both configs. Change the port in the second file, use 20451 as above. The IP here should match the IP of the RPi where the .py files are run (if your .py files run on the same RPi as hyperion you may also use 127.0.0.1 as the IP).
    Also, your "jsonServer" and "protoServer" ports are wrong. Use 19450 and 19451 in config1, 19452 and 19453 ind config 2. These ports must be different from the udp port you used above!


    Finally, change "forwarder" block to

    Code
    "forwarder" :
    {
    "json" : [ "192.168.1.59:19450", "192.168.1.59:19452" ],
    "proto" : [ "192.168.1.59:19451", "192.168.1.59:19453" ]
    },


    Be careful with the IP here, you mixed up .29 and .59. Again this is the IP of your RPi, thus you can also use 127.0.0.1.


    I know it's a big mess with the IPs and ports. For me it helped doing small graphs. Essentially you need 3 servers for each yeelight, each with a different port: udp, json and proto server.

    As the Yeelights use WLAN, the lag is larger than driving an ambilight by wire over the gpio pins of a RPi. For me the lag is far from huge, but its slightly noticeable. Of course the lag depends on your network conditions and the hyperion config (smoothing etc) you use.


    Can't help with the LibreELEC issue. I use Raspbian (with Kodi) because i need a full-featured OS.

    Just completed the setup process. As I am also quite noobish, it took some time.


    The Yeelights work, you can use more than 1 (I got 2) and yes, i will try to do a tutorial.


    My setup: RPi2 with latest Raspbian, LED strip with 50 LEDs behind the TV and 2 Yeelight RGB bulbs. For this tutorial it is assumed you have your simple ambilight up and running (typically some sort of LED strip behind TV controlled by hyperion). It is also assumed that the python script is run on the same raspberry as hyperion. You may have to change the ports and IPs according to your network environment.


    Below the step-by-step tutorial:


    -Locate your hyperion folder where your config is. For me it's /etc/hyperion


    -Add as many hyperion configs as you have Yeelight RGB bulbs, use udp device (for each config a different port!):

    Code
    "device" :
       {
         "name"  : "MyPiudp",
         "type"  : "udp",
         "output"  : "127.0.0.1:20450", "protocol" : 0,
         "rate"  : 1000000,
         "colorOrder" : "rgb"
       },


    -In each config, setup a single LED (example below is for my Yeelight which is to the left of the tv)

    Code
    "leds" :
        [
            {
                "index" : 0,
                "hscan" : { "minimum" : 0.0000, "maximum" : 0.1000 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 1.0000 }
            }
        ],


    -In each config, use different ports for the jsonServer and the protoSever and write them down as you will need them in the next step. Then you can add color transformation, smoothing etc. You don't need grabbers in your yeelight configs, because they will use the grabber of your "main" config.


    -In your main config, add forwarder for json and proto. Example below is for two yeelight configs.

    Code
    "forwarder" :
        {
        "json" : [ "127.0.0.1:19450", "127.0.0.1:19452" ],
        "proto" : [ "127.0.0.1:19451", "127.0.0.1:19453" ]
        },


    -Add your configs to hyperion: Multiple Hyperion Instances


    -In the yeelight android app, activate LAN-control for each yeelight you want to use


    -Create a new python file, for example /home/pi/yee.py. I use the script by lemonCMS: Xiaomi RGB Bulb simple UDP server solution Pay attention to the port in the script. In my example you would have to use 20450.


    -Open a terminal and type

    Code
    pip install yeelight


    -Start the python script by typing

    Code
    python yee.py


    I think that's all you have to do. If you have any questions, feel free to ask.