I'm building a hydroponic garden, and using a Phidgets 8/8/8 interface kit with an separate external 8 channel relay set and a raspberry pi to be able to monitor and control lights and pumps with configurable events.
I plan to control through digital output and 8 channel relay:
Timing of at least 3 lights
Timing of at least 3 water pumps
And I plan to monitor:
Lux from lights ( to monitor light performance)
CO2 content of Air in room
Current of power circuit in room ( to find Watts used)
The main loop will have a resolution of 1 minute, re-read the event file each time, and check whether to turn on or off devices.
The PI OS is Raspbian
Core program is in Python 2.7.3
Added the Flask framework for interface between web scripts and core program
Web interface is PHP/Apache 2
I still have to get into the monitoring portion of code, but the web interface and event timer is well on its way, except I don't have much(any?) data validation yet. I also have the ability to override the automated events, and manually turn ports on and off, and since I have the web interface, I can control it from my phone (or whatever).
I haven't seriously programmed something like this for some time, and I've never programmed with Python, but wanted to learn, so my code is likely not great and not very "pythonic".
I'd like to post my current code and hope for feedback of tips and critisisms, but it looks like new forum users can't attach files, so maybe I'll try again another time.