433 Mhz Dimmable LED MQTT (Homebridge) Controller
This is for an outdoor string light LED controller, but I'm sure others exist. The remote is running on 433MHz and supports brightness levels. The remote has the buttons on/off/brightness up/brightness down/25%/50%/75%/100%. This only uses the on/off and specific brightness levels.
Requirements
- 433utils
- wiringPi
- 433Mhz receiver and transmitter
- nodejs
- MQTT broker
Setup
- Follow the instructions for setting up the 433Mhz modules. Receiver goes to WiringPi's 2 and sender goes to wiringPis 0. Use 5V & GND from RPi. For the receiver, use the pin closest to ground.
- Collect the codes from RFSniffer in 433Utils. Put those codes into
config/config.js
. They'll just look something like2484245
- Run using
nodejs mqtt.js --codesend /path/to/codesend --mqttHost mqtt-broker.local
editing the options to point to your codesend binary and your MQTT broker
Docker
- Clone this repo
- Follow the first step above related to wiring your pi
docker-compose up sniffer
and record the values of the button presses- Edit
config/config.js
with these values - Copy
.env-sample
to.env
and editMQTTHOST
value docker-compose up -d server
Homebridge Setup
Install homebridge-mqttthing
Add these accessories in config.json
, editing url
to point to your MQTT broker. Change the names of the light as desired.
{
"accessory": "mqttthing",
"type": "lightbulb",
"name": "Backyard Lights",
"url": "mqtt://o.xrho.com",
"topics": {
"getOn": "backyard/getOn",
"setOn": "backyard/setOn",
"getBrightness": "backyard/getBrightness",
"setBrightness": "backyard/setBrightness"
}
},