5c9d8118168469da02ab81aa18fbc81c4f75f633
homebridge-esphome-rgbww
A Homebridge plugin for ESPHome RGBWW lights with native HSV support and automatic RGB ↔ HSV conversion.
Features
- ✅ Full RGB color support via HSV conversion
- ✅ Brightness control
- ✅ Color temperature (warm/cool white)
- ✅ Automatic RGB ↔ HSV conversion
- ✅ Native MQTT support
- ✅ Optimized for Xiaomi Yeelight Bedside Lamp 2 with ESPHome
Installation
npm install -g homebridge-esphome-rgbww
Configuration
Add this to your Homebridge config.json:
{
"platforms": [
{
"platform": "ESPHomeRGBWW",
"name": "ESPHome RGBWW",
"lights": [
{
"id": "bedside-lamp-4387-1962",
"name": "Bedside Lamp Rechts",
"manufacturer": "Yeelight",
"model": "MJCTD02YL",
"mqtt_broker": "mqtt://192.168.23.20:1883",
"state_topic": "bedside-lamp-4387-1962/light/bedside_lamp_rechts/state",
"command_topic": "bedside-lamp-4387-1962/light/bedside_lamp_rechts/command"
}
]
}
]
}
ESPHome Configuration
Your ESPHome device should publish state to MQTT in this format:
{
"state": "ON",
"brightness": 255,
"color": {
"r": 255,
"g": 0,
"b": 0
},
"color_temp": 300,
"color_mode": "rgb"
}
And accept commands in the same format.
Development
# Clone the repository
git clone https://github.com/felixfoertsch/homebridge-esphome-rgbww.git
cd homebridge-esphome-rgbww
# Install dependencies
npm install
# Build
npm run build
# Link for local development
npm link
# Watch mode
npm run watch
License
MIT
Languages
TypeScript
97.8%
JavaScript
2.2%