corbanmailloux / esp-mqtt-rgb-led

MQTT RGB LEDs Using JSON for Home Assistant
MIT License
270 stars 74 forks source link

Add GPIO input to manually turn the light on and off #30

Open Ryanmaturi opened 7 years ago

Ryanmaturi commented 7 years ago

Add Gpio inputs to physically turn on and off the light, incase one does not have access to phone. this could be one momentary switch which would increase brightness or decrease if max bright is already met. or if pressed briefly could turn off light. not sure how you would handle RGB

corbanmailloux commented 6 years ago

Thanks for the request. One limitation is that I have been using the 8-pin ESP8266 boards (like in the read me) for these lights, so I'm pretty much out of GPIO pins. I've since started using Wemos D1 Minis as my default board for this kind of project, and I can definitely see cases where a button would be helpful.

When I have time available, this is a feature that I'd like to add. Alternatively, if anyone would like to make the change and open a PR, I welcome it.

depuits commented 6 years ago

I've added button compatibility in my fork. You can use it with other esp modules such as the esp-12 or when you're only using a single color led strip. @corbanmailloux if you like the implementation I would like to make a PR.