Giter Club home page Giter Club logo

esphome-xiaomi_bslamp2's Introduction

ESPHome support for Xiaomi Mijia Bedside Lamp 2

[ Changelog | License | Code of conduct ]

The Bedside Lamp 2 is a smart RGBWW LED lamp, produced by Yeelight for the Xiaomi Mijia brand. It can be controlled via the WiFi network and from a touch panel on the front of the device. The touch panel contains a power button, a button that changes the color of the light and a slider that can be used to change the brightness of the light.

This project provides custom components for ESPHome, which make it possible to fully control every aspect of the lamp and to integrate the lamp in your Home Assistant setup.

Features

  • The lamp integrates easily with Home Assistant using the ESPHome integration.

  • The lamp no longer phones home to the Mijia Cloud. Using this firmware, you can rest assured that the network traffic is limited to your own network. This matches the ideas behind Home Assistant, of providing a local home automation platform, that puts privacy first.

  • No more need for the LAN control option to integrate the lamp with Home Assistant. Especially important, because Xiaomi decided in all their wisdom to remove LAN control from the device, breaking existing integrations.

  • The night light supports multiple colors. The original firmware only supports a single warm white night light color.

  • Smooth light color transitions, unlike the current version of the Yeelight integration. The Homekit integration does provide good transitions, but on my system, the color temperature white light mode is missing in the Home Assistant GUI.

  • Since the components of the lamp are exposed as ESPHome components, you don't have to stick with the lamp's original behavior. You can hook up the lamp in your home automation as you see fit. Use the slider to control the volume of your audio set? Long press the power button to put your house in night mode? Use the illumination behind the slider bar to represent the progress of your sour dough bread bulk fermentation? Go ahead, make it so! :-)

  • All LEDs that are used for illumination of the front panel (power button, color button and 10 LEDs for the brightness slider) can be controlled individually. This means that you have 12 LEDs in total to use as you see fit, instead of sticking with the behavior of the original firmware.

  • Possibilities to extend the device's functionality through hardware mods. There are GPIO pins that are not in use. If "tinkerer" is your middle name, you can use those pins to come up with your own hardware hacks to extend the device's functionality.

Quick start guide

For those who have experience with flashing ESPHome onto devices:

  • Make sure you are using ESPHome 2021.10.0 or newer.
  • Copy example.yaml to <CONFIG_DIR>/<NODE_NAME>.yaml.
  • Modify the configuration to your needs (see the configuration guide).
  • Compile the firmware.bin file and download it to the device to which you have connected your serial to USB adapter.
  • Open up the lamp and connect its TX, RX, GND and GPIO0 debug pads to the serial adapter. Check this image for the debug pad locations.
  • Power up the lamp with GPIO0 connected to GND to enable flashing mode.
  • Flash firmware.bin onto the device, for example using esphome-flasher..

Upgrading

I always try to make it possible to upgrade the lamp firmware without having to do anything special. Sometimes, this is not possible. For those cases, the upgrade instruction can be found here:

Table of contents

esphome-xiaomi_bslamp2's People

Contributors

mmakaay avatar tabacha avatar mhostyn avatar erwinschoonhoven avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.