Pool Main

The "Tcl" program.

I used Tcl/Tk for the GUI. By using Tcl/Tk, I could use the same code for either a linux box on my network, or my android phone using the Androwish package. I looked at creating an app from scratch for android, but way too much work. I found androwish by accident while googling and found it perfect for my application. The base androwish is pretty big, but once it is installed on the phone, it is possible to add additional apps using minimal space. The great thing about this approach is you can very quickly verify changes to the GUI on the linux box and once you have it the way you want, you can push it to the phone and have the same look and feel. Very cool.

Upon launch, the GUI displays the current status including which relays are active and why, temperature of all probes and time. Multiple clients can be connected to the daemon at the same time if desired.

Status display mode

The status is updated about once every 5 seconds as specified in the Tcl. The C program merely responds to the request of the client, so the update interval is set by the Tcl code. The buttons will switch to "off" if the relay is active for any reason. Further the relay name will change color if it is active. Pressing the off or on button will toggle the state of the relay unless the relay is on because of a freeze condition or if the relay is on because it must be on as a requirement of another relay being on.

By clicking on the Timers button, the timer page will display.

Timer display mode

By clicking on the various relay names, the relay's current timer configuration is displayed. Simply change the value(s) desired and click the "Set" button at the bottom to change a timer value. Active values are shown in green. Specify a dash to disable a timer. To modify basic configuration data, click on the Config button.

Config display mode

In the config mode, you can adjust the names of the relays and their dependancy, the freeze protection parameters, the sensor parameters or save all of the changes (timer values, names, dependancies etc.) that you have made so the next time the system is rebooted, the changes are not forgotten. Without saving changes, the changes are modified only in memory, so a reboot will revert back to the previous setup.

Click on Setup Pumps/lights to change the names or dependancies of the relays.

Setup display mode

Each relay (element) has a name and a Depends on field. If the Depends on field is blank, then the relay has no dependacy. In the example, the booster pump depends on 0, which is the filter relay. So before the booster pump is activated, the filter pump will be enabled for 10 seconds(requireTime) before enabling the booster. The require time is hard coded in the C program. Click on the Save button to save the changes.

Click on Freeze Protection to change the names or dependancies of the relays.

Freeze Protection display mode

The freeze protection page allows you to define which relays are enabled during a freeze period and the freeze parameters. Simply click on the Protect on/off button to toggle if the relay is sensitive to a freeze. The "On below" field sets the temperature at which freeze mode is activated. Once activated, the freeze mode remains active until the temperature rises above the "Off above" value.

Save Configuration button

Normally changes made are only saved in memory. To push the changes to the flash disk, press the "Save Configuration" button. After pressing the button the poolDefaults file will be updated with the changes made. Alternatively, if you have made changes you wish to abandon, you can always ssh into the BBG, kill the pool process, and restart it. Upon restart, pool will read the old poolDefaults file and revert to the previous configuration.

©2016 Stabie-Soft, Inc. All Rights Reserved.