Hi All,
As promised, here is an update of the status of my RaspberryRelay program. It is a program I wrote and talked about a long time ago. It is developed with VA Smalltalk v9.2.2 on Windows and runs on a Raspberry Pi under the its Linux OS. The Linux binaries are from the latest v9.2.2 ECAP and copied to the Raspberry, no special install. There are a few scripts to run the program after the computer boots. I package the program on Windows and copy the image to the Raspberry.
I am currently running the program on a Raspberry Pi 3. I tried running it on Raspberry Pi Zero but it was unstable. I think the binaries aren't quite right as the Zero is a little different from the other Raspberries.
The program is designed to be very general. It gives the user control over all the GPIO pins. You can wire the pins to turn relays on and off (some transistors and resistors are needed). My latest changes allow pins to be grouped together. The group can be started at a set time turning on one pin after another.
I use this feature to control my lawn sprinkler system. Each pin in the group controls a relay that controls a water valve, one for each lawn sprinkler zone. My lawn sprinkler system also has a main water valve that must be one for the other valves to get water. The program allows pins to be activated when other pins are activated. The main water valve is controlled by a pin that is activated when any of the other pins in the group are activated. This allows me to turn on any zone and have the main valve automatically go on. Note, when all the pins are off the main pin goes off.
I don't like the lawn watered if it is going to rain. Thanks to a little help from Seth, I am able to get a weather forecast via the internet. That forecast includes a PoP (probability of precipitation). Settings allow checking to see if the PoP is greater than a given amount and not run the sprinklers. I can also tell it to not run on Saturdays (or what ever day) so I can mow the lawn.
I also have a relay set up to open or close my garage door. And another pin set to sense a switch that knows it the garage door is open or closed. This has nothing to do with the lawn sprinkler system but the program doesn't care. You wire the pins in any way you want and use the settings to descript how the pins are wired and what they do.
The program runs headless. In my case it is housed in a plastic box in my garage, without a keyboard or mouse. One can PuTTy or VNC into the OS, which is good but the real beauty is that the program is a Seaside web site. You can connect to it with a web browser. If you punch a hole in your network firewall, you can connect to it from anywhere, even with a smartphone. You can see what is going on and change the settings. This is why I was playing with all that jQuery dialog stuff.
Enough with me bragging about my program. Let me brag about VA Smalltalk. I think it is amazing, that with this first class development system, we can make programs on Windows and copy them to a Linux system and run them. Just as amazing, it can be run on a little computer that with memory and power supply cost about $100.
Lou