Skip to main content

🐟 Smart fish feeder: weather-based feeding system with BMKG & Telegram alerts

Workflow preview

Workflow preview
100%
🐟 Smart fish feeder: weather-based feeding system with BMKG & Telegram alerts preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

️ Intelligent Aquaculture Automation for Indonesia Transform your fish farming operation with this cutting edge n8n workflow that combines Indonesia's official BMKG weather data with IoT powered ...

Best for

  • Engineering automation workflows
  • Miscellaneous automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.scheduletrigger, n8n-nodes-base.set, n8n-nodes-base.code, n8n-nodes-base.httprequest, n8n-nodes-base.if, n8n-nodes-base.merge, n8n-nodes-base.telegram, n8n-nodes-base.stickynote

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Tegar karunia ilham.

Original n8n.io source

1.1 Workflow description

Title
🐟 Smart fish feeder: weather-based feeding system with BMKG & Telegram alerts
Workflow name
🐟 Smart fish feeder: weather-based feeding system with BMKG & Telegram alerts

🌦️ Intelligent Aquaculture Automation for Indonesia

Transform your fish farming operation with this cutting-edge n8n workflow that combines Indonesia's official BMKG weather data with IoT-powered feeding automation. This system intelligently reduces feed by 20% when rain probability exceeds 60%, preventing overfeeding during adverse weather conditions that could compromise water quality and fish health.

πŸš€ Key Features

🌦️ Real-time BMKG Integration: Fetches official Indonesian weather forecasts every 12 hours using BMKG's public API with precise ADM4 regional targeting

πŸ€– Smart Decision Engine: Advanced JavaScript algorithms analyze 6-hour and 12-hour rain probabilities to make optimal feeding decisions automatically

πŸ“± ESP8266 IoT Control: Seamlessly sends HTTP webhook commands to your ESP8266/ESP32-based fish feeder hardware with JSON payloads

πŸ’¬ Rich Telegram Notifications: Comprehensive reports including weather analysis, feeding decisions, hardware status, and next feeding schedule

⏰ Precision Scheduling: Automated execution at 05:30 and 16:30 WIB (Indonesian Western Time) with cron-based triggers

πŸ“Š Activity Logging: Complete audit trail with timestamps, weather data, and feeding decisions for operational monitoring

πŸ› οΈ Technical Architecture

Core Node Components:

  • Schedule Trigger: Automated twice-daily execution
  • HTTP Request: BMKG API integration with timeout handling
  • Code (JavaScript): Weather parsing and feeding ratio calculations
  • IF Condition: Intelligent branching based on configurable rain thresholds
  • Telegram: Formatted notifications with markdown support
  • Set Variables: Secure credential management with placeholder tokens

πŸ“‹ Prerequisites

βœ… n8n Instance: Self-hosted or cloud deployment
βœ… Telegram Bot: Create via @BotFather for notifications
βœ… ESP8266/ESP32: Hardware with servo motor for automated feeding
βœ… Arduino Skills: Basic programming knowledge for hardware setup
βœ… Indonesian Location: Uses BMKG API with ADM4 regional codes

βš™οΈ Configuration Requirements

πŸ“ Location Settings: Update latitude, longitude, and BMKG ADM4 code in the Config node
πŸ€– Telegram Bot: Configure bot token and chat ID in credentials
πŸ”— ESP8266 Webhook: Set your device's IP address for hardware communication
πŸ“Š Feeding Parameters: Customize rain threshold (default: 60%) and feed reduction (default: -20%)

🎯 Perfect For

🏭 Commercial Aquaculture: Large-scale fish farming operations requiring weather-aware feeding 🏠 Hobbyist Enthusiasts: Home aquarium and pond automation projects
🌱 Smart Agriculture: Integration with comprehensive farm management ecosystems πŸ”§ IoT Learning: Educational platform for weather-based automation development 🌍 Environmental Research: Combining meteorological data with livestock care protocols

πŸ“Š Rich Output Examples

The workflow generates detailed Telegram reports featuring:

  • Current Weather Analysis: 6-hour and 12-hour rain probability breakdowns
  • Feeding Decision Logic: Clear rationale for feed adjustments with percentages
  • Hardware Confirmation: ESP8266 response status and command execution verification
  • Schedule Preview: Next automated feeding time with countdown
  • Historical Logs: Comprehensive activity tracking for pattern analysis

πŸ”§ Hardware Integration Guide

Designed for ESP8266-based feeders accepting HTTP POST commands. The workflow transmits structured JSON containing:

{
  "command": "FEED_REDUCE_20",
  "feed_ratio": -20,
  "rain_prob": 75,
  "timestamp": "2024-09-18T10:30:00Z",
  "location": "Main Pond"
}

🌍 Regional Adaptation

Indonesia-Optimized: Built specifically for BMKG's official weather API with ADM4 regional precision Global Compatibility: Easily adaptable for international weather services by modifying HTTP requests and parsing logic Scalable Architecture: Supports multiple pond locations with separate ADM4 configurations

πŸ”’ Security & Credentials

  • All API keys use {{PLACEHOLDER}} format for secure credential management
  • No hardcoded sensitive information in workflow nodes
  • Telegram bot tokens managed through n8n's credential system
  • ESP8266 webhooks support local network security

πŸ“ˆ Performance Benefits

  • 20% Feed Optimization: Automatic reduction during high rain probability periods
  • Water Quality Protection: Prevents overfeeding that degrades aquatic environment
  • Cost Efficiency: Reduces feed waste while maintaining fish health
  • 24/7 Monitoring: Continuous weather analysis without manual intervention
  • Scalable Operations: Supports multiple feeding locations from single workflow

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Cron: 05:30 & 16:30 WIB

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.2

Block 2 - Config

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 3 - Build Forecast URL

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 4 - HTTP: Forecast BMKG

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 5 - Parse & Score Weather (6-12h)

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 6 - IF: High Rain Probability

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2

Block 7 - Set: Reduce Feed 20%

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 8 - Set: Normal Feed 0%

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 9 - Merge Branches

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 2.1

Block 10 - ESP8266 Fish Feeder Control

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 11 - Telegram: Send Report

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 12 - Activity Logger

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 13 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow 🐟 Smart fish feeder: weather-based feeding system with BMKG & Telegram alerts
Complexity intermediate
Nodes 13
Categories Engineering, Miscellaneous
Author Tegar karunia ilham
Published 17 Sept 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/8667/8667.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does 🐟 Smart fish feeder: weather-based feeding system with BMKG & Telegram alerts do?

️ Intelligent Aquaculture Automation for Indonesia Transform your fish farming operation with this cutting edge n8n workflow that combines Indonesia's official BMKG weather data with IoT powered ...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Engineering, Miscellaneous use case.