OpenAg Wiki Archive
Archived Contents from the original OpenAg Wiki (snapshot on Apr 8, 2020)
The archived wiki only includes information up the v3.0 version of the PFC-EDU, and is here for preservation purposes. You can find resources about the latest version of the PFC v4.0 on the Personal Food Computer resources page.
MVP 1.0 User Interface
This is a work in process. Details will be added over the next several days, and code will be made available on Github. Specific documentation on the code will be in the https://github.com/futureag README.md and within the code itself.
The UI is a composite of various small parts that come together to create a local, but web accessible interface to temperature and humidity charts, and the latest image from the camera.
While it took a bit to pull all of this together, each part is small and simple. I consider this code less of a finished product (though it is a MVP complete deliverable) that a starting point for to hack and expand. You should need little knowledge of Python and shell scripts to get started.
Assumptions
- Camera images are stored in ~/Documents/OpenAg-MVP/webcam
- Sensor data is stored in CouchDB, in a mvp_sensor_data database (record layout described elsewhere)
- You can do some port forwarding on your router to make the site accessible.
Parts
- CouchDB views that give query access to the data
- A bash shell script the moves the latest picture to the web directory, and generates SVG files of the data charts. This script is invoked once an hour by cron.
- A static index.html file that displays the chart and pictures in separate tabs.
- A shell script that calls the Python HTTP Server code
- A minimalist Python web server (SimpleHTTPServer) configured to display SVG images.
- Port forwarding enable on your router.