For Home Assistant
NodeMCU based IR blaster that controls generic RGB lights, like cheap RGB strips RGB bulbs etc. IR LED is connected to the D2 pin, refer to this wiring diagram. You need a transistor to drive the LED.
The Home Assistant sees the NodeMCU as an RGB light, but since there are only 16 colours in the lights being controlled, the code tries to pick the closest colour available.
Generic 24-key IR remotes usually uses NEC protocol. The library used by the code requires that IR codes be reversed. For example address 0xEF00 is 0x00F7 and command 0xFB04 is 0x20DF.
Add this to the configuration.yaml
mqtt:
- light:
schema: json
name: mqtt_rgb_light
command_topic: "home/livingroom/light/set"
supported_color_modes: ["rgb"]
- Make a better algorithm for choosing the colour
- Add more documentation
- Implement animations