Skip to content

j-chimienti/pollofeed

Repository files navigation

⚡ Pollofeed ⚡ 🐔😂

Bitcoin Lightning-powered remote chicken feeder on Raspberry Pi
Real BTC micropayments → chickens get fed in <3 seconds. 100% automated, zero disputes ever.

Live Demos & Community Videos (2019 production run + coverage)

Bitcoin Magazine Demo

Production Architecture (Async + Real-Time Broadcast)

graph TD
    A[Lightning Invoice Paid] --> B[order_new queue]
    B --> C[Worker picks up]
    C --> D[order_processing queue]
    D --> E[Servo drops feed + ffmpeg records]
    E --> F[order_complete queue]
    F --> G[WebSocket broadcast → every viewer sees chickens go nuts]
    style A fill:#f9f,stroke:#333
    style G fill:#bbf,stroke:#333

Loading

Queues: order_new → order_processing → order_complete Tech Stack

Core: Node.js / JavaScript (original public version) Payments: Bitcoin Lightning Network (invoices + webhooks via BTCPay Server) Real-Time: WebSockets + ffmpeg for low-latency streaming Messaging: RabbitMQ (async workflows) Hardware: Raspberry Pi + Arduino/servo control + Python scripts Infra: Docker, Cloudflare, SendGrid Evolution: Later rebuilt core concurrency logic in Scala for better type-safety and performance (code available on request – showcases my professional Scala expertise in high-volume systems)

Key Challenges Solved

Real-time live camera for multiple concurrent viewers: Optimized ffmpeg + WebSockets for low-latency streaming over variable internet – supported simultaneous watchers without drops (similar to real-time frontends handling 40–50k daily transactions at Event Dynamic). Reliable feeder mechanism: Calibrated servo control via Raspberry Pi API – ensured consistent food dispense on every successful payment. Animal-proofing & hardware durability: Chickens and squirrels destroyed early prototypes (chewed plastic, damaged motors) – iterated with chicken-wire enclosures and metal reinforcements for long-term reliability. Lightning payment status & failures: Handled webhook race conditions, expired invoices, and network failures with retries and user notifications – achieved 100% reliability in production (zero disputes).

Traction & Impact

Featured in Bitcoinist.com and Bitcoin community Real-world micropayments processed reliably across timezones

Running Locally (<5 min)

cp example.env .env
npm install
npm run start:dev

About

Bitcoin Lightning-powered remote chicken feeder – real-time IoT streaming & micropayments on Raspberry Pi

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors