I purchased a Buzzer module with Low level trigger. The pin is GND, I/O, VCC with MH-FMD label. I am not sure it can do the RTTTL for esphome yaml. Every time I connect the I/O pin to Wemo D1 Mini pin it just buzzed. What I did wrong? If this is just a buzzer what is the ESPHOME codes to the D5 pin will not ground by default?
Hi
Not enough information to work with. Show your ESPhome Yaml and someone might be able to offer help.
I think I figure it out. I try to connect using the D1 Wemo Mini board but do not have PWM pin to work with RTTL Buzzer. IS the correct?
The Wemos D1 mini has several PWM pins. You have not shown your YAML for the buzzer.
output:
- platform: esp8266_pwm
inverted: true
pin:
number: D7
This is part of my YAML.
did you make this work? can you share full yaml file please
This works for me.
esphome:
name: d1-mini-rtttl
friendly_name: D1 Mini Rtttl
esp8266:
board: esp01_1m
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "******"
services:
- service: play_rtttl
variables:
song_str: string
then:
- rtttl.play:
rtttl: !lambda 'return song_str;'
ota:
password: "******"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "D1-Mini-Rtttl Fallback Hotspot"
password: "*****"
captive_portal:
output:
- platform: esp8266_pwm
pin: GPIO5
id: rtttl_out
rtttl:
output: rtttl_out
on_finished_playback:
- logger.log: 'Song ended!'
esphome:
name: backroom
platform: ESP32
board: esp32dev
api:
services:
- service: play_rtttl
variables:
song_str: string
then:
- rtttl.play:
rtttl: !lambda 'return song_str;'
- output.turn_off: rtttl_out
ap:
ssid: "Backroom-Temp-Rtttl-Button"
password: "444444444"
captive_portal:
output:
- platform: ledc
pin: GPIO19
id: rtttl_out
inverted: True
zero_means_zero: True
rtttl:
output: rtttl_out
This is for ESP32.
thank you very much.
I manage to make it work but the volume is very low