ladies-first-chicken-door

remote control for the ladies first chicken door

Ladies First Chicken Door Control

This is a small webservice for controlling the ladies first chicken door remotely

returns a status object

{
    "state": "sensor",
    "close_line": 22,
    "close_active": false,
    "open_line": 5,
    "open_active": false
}

Open the door:

Building image

I have an image at stakach/ladiesfirst that you can use (see docker-compose.yml)

docker buildx build --progress=plain --label org.opencontainers.image.title=ladiesfirst --platform linux/arm64 --tag stakach/ladiesfirst:latest --push .

Deploying

Designed to run on a raspberry pi zero or zero 2 wireless with a relay hat

Configuring the pi from scratch:

  1. Use the Raspberry Pi Imager
  2. configure with Raspberry Pi OS (other) -> Raspberry Pi OS Lite (64bit)
  3. log into the OS and update: sudo apt update && sudo apt install -y
  4. Install docker-compse
  5. git clone https://github.com/stakach/ladies-first-chicken-door
  6. cd ladies-first-chicken-door
  7. ./scripts/setup_gpio.sh
  8. docker-compose up -d
  9. setup door_boot.service to launch boot_script.sh to ensure the door is in the correct state on boot

Customise docker-compose.yml to match your setup as required. The setup script configures access to the hardware using udev so it can be used from within the docker container. The docker image is highly secure by default.

Documentation

Relay channels 1 and 2 are connected with pin numbers 15 and 29 of the Raspberry Pi GPIO respectively according to the relay hat details

So given the pinout:

image pinout details

and given the output from running gpioinfo (install via sudo apt install gpiod libgpiod-dev) we can determine the lines that the relays run on.

  • Relay channel 1 == pin15, GPIO22 (line 22)
  • Relay channel 2 == pin29, GPIO5 (line 5)
Repository

ladies-first-chicken-door

Owner
Statistic
  • 1
  • 0
  • 0
  • 0
  • 6
  • 10 months ago
  • October 7, 2023
License

Links
Synced at

Sun, 24 Nov 2024 17:55:57 GMT

Languages