Enhancements
We’ve noted several enhancements you might make throughout the chapter. The following are relatively straightforward additions to the software:
1. You might want to use some or all of the other four, requiring that you expand the rule editing dialog box and supporting code.
2. If the console or transmitter battery has failed, the program could (via a MAPI interface or another device and a HomeSeer script) send e-mail to your usual mailbox to warn you of the problem. You could examine the status each time the program accesses the hardware.
3. Similarly, you might add an e-mail alert if one of the sensors gets too dry.We put one of our sensors in a planter not serviced by sprinklers, not to use it to drive a rule, but to have a digital readout of the planter status. Because responding to that sensor requires manual action, it’s convenient to have an alert.
4. There are commands we’ve put in the software that don’t correspond to buttons on the toolbar. You could add the buttons. Additionally, you could implement visual marking, and copy operations to the clipboard.
5. You might not want the program to always be open on-screen. It will minimize now, but even so takes space in the taskbar. Instead, you could modify it so on minimize it only has an icon in the tray.
If you’re more ambitious, here’s a list of more challenging enhancements:
1. You could implement all the functionality of a standard automated sprinkler control, using the Rain8 circuit board for direct control. That would let you eliminate the standard controller altogether and any limitations on what you can program into the cycles since you’d be writing the software yourself.
2. It’s possible you’d want to include readings from additional sensor types into your rules, or want to use actual in-ground soil temperature probes to calibrate the moisture sensors. The moisture probe readings are sensitive to the soil temperature, so you’ll get a more accurate reading if you compensate against soil temperature.We use one of the soil moisture probes, but used above ground in the shade to read outside temperature. The software incorporates that adaptation, so if you’re really using soil temperature probes for their intended purpose, you’ll need to do some rework in the data acquisition classes.
3. If you take our suggestion of writing a complete software suite to implement the sprinkler controller function entirely within your PC, you could abandon the notion of fixed water cycles and time of day to water. Instead, you could combine the historical data record with a control algorithm to compute how long to water and when.We suggest you also give the algorithm minimum and maximum time limits per cycle, minimum inter-cycle times, and guidance on when watering is permissible based on your own schedule. That’s a complex proposition; a simpler enhancement would be to simply avoid banned watering times.