Dew point ventilation controller software, written in Python
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
LICENSE
README.md
average.py
component.py
control.py
dcf77_reader.py
dcf77_thread.py
devices.py
display.py
endscreen.bin
endscreen.png
fan.py
fancontrol.cfg
htmlwriter.py
index.html
ip.py
led.py
menu.py
messageboard.py
rwlock.py
sensor.py
sht75.py
shutdown.py
signals_handler.py
splash_screen_generator.py
startscreen.bin
startscreen.png
startscreen.sh
statistics.py
status.py
uptime.py
wlan.py

README.md

fancontrol

Dew point ventilation controller software, written in Python.

See the project home page: http://danifold.net/fancontrol.html.

Copyright © 2016 Daniel Müllner http://danifold.net. All changes from 2017-12-27 on: Copyright © Google Inc. http://google.com. License: GPLv3, https://www.gnu.org/licenses/gpl-3.0.txt.

This package is not meant to be used out-of-the-box since it was coded for a unique hardware device. Nevertheless, it is modular and flexible, hence could be useful as a basis for your own controller if you build a similar device to mine.

The heart of the controller is the message board. All information flow is directed through this module. All other components register here and subscribe to messages or directly query information from other components.

Message board
Main module
  • control.py: This is the entry point to the controller. Call this script to start the software. All components are started and stopped from here. Add or remove components according to your own setup.
Components
  • component.py: Contains the base class for all components. Components react to messages and may either run in the main thread (for non-blocking operations) or have their own worker thread for more computationally intensive tasks.
  • average.py: Small component to compute the average of the last measurements over a given period.
  • dcf77_thread.py: Component for receiving a DCF77 radio clock signal. Optional.
  • devices.py: Component to control the relays for the connected (mains voltage) devices. This needs to be adapted to the actual installation: e.g., one fan, two fans (push-pull configuration?), or one fan and a window motor as in the original setup.
  • display.py: Component for text display on my small LCD screen. Should be adapted to your specific screen. A minimal version of the ventilation controller could also leave the display out.
  • fan.py: This component decides when the ventilation is switched on and off. Use the provided algorithm or adapt it to your own needs.
  • htmlwriter.py: Component to publish live data online. Optional. Needs to be adapted to your web server setup.
  • menu.py: Component for the onscreen menus and button controls. The “user interface“ is implemented here.
  • sensor.py: Component for the measurements (the non hardware-specific part).
  • status.py: This component receives information from all other components and generates status information for the built-in display and the web interface.
  • wlan.py: Query network status, restart WLAN connection.
Hardware drivers
  • dcf77_reader.py: Device driver for the external radio clock module. Implements the DCF77 protocol. Probably only small changes needed to adapt to different receiver hardware.
  • sht75.py: Hardware-specific part of the sensor component: driver with the bus protocol and readout routines. Use this module for Sensirion sensors or replace for other types of sensors.
Configuration
  • fancontrol.cfg: Part of the configuration is stored here. Note that some specifics are still hard-coded. If needed, the configuration feature could be made more extensive.
Helper modules
  • ip.py: Determine the computer's local and public IP addresses.
  • shutdown.py: Shut the computer down.
  • signals_handler.py: Handler for Unix signals to allow graceful termination (e.g., close the window before the controller terminates).
  • uptime.py: Determine the uptime of the computer. All time intervals in the controller software are measured by uptime diffences, except the logging timestamps. Uptime has the advantage that it is never adjusted, so the controller is not confused when the real-time clock (Unix time) is adjusted.
  • rwlock.py: Two different reader-writer locks, used by the message board.
Data
External scripts

The following scripts are not used by control.py and its submodules.