iLonda Fish Feeder

Configuring web API on the esphome device allows you to access it via port 80 using its IP on a browser. Try it and if nothing appears, then you’d need to add ir to your esphome yaml configuration and flash it again.

Memory consumption by web server is on the esp itself, not on the HA server.

If you move the esphome dashboard to another server, you can copy the esphome config folder from HA to the corresponding folder in the new machine and you won’t need to reflash anything.

Tbe esphome dashboard is only required to change config and flash, not for the normal esphome functioning.

Thanks to all in this thread!

I just wanted to post two small modifications to the config for ESP home.

1 - My pulse counter was often double counting my feeds - to fix this, I added in internal_filter_mode: PULSE as below

sensor:
# Feeder counter pulse meter
  - platform: pulse_meter
    pin: GPIO12
    id: pulse_count
    name: 'pulses'
    internal_filter_mode: PULSE
    internal: true
    total:
      unit_of_measurement: 'times'
      name: '${name} Counter'

2 - I added in a switch to reset the counter from the UI:

# Switch to reset pulse counter
  - platform: template
    name: '${name} Counter Reset'
    restore_state: false
    entity_category: config
    turn_on_action:
      - pulse_meter.set_total_pulses:
          id: pulse_count
          value: '0'

3 - updated the LED to a single config bock and so that the LED also shows the API status. Remove the output: block and replace the light: block with

light:
  - platform: status_led
    id: led
    pin:
      number: GPIO5
      inverted: true

Cheers!

2 Likes

Thanks, appreciate all the help!

Looks like all I needed to do was add this:

web_server:
  port: 80

Thanks for the neat trick :slight_smile:

1 Like

If i use the Tuya integration, would i be able to control all these things as with Tasmota?
Also, the favour here seems to be towards ESPhome. What’s the advantage over just Tasmota?

Finally, what commands does one use for MQTT ?

How to modify this for the new-ish ‘button’ instead of the ‘switch’?

Does anyone know if this can be done with the
iLONDA L87 Automatic Pond Feeder 10L ?

In order to convert to buttons, a few changes need to be made. First, internalize the gpio switch by removing its name from the config and remove any scripting from the GPIO and move it to your new button (optional) and reassign your physical button (sensor) to use the button instead of the switch (if you moved the scripting to the button instead of GPIO switch). The reset switch can be changed to a button just by moving it to your button section and changing on_turn_on to on_press like below.

My button conversion looks like this:

# Binary sensor to activate feed cycle when physical button is pressed
binary_sensor:
  - platform: gpio
    id: push_button
    pin:
      number: GPIO4
      mode:
        input: true
        pullup: true
      inverted: true
    name: '${name} Button'
    on_press:
      - button.press: feed_cycle

switch:
# GPIO switch to activate relay
  - platform: gpio
    id: relay
    pin: GPIO14
    restore_mode: ALWAYS_OFF

button:
# Button to activate feed cycle
# One feed cycle is: turn on relay and LED, pause 3 seconds, turn off relay and LED
  - platform: template
    name: '${name}'
    id: feed_cycle
    on_press:
      then:
        - switch.turn_on: relay
        - light.turn_on: led
        - delay: 3s
        - switch.turn_off: relay
        - light.turn_off: led

# Button to reset pulse counter
  - platform: template
    name: '${name} Counter Reset'
    entity_category: config
    on_press:
      - pulse_meter.set_total_pulses:
          id: pulse_count
          value: '0'
1 Like

Hello, I try to migrate from tasmota to ESPHome, but the feeder counter does not work, the value always 0. Could someone help me?

This is my code:

# Substitutions
substitutions:
  device_name: mangiatoia_automatica

esphome:
  name: ${device_name}


esp8266:
  board: esp01_1m



wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
# Directly connects to WiFi network without doing a full scan first
  fast_connect: true
  # Optional manual IP
  manual_ip:
    static_ip: 192.168.1.97
    gateway: 192.168.1.1
    subnet: 255.255.255.0

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Gg Fallbacotspot"
    password: "1BjfeWtZ7U"

## Web interface for fallback hotspot 
captive_portal:

# Enable logging
logger:

web_server:
  port: 80
  auth:
    username: !secret web_server_username
    password: !secret web_server_password
# Enable Home Assistant API
api:

ota:
  password: "624cab9663aa238caec714bb9c301641"


    # Binary sensor to activate feed cycle when physical button is pressed
binary_sensor:
  - platform: gpio
    id: push_button
    pin:
      number: GPIO4
      mode:
        input: true
        pullup: true
      inverted: true
    name: '${device_name} Button'
    on_press:
      - button.press: feed_cycle

switch:
# Switch to turn feeder on for 3 seconds/off and turn on/off LED
# GPIO switch to activate relay
  - platform: gpio
    id: relay
    pin: GPIO14
    restore_mode: ALWAYS_OFF

# Switch to reset pulse counter
  - platform: template
    name: '${device_name} Counter Reset'
    restore_state: false
    entity_category: config
    turn_on_action:
      - pulse_meter.set_total_pulses:
          id: pulse_count
          value: '0'

# Switch to restart device
  - platform: restart
    name: "Restart ${device_name}"
#

  - platform: template
    name: '${device_name} Counter Reset'
    restore_state: false
    entity_category: config
    turn_on_action:
      - pulse_meter.set_total_pulses:
          id: pulse_count
          value: '0'

sensor:
# Feeder counter
  - platform: pulse_meter
    pin: GPIO12
    id: pulse_count
    name: "Counter/min"
    unit_of_measurement: 'time(s)'
    internal_filter_mode: PULSE
    internal: true
    total:
      unit_of_measurement: 'time(s)'
      name: "${device_name} Counter"



# To allow led to be controlled via GPIO
output:
  - platform: esp8266_pwm
    id: blue_led
    pin:
      number: GPIO5
      inverted: true

# LED control
light:
  - platform: monochromatic
    output: blue_led
    id: led
button:
# Button to activate feed cycle
# One feed cycle is: turn on relay and LED, pause 3 seconds, turn off relay and LED
  - platform: template
    name: '${device_name}'
    id: feed_cycle
    on_press:
      then:
        - switch.turn_on: relay
        - light.turn_on: led
        - delay: 3s
        - switch.turn_off: relay
        - light.turn_off: led
# Button to reset pulse counter
  - platform: template
    name: '${device_name} Counter Reset'
    entity_category: config
    on_press:
      - pulse_meter.set_total_pulses: 
          id: pulse_count
          value: '0'

Hmm… I don’t think that it’s the issue, but you do have TWO switches and a button to reset the pulse counter. You should remove the template switches.

dear all,
I have a usb ttl pl2303, I am not sure how to connect to flash, hope someone can send me a detailed connection diagram, many thanks

Is there something wrong with the way the counter’s “unit of measurement” is set?
I get a warning like this:

The unit of sensor.fishfeeder_counter (times) cannot be converted to the unit of previously compiled statistics (time(s)). Generation of long term statistics will be suppressed unless the unit changes back to time(s) or a compatible unit.

FYI new ESPHome config yaml has moved to Ilonda Wifi Smart Fish Feeder (L88) | devices.esphome.io

Does anyone know if the same works for the gen2 fish feeder? the wifi version
https://www.aliexpress.us/item/3256805283590750.html

I bought the gen2 feeder off Amazon and it looks like it is the same chip. Going to try this once I do some more reading to understand how to do this. Thanks everyone for the thread here.

Update: everything worked with tuya-convert. I didn’t have a pi so I put pi desktop on a stick and booted into that.

My ilonda fishfeeder died it seems ? ESPhome is not able to make it do anything anymore, but i’m not sure it’s ESP’s fault. When i press the button it also doesn’t rotate anymore so maybe a hardware fault ?

Any tips from anyone how to get this thing back alive ?

Seems I was not so lucky, Gen2 from Aliexpress

Same board though so I think I’ll replace the WBR3.

I tried tuya-cloudcutter and it did not work

Replaced the WBR3 with an ESP12-F and works fine, all pins work the same

Guys, any method to flash the WBR3 chip with ANY custom firmware ? The only solution is to replace it with an esp12f?

It would be ok to make a custom firmware, as long as i don’t have to unsolder. Do you know if this is possible ?

I was also “lucky” to get one with the WBR3 board mounted.

Solution was to steal a ESP12-F from a Wemos D1 mini from the drawer, and mount that instead :slight_smile:

ESPHome has partial support for this module via LibreTiny, you can flash it and the fish feeder functions work as expected, but there’s no OTA and as far as I know, removing the module from the main PCB is the only way to flash it (it’s done using the pins located under the module.)


rtl87xx:
  board: wbr3
  family: rtl8720c
  framework:
    version: 0.0.0
    source: https://github.com/libretiny-eu/libretiny.git#feature/realtek-update
1 Like