Skip to content

Instantly share code, notes, and snippets.

@ataa
Created January 31, 2024 23:55
Show Gist options
  • Save ataa/c89e14c7b3bba01d4944f633b107e5f1 to your computer and use it in GitHub Desktop.
Save ataa/c89e14c7b3bba01d4944f633b107e5f1 to your computer and use it in GitHub Desktop.
iLonda Fish Feeder ESPhome Configuration (with Tuya WBR3 - RTL8720CF Module)
esphome:
name: fish-feeder
friendly_name: Fish Feeder
rtl87xx:
board: wbr3
family: rtl8720c
framework:
version: 0.0.0
source: https://github.com/libretiny-eu/libretiny.git#feature/realtek-update
logger:
# Enable Home Assistant API
api:
# At the moment, ota is not supported on this chip
# ota:
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot in case wifi connection fails
ap:
ssid: "Feeder Fallback Hotspot"
password: "JEpb0jhQH8Wy"
# Binary Sensor to allow relay to be switched when physical button is pressed
binary_sensor:
- platform: gpio
id: button
pin:
number: GPIO18
mode:
input: true
pullup: true
inverted: True
name: 'Switch feeder'
on_press:
- switch.turn_on: relay
- platform: status
name: "Status"
switch:
# Switch to turn feeder on for 3 seconds/off and turn on/off LED
- platform: gpio
name: 'Relay feeder'
id: relay
pin: GPIO2
on_turn_on:
- light.turn_on: led
- delay: 3s
- switch.turn_off: relay
- light.turn_off: led
restore_mode: ALWAYS_OFF
sensor:
# Feeder counter
- platform: pulse_meter
pin: GPIO3
name: 'Counter/min'
unit_of_measurement: 'time(s)'
internal: true
total:
unit_of_measurement: 'time(s)'
name: 'Counter feeder'
# To allow led to be controlled via GPIO
output:
- platform: libretiny_pwm
pin:
number: GPIO19
inverted: true
frequency: 1000 Hz
id: pwm_output
# LED control
light:
- platform: monochromatic
output: pwm_output
id: led
@ataa
Copy link
Author

ataa commented Jan 31, 2024

f5a2ebf65aa5477883b1f3a8785c6309

@ataa
Copy link
Author

ataa commented Feb 1, 2024

Screenshot 2024-02-01 at 03-59-32 Settings – Home Assistant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment