1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to setup Hyperion with a Yeelight solution

Discussion in 'Hyperion Setup Showcase' started by dcartron, 14 January 2019.

  1. dcartron

    dcartron New Member

    Messages:
    2
    Hardware:
    RPi3
    Hello everyone,

    I want to embark on the Hyperion adventure, but ... not like everyone else.
    Indeed, I have in my possession:
    - 2 Yeelight Bulb
    - 1 Yeelight Lightstrip

    I saw here that it was possible to connect his Yeelight system to Hyperion: https://hyperion-project.org/threads/xiaomi-rgb-bulb-simple-udp-server-solution.529/

    But, I don't really understand what to do.
    There isn't much tutoriel on Internet for such a configuration (Yeelight + Hyperion). In addition, these tutorials all refer to the link above.

    Can you help me ?

    For information: I have a raspberry Pi 3 B +. I want to install Hyperion on my raspberry, and run my Kodi on a Xiaomi Mi Box.

    Thanks ☺
     
  2. damjandim

    damjandim New Member

    Messages:
    1
    Hardware:
    RPi3
    Hey @dcartron, I want to connect my Yeelight Lighstrip like you described, did you manage to do it?
     
  3. Iam Tobe

    Iam Tobe New Member

    Messages:
    4
    Hardware:
    RPi3
    Hello, I'm trying to do the same. I saw that it's possible but I haven't got.
    I have a Raspberry Pi 3, with OSMC, and the last Hyperion. I can enter to the web config in port 8090, and it find my two yeelight bulbs but they don't light.
     
  4. Iam Tobe

    Iam Tobe New Member

    Messages:
    4
    Hardware:
    RPi3
    I got it! I had to write the bulb IP into the network name option.
     
  5. Lord-Grey

    Lord-Grey Moderator Staff Member Developer

    Messages:
    387
    Hardware:
    RPi3, 32/64bit
    @Iam Tobe I still need to do some documentation on Yeelight.
    Nevertheless, after using the Wizard the Yeelights should work. Sometime you first need to restart hyperion...(for that we have an issue already logged).

    As it looks like that the configuration did not work at your end automatically.
    Would you mind activating the debug log mode (in the UI System->Log),
    plus then start the yeelight wizard and do the config again?

    Does the "Identify Light" button works for you? i.e. the respective Yeelight blinks red/blue?

    Please share a screenshot of the wizard (see sample below) and the log-output with me, please.
    I would like to explore, if it is a coding or documentation issue.

    Thanks for your support!

    upload_2020-11-2_21-7-53.png
     
  6. iam960

    iam960 New Member

    Messages:
    4
    Hardware:
    RPi3
    Thanks for your support. I have activated the debug mode. When I enter in the Yeelight Wizard, this is the appearing window:
    upload_2020-11-3_13-29-19.png
    The Identify button don't produce any effect, and both light and ambilight don't work. When I put the bulb IP in 'Network devicename', it does work without problem. Though the majority of movies are continously blinking (losing the HDMI source). Then, I change this parameter in 'Platform Capture':
    Height: 64
    Width: 64
    Capture frequency: 30

    And it work with all the movies.

    I paste the debug output:
    2020-11-03T13:22:43.529 hyperiond WEBSOCKET : <DEBUG> JsonAPI.cpp:1386:handleLedDeviceCommand() | message: [{"command":"leddevice","ledDeviceType":"yeelight","subcommand":"discover","tan":72
    4}]
    2020-11-03T13:22:43.530 hyperiond SSDPDISCOVER : <DEBUG> SSDPDiscover.cpp:206:discoverServices() | Search for Service [wifi_bulb], address [229.255.255.250], port [1982]
    2020-11-03T13:22:43.602 hyperiond SSDPDISCOVER : <DEBUG> SSDPDiscover.cpp:252:discoverServices() | Found target [wifi_bulb], plus record [yeelight://192.XXX.XX.XXX:55443] matches [LOCATION:yeel
    ight(.*)]
    2020-11-03T13:22:44.105 hyperiond SSDPDISCOVER : <DEBUG> SSDPDiscover.cpp:252:discoverServices() | Previous line repeats 1 times
    2020-11-03T13:22:44.105 hyperiond SSDPDISCOVER : <DEBUG> SSDPDiscover.cpp:294:discoverServices() | [1] service record(s) found
    2020-11-03T13:22:49.111 hyperiond LEDDEVICE : <DEBUG> LedDeviceYeelight.cpp:1370:discover() | devicesDiscovered: [{"devices":[{"cache-control":"max-age=3600","domain":"168.XX.XXX","hostname"
    :"192","id":"yeelight://192.XXX.XX.XXX:55443","ip":"192.XXX.XX.XXX","location":"yeelight://192.XXX.XX.XXX:55443","other":{"bright":"34","color_mode":"1","ct":"4000","date":"","ext":"","fw_ver":
    "73","hue":"115","id":"0x00000000080c10b4","model":"stripe","name":"","power":"off","rgb":"3692597","sat":"39","support":"get_prop set_default set_power toggle set_bright start_cf stop_cf set_s
    cene cron_add cron_get cron_del set_ct_abx set_rgb set_hsv set_adjust adjust_bright adjust_ct adjust_color set_music set_name"},"port":55443,"server":"POSIX UPnP/1.0 YGLC/1","st":"","usn":""}],
    "ledDeviceType":"yeelight"}]
    2020-11-03T13:22:49.111 hyperiond WEBSOCKET : <DEBUG> JsonAPI.cpp:1409:handleLedDeviceCommand() | response: [{"devices":[{"cache-control":"max-age=3600","domain":"168.XX.XXX","hostname":"192
    ","id":"yeelight://192.XXX.XX.XXX:55443","ip":"192.XXX.XX.XXX","location":"yeelight://192.XXX.XX.XXX:55443","other":{"bright":"34","color_mode":"1","ct":"4000","date":"","ext":"","fw_ver":"73",
    "hue":"115","id":"0x00000000080c10b4","model":"stripe","name":"","power":"off","rgb":"3692597","sat":"39","support":"get_prop set_default set_power toggle set_bright start_cf stop_cf set_scene
    cron_add cron_get cron_del set_ct_abx set_rgb set_hsv set_adjust adjust_bright adjust_ct adjust_color set_music set_name"},"port":55443,"server":"POSIX UPnP/1.0 YGLC/1","st":"","usn":""}],"ledD
    eviceType":"yeelight"}]
    2020-11-03T13:22:56.356 hyperiond WEBSOCKET : <DEBUG> JsonAPI.cpp:1386:handleLedDeviceCommand() | message: [{"command":"leddevice","ledDeviceType":"yeelight","params":{"hostname":"192","port
    ":55443},"subcommand":"identify","tan":1}]
    2020-11-03T13:22:56.357 hyperiond LEDDEVICE : <DEBUG> LedDeviceYeelight.cpp:1402:identify() | params: [{"hostname":"192","port":55443}]
    2020-11-03T13:22:56.357 hyperiond LEDDEVICE : <DEBUG> LedDeviceYeelight.cpp:1406:identify() | apiHost [192], apiPort [55443]
    2020-11-03T13:22:56.358 hyperiond LEDDEVICE : <ERROR> Yeelight device '192' signals error: 'Connection refused'

    Thanks again!

    Iam.
     

    Attached Files:

  7. Iam Tobe

    Iam Tobe New Member

    Messages:
    4
    Hardware:
    RPi3
    One more thing. I just tested now and the identify button now makes blinking the strip bulb.
     
  8. Lord-Grey

    Lord-Grey Moderator Staff Member Developer

    Messages:
    387
    Hardware:
    RPi3, 32/64bit
    Thanks for coming back with the details.
    It looks like that the routine resolves the hostname for the bulb as "192", but when using the name, it does not resolve into a proper IP-Address.

    In the 2nd case where the "identify" worked, do you have a screenshot there too.
    Is in that case the value in brackets, e.g. (192) different?

    If you do a (replace 192.XXX.XX.XXX with the lights IP)

    arp -a 192.XXX.XX.XXX

    or

    ping -a 192.XXX.XX.XXX

    What name does it resolve in?
     
  9. iam960

    iam960 New Member

    Messages:
    4
    Hardware:
    RPi3
    I am trying to run again the wizard but it keep in this window:
    upload_2020-11-3_16-55-5.png

    This previously happened sometimes, but now I have tried multiples times and it doesn't pass this window.

    Just now, I have removed the LAN permission for the bulb from the xiaomi app, and I have got this:
    upload_2020-11-3_16-59-24.png

    It is strange because the name that is automatically assigned to the strip (the only one bulb with LAN permission just now) is 'conf_leds_layout_cl_entire'. But yesterday, in my router, it has the name 'yeelink-light-strip2_miap7fe2'.

    I will repeat the wizard later until the both bulbs were found.

    This is the ping output for the two bulbs:
    PING 192.168.31.115 (192.168.31.115): 56 data bytes
    64 bytes from 192.168.31.115: seq=0 ttl=255 time=400.514 ms
    64 bytes from 192.168.31.115: seq=1 ttl=255 time=7.545 ms
    64 bytes from 192.168.31.115: seq=2 ttl=255 time=4.487 ms
    ^C
    --- 192.168.31.115 ping statistics ---
    3 packets transmitted, 3 packets received, 0% packet loss
    round-trip min/avg/max = 4.487/137.515/400.514 ms

    $ ping 192.168.31.177
    PING 192.168.31.177 (192.168.31.177): 56 data bytes
    64 bytes from 192.168.31.177: seq=0 ttl=255 time=1.719 ms
    64 bytes from 192.168.31.177: seq=1 ttl=255 time=1.651 ms
    64 bytes from 192.168.31.177: seq=2 ttl=255 time=1.657 ms
    64 bytes from 192.168.31.177: seq=3 ttl=255 time=1.424 ms
    64 bytes from 192.168.31.177: seq=4 ttl=255 time=1.464 ms
    64 bytes from 192.168.31.177: seq=5 ttl=255 time=7.060 ms
    ^C
    --- 192.168.31.177 ping statistics ---
    6 packets transmitted, 6 packets received, 0% packet loss
    round-trip min/avg/max = 1.424/2.495/7.060 ms
     
  10. Lord-Grey

    Lord-Grey Moderator Staff Member Developer

    Messages:
    387
    Hardware:
    RPi3, 32/64bit
    Yes, this is what I expected to get back in the UI. If you see my screenshot, it exactly follows the same logic of the prefix.
    Sometime it helps,if the lights are longer in the network...I still have not figured out the logic....
    I might need to fall back to configure IP-addresses, which I currently avoided. In case an IP-address change, users complain that lights are not working...
    And not everybody is able to configure fixed IPs in their routers.

    In addition, could you do me a ping with "-a" that the name is resolved during the ping, please?
    I am not interested into the ping-time, but how the name is resolved.
     
  11. iam960

    iam960 New Member

    Messages:
    4
    Hardware:
    RPi3
    ping -a gives an error:
    And arp -a gives only the IP and the MAC address of the device.
     
  12. NeeeeB

    NeeeeB Active Member

    Messages:
    237
    Hardware:
    RPi3, +Arduino, +nodeMCU/ESP8266
    For what it's worth :

    I have a Yeelight bulb in my room, so I've created a new instance and launched the Wizard.
    It has found my bulb instantly, and with the same name as defined in my router.
    I've set up its position, saved settings and ambilight has started instantly on the bulb.
    It won't help you debugging, I'm aware of this, but it shows that sometimes it can work flawlessly ^^
    PS: my bulb has a static IP address on my network.
     
  13. Lord-Grey

    Lord-Grey Moderator Staff Member Developer

    Messages:
    387
    Hardware:
    RPi3, 32/64bit
    @iam960 I guess I know the issue.

    I try splitting the domain from hostname.
    If the Hostname is an IP-Address, then it looks like I am splitting wrongly...
    I will have a further look into the scenario.
     
  14. Lord-Grey

    Lord-Grey Moderator Staff Member Developer

    Messages:
    387
    Hardware:
    RPi3, 32/64bit
    • Like Like x 1
  15. Iam Tobe

    Iam Tobe New Member

    Messages:
    4
    Hardware:
    RPi3
    Thanks, I will try.
     
  16. pemontto

    pemontto New Member

    Messages:
    1
    Hardware:
    32/64bit, +Arduino, +nodeMCU/ESP8266
    I tested this and it's working great on my *nix box. However I'd like to run it from a docker container so I can use it on Windows. Screengrabber -> Hyperion -> WLED.
    Is it possible to configure this to advertise a different IP? The problem on docker on Mac and Windows is you can't do host networking, so when it turns on music mode it gives the Yeelights a private docker network IP in the 172.x range :(
     
    Last edited: 14 January 2021