Using a Milight remote with HomeAssistant

Milight sells 2.4 GHz remotes* for quite cheap (~$12) which can be used to control Milight bulbs*. They also make in-wall panels* that do the same thing. These work quite well, but if you’re using something like HASS, you’ll end up with stale state. For example, if you turn lights on with the remote, that change won’t be reflected in HASS.

I recently released v1.4.0 of esp8266_milight_hub which allows you to use Milight remotes in conjunction with HomeAssistant, or any other platform that works with MQTT. Here’s some footage of it in action:

The ESP8266 is passively listening for packets sent by the remote, and forwards the data to an MQTT topic. HASS reacts by sending commands to a different MQTT topic which instructs the ESP8266 to turn bulbs on. You could just as easily have HASS do something completely different, like control a non-Milight bulb.

If you’re interested in setting this up yourself, instructions are available GitHub project wiki.

* Contains Amazon affiliate link

2 thoughts on “Using a Milight remote with HomeAssistant

  1. Hi Chris,

    This looks very intriguing to me. I am in the process of picking out a 5m LED strip, to go under our kitchen cabinets, and I am in the need of a RGBWW strip. I like what you have going here, as the MiLight stuff is readily available on Amazon (I will use your links if I choose to purchase) compared to the Arilux controllers that need to be ordered from China.

    I just had a couple of questions:

    From what I understand, they work on a propietary 2.4Ghz signal, instead of using WiFi, and your firmware is a replacement gateway using an ESP8266? So, I won’t need the gateway if I go this route, right?
    How reliable is using the 2.4Ghz frequencies, compared to using WiFi alone? I know that the WiFi is also 2.4Ghz, so I assume it’s no different. For example, the Arilux use a straight WiFi connection, would this be more ideal? This may not be an issue, but figured I’d ask.
    On that same note, how far will the signal carry? Just like WiFi where it will cover all three floor of my house?
    Will your firmware work with the Mi Light Series 2.4G 4-zone LED RGBW RF Wireless Controller Color Changing and Brightness Dimming For RGBWW Strip Lights (direct Amazon description)? If it does, please feel free to post an affiliate link for me for helping me out and I will use it.

    Thanks for your time and all your hard work in the open source community:)

    • It should work with that controller.

      If you’re pretty sure you’ll only ever want one LED controller, it’s probably best to get one that connects to WiFi directly.

      I think there are quite a few OTS solutions that work pretty well. I’ve had one of these things (affiliate link) for several years, and I’m pretty happy with it. Integrates nicely with HomeAssistant. I think there are cheaper controllers that use the same protocol, don’t know where to find them offhand.

      On the DIY front for WiFi LED controllers, there’s BRUH’s ESP8266 project.

      If you expect to have lots of controllers, you might be better off with a single WiFi device that communicates with the LED controllers on your behalf (this really a matter of preference, and probably depends on how much spare capacity your WiFi setup has). If you want to go that route, this Milight controller (affiliate link) will work with espMH.

Leave a Reply

Your email address will not be published. Required fields are marked *