blazoncek / WLED

Control WS2812B and many more types of digital RGB LEDs with an ESP8266 or ESP32 over WiFi!
MIT License
31 stars 0 forks source link

PWM Fan Mod feature request #10

Closed shupershuff closed 1 year ago

shupershuff commented 2 years ago

Describe the solution you'd like If possible it would be ideal if the PWM fan mod can be managed via the usermod menu (similar to how you can with the multi relay mod). Ideally there would be an option to set the Pin and also the ability to set static fixed % values for PWM for each fan.

It would also be ideal if the % values for each PWM fan could be exposed to MQTT so that these can be remotely changed by things such as Home Assistant.

blazoncek commented 2 years ago

It is possible to modify all parameters using Usermod settings page. Usermod is intended at single PWM output though.

I will consider adding MQTT and JSON API support.

blazoncek commented 2 years ago

JSON API implemented in c6578870f0c908a93510e18624a09682565ae93a.

dosipod commented 2 years ago

Now you going to cost us more money cause we have to buy a lot of fans , thank you image

blazoncek commented 2 years ago

Happened to me as well. We need to thank @srg74 for original request.

dosipod commented 2 years ago

curl http://ip/json -d {"PWM-fan":{"speed":30,"lock":true}} -H "Content-Type: application/json" works and i can control it .

blazoncek commented 2 years ago

Added manual speed control in UI. It will override temperature setting if >0. Can be also set using JSON API.

blazoncek commented 1 year ago

@shupershuff if you want to alpha test MQTT try https://github.com/Aircoookie/WLED/tree/PWM-fan-HA

shupershuff commented 1 year ago

Hi there, cool to see this has progressed heaps. Currently I'm using segments in WLED with 2 of these segments being for some fans. These segments are using the White LED option, I connect the pin to the MOSFET controlling the fans. It's a bit rough but it's been working and I can control in Home Assistant (HA just sees the fans as dimmable lights).

It sounds like with this mod I could control a fan using either the UI, MQTT, or JSON API which is great. I presume that tacho pin can be set to -1 if there isn't one or if I've ran out of PINs :) Is there capability to add more than one fan?

For context, my use case fits well outside of why this mod was built, my WLED controller controls fans on a dead motherboard and dead GPU that I've framed on the wall. image

blazoncek commented 1 year ago

The primary reason for this usermod is temperature control of WLED enclosure and so a primary input is temperature usermod. It will not be possible to control more than 1 fan with this usermod.

Your solution is appropriate IMO and better suited than this usermod.

I would still like you to test if it fulfils your initial request and/or close this issue.

blazoncek commented 1 year ago

As there is no interest of finishing up on this I am closing the issue.