Skip to content

NitramLegov/ChickenDoorControl

Repository files navigation

ChickenDoorControl

This repository contains code in order to automatically open and close a chicken door based on sunset and sunrise at a given location.

Hardware prerequisites

The code is based on the following hardware:
Raspberry pi (tested on a RPi A, Rev 2)
Sainsmart 2 channel Relai
DS3231 RTC with this board

Installation

Simply download the repository and run:

cd ChickenDoorControl/ChickenDoorControl/
sudo ./Install.sh

If you want everything in one command, just pate the following into the command line:

sudo apt-get update && sudo apt-get install git -y && git clone https://github.com/NitramLegov/ChickenDoorControl.git && cd ChickenDoorControl/ChickenDoorControl && sudo ./Install.sh

Please put special notice on the following manual task:
In order to enable the RTC hardware, please do the following:

  1. reboot
  2. Edit the following file: /lib/udev/hwclock-set
    comment out the following lines:
if [ -e /run/systemd/system ] ; then
    exit 0
fi

Usage

  1. Any configuration is stored in ChickenDoorControl/ChickenDoorControl/ChickenDoorControl.conf
    In here, you can edit the pins for opening and closing the door (BCM Layout)
    you can also edit the time needed for opening & closing (in seconds)
    the default config is:
    [Doorcontrol]
    up_pin = 27
    down_pin = 17
    time = 30
    
  2. The sainsmart module should be powered with 5V
  3. Please note the system is designed to run headlesss. It uses the hardware watchdog to automatically reboot if the pi gets hung up.

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published