manbearwiz / Ayos

Python script to precisely control grow light fixtures according to your current locations sunrise and sunset.
3 stars 0 forks source link

Ayos

Ayos is a Python3 script to precisely control grow light fixtures according to your current location's sunrise and sunset in order to accurately simulate photoperiodism. This means that your plants will be exposed to light for a marginally different amount of time each day just like they would with natural light. Also this is a justification for me to use a Raspberry Pi to control grow lights rather than a $5 timer.

Dependencies

The following packages should be installed prior to running Ayos.

Hardware

My current setup is a Raspberry Pi hooked up to a 4-channel 5V relay via GPIO. Raspberry Pi GPIO ports only put out 3.3V but in my testing this doesn't seem to cause any issue. I have a ULN2803A chip laying around that I may wire up to power the relays on a separate PSU when I get time.

Usage

Thanks to my fork of SimpleDaemon, Ayos can be run like so:

./ayos start --lat 42.7371 --lon 90.4775 --port 4

Stopping is similar:

./ayos stop

For a full list of options, see the help:

./ayos --help

Future Enhancements

Portabliity

Not to other systems, but rather other locations. As of right now everything is hardcoded to my location, Platteville WI. If anyone wanted to make it customizable via command-line options and argparse I would happily merge it in.

Geocoding

Relating to enhancement above, including geocoding via The Google Geocoding API would be a significant usability improvement. I attempted to use pygeocoder and geopy but unfortunately they both have setup issue on my system when I use pip. Not sure the reason why.

About

Namesake

Ayos is an alternate pronunciation of Eos, the Greek goddess of the dawn.

License

The source is released under the MIT-License.