Code Monkey home page Code Monkey logo

rpi-feeder's Introduction

RaspberryPi automated feeder

A RaspberryPi automated feeder for pets. What this module does essentially is make sure it rotates a servo motor, connected to a specified pin on the RPI. The application uses MQTT 5 to handle requests and to send responses back.

The feeder can feed on request or by executing a pre-defined schedule.

Configuration

There are several configuration sections for the feeder.

General

General settings for the feeder.

Key Description
dbPath The location in which to store the BoltDB database.
servoPin The control pin to which the servo motor is connected.
portionMs The milliseconds the servo should rotate in order to drop 1 portion of food. That would be dependent on the food dispenser that is used.

MQTT

MQTT specific settings.

Key Description
server The URL to the MQTT broker.
username The username to use to authenticate with the broker.
password The password to use to authenticate with the broker.
clientId The clientId to use to authenticate with the broker.
keepAlive The keep-alive timeout for the MQTT connection.
connectRetryDelay The retry delay in seconds for attempting to reconnect to the MQTT broken if the connection is lost.

An example configuration exists in example_config.json.

MQTT topics used

The following MQTT topics are used by the feeder.

Topic Description
feeder/{clientId}/status The status of the feeder is available on this topic. The status message is persisted and states the current version of the feeder software and whether it is online or offline. The feeder implements LWT message such that when connection is lost the status is automatically updated to offline.
feeder/{clientId}/feed The feeder listens for messages on this topic for performing a manual feed. The message should contain the amount of portions to be dropped.
feeder/{clientId}/feed_log The feed log is available on this topic. Every time the feeder drops food, sends a message on this topic stating the time and the portions that were dropped. If the feeder has lost connection with the broker, it will re-send the current feed log history on its next restart.

rpi-feeder's People

Contributors

imilchev avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.