I’m trying to get a Sonoff SV to control the speed of a Noctau NF-R8 redux pwm fan. I can get it to turn on and off but i’m not able to control the speed by setting the frequency. I’m pretty sure i got it to work a couple of months ago and i doubt i used setting the frequency. But it has been six months so i’m in doubt
This is my code
esphome:
name: dbe-ventilator
esp8266:
board: esp01_1m
# Enable logging
logger:
# Enable Home Assistant API
api:
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
binary_sensor:
- platform: gpio
pin: GPIO0
name: "Aan / Uit"
on_press:
- switch.toggle: relay
switch:
# status light
- platform: gpio
name: "Status LED"
pin: GPIO13
inverted: true
restore_mode: ALWAYS_ON
# definitie relay
- platform: gpio
pin: GPIO12
id: relay
# definition relay action
- platform: template
name: "Ventilator Aan/Uit"
optimistic: true
on_turn_on:
- switch.turn_on: relay
on_turn_off:
- switch.turn_off: relay
output:
- platform: esp8266_pwm
pin: GPIO5
id: pwm_output
frequency: 65000Hz
fan:
- platform: speed
output: pwm_output
name: "DBE Ventilator Snelheid"
id: "DbeVentilator"
When the fan power is connected and i toggle the relay, the fans turn on/off. But as soon as i connect the PWM wire, the fans turn off. So it must have something to do with setting the frequency. I tried everything from 100Hz to 99000Hz. But it doesn’t start the fan.
I’m pretty sure i abandoned the frequecy-path a couple of monts ago because i didn’t get it working but not sure what i used instead