Aircraft Engine Preheater Remote Switch

Web Software

The controller needs to be told what to do. And for that, I wrote a basic web application. The first version had just a simple toggle switch, but for the ultimate convenience, I opted to add a scheduling scheme.


Left/foreground: a simple one-page interface. The output includes the current status ("on" or "off"), the last time the controller checked the desired status as well as the next time it is scheduled to do so, and the current schedule of events (when to turn it on or off). In this case, the system knows that the controller has not checked-in during the expected window (it is in pieces on a table at the moment!), so there is a warning stating that the controller is INOP.

To turn the heater on, just create a new event under the Schedule section. In this case, the heater will be turned on at 23:45 (or whenever the controller checks in after 23:45 local time). You can set the time zone to anything, which is just for display purposes - behind the scenes it's all UTC. The controller update interval can be set easily, as well (it's set to 5 minute intervals in the above example).

Right/background: a custom icon adds a touch of class.


The web software has a primitive API that is used by both the interface (Javascript) as well as the controller (Python). It generates JSON output like the below.

		"status": "pass",
		"state": "off",
		"heartbeat_timestamp": "2016-11-08 14:55",
		"next_heartbeat_timestamp": "2016-11-08 15:00",
		"events": [{
			"state": "on",
			"start_time": "2016-11-10 23:45"
		"errors": [
			"Controller is off-line."

Controller Software

The controller itself needs different software to operate. This one is pretty simple: there's one Python script that checks the API and turns the switch on or of, sleeps for the specified interval, then repeats. It also coordinates a countdown on the display and sets some status LEDs through the various GPIO pins on the Pi.