I use a Raspberry Pi 3 B to control my coop door and lighting. It opens the door (right now) at dawn and closes the door at dusk. I'm working on the code to automatically start adding 5 minutes per day of light from a date I picked until 14 hours of light is reached then stop adding extra light until the next start date. Each night when the date changes (my new code) the astral times are updated with the dawn, sunrise, sunset and dusk times (more if needed). There is really no need to try and use some bloated spyware like Google lol. The RPi does need a connection to the internet to update the astral times but you have a LAN cable out at your coop anyway for the cameras right???
@zimirken I've tried the ESP8266 and found that it was a bit flakey and not reliable to open my door. I'm not sure what caused the issues and I tried several to make sure it was not isolated to one. I assume your using the ESP8266 for the WIFI part. I've never looked at blynk before but it looks interesting. While being able to turn on and off something from somewhere else is cool I think opening and closing the door automatically at the correct time is better as you don't have to remember to do it. I've programmed my ESP8266 and the RPi to send me a text message when the door is closed or an email.
I am very interested in collaborating with anyone that wants to use the RPi for chicken automation.
My current working code to test the open and close times of the door.
	
	
	
		Code:
	
	
		#!/usr/bin/env python3
#import datetime
from datetime import date
from datetime import datetime, timedelta
import time
import astral
import pytz
import schedule
localTz = 'US/Central'
loctz = pytz.timezone('US/Central')
coordinates = ["Poplar Bluff", "USA", 36.763084, -90.413871, localTz, 110]
pbmo = astral.Location(info=(coordinates))
pbmo.solar_depression = "civil"
dateFormat = '%b %d %Y'
timeFormat = '%I:%M %p'
lastDate = datetime.date(datetime.now(loctz) - timedelta(days=1))
events = pbmo.sun(datetime.now(loctz))
dawn = events['dawn']
sunrise = events['sunrise']
sunset = events['sunset']
dusk = events['dusk']
def update():
    global events
    global dawn
    global sunrise
    global sunset
    global dusk
    events = pbmo.sun(datetime.now(loctz))
    dawn = events['dawn']
    sunrise = events['sunrise']
    sunset = events['sunset']
    dusk = events['dusk']
    now = datetime.now(loctz)
    print('Today Date {}'.format(now.strftime(dateFormat)))
    print('Update Door Open == {}'.format(now > dawn and now < dusk))
    print('Dawn {}'.format(dawn.strftime(timeFormat)))
    print('Sunrise {}'.format(sunrise.strftime(timeFormat)))
    print('Now {}'.format(now.strftime(timeFormat)))
    print('Sunset {}'.format(sunset.strftime(timeFormat)))
    print('Dusk {}'.format(dusk.strftime(timeFormat)))
def status():
    now = datetime.now(loctz)
    openDoor = now > dawn and now < dusk
    nowTime = now.strftime(timeFormat)
    print('now {}\ndawn {}\ndusk {}'.format(now, dawn, dusk))
    print('Time {} Door Open == {}'.format(nowTime, openDoor))
schedule.every(5).minutes.do(status)
try:
    while True:
        schedule.run_pending()
        today = datetime.date(datetime.now(pytz.timezone('US/Central')))
        if lastDate != today:
            lastDate = today
            update()
        time.sleep(.1)
except KeyboardInterrupt:
    # here you put any code you want to run before the program like RPi I/O cleanup
    # exits when you press CTRL+C
    print('\nKeyBoard Interrupt')
except Exception as e:
    # this covers all other exceptions
    print(str(e))
	 
 
JT