My RaspberryRelay program

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

My RaspberryRelay program

Louis LaBrunda
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

--
You received this message because you are subscribed to the Google Groups "VAST Community Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/75bafdf0-db7f-4a68-92f9-c8399a8a99a0n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: My RaspberryRelay program

Mariano Martinez Peck-2
Hi Louis,

That looks like a pretty cool system! I am glad you were able to resolve all the issues. Thanks for sharing this awesome news and for the kind words about VAST.

Best, 

On Fri, Jun 4, 2021 at 3:34 PM Louis LaBrunda <[hidden email]> wrote:
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

--
You received this message because you are subscribed to the Google Groups "VAST Community Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/75bafdf0-db7f-4a68-92f9-c8399a8a99a0n%40googlegroups.com.


--

Mariano Martinez Peck

Senior Software Engineer

 [hidden email]
 @MartinezPeck
 /mariano-martinez-peck
 instantiations.com
TwitterLinkedInVAST Community ForumGitHubYouTubepub.dev

--
You received this message because you are subscribed to the Google Groups "VAST Community Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAOUkibEnDPqm_QWAd2b4vpW6HNF2u9p0HzzvH1uP18Vz1gc2Qw%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: My RaspberryRelay program

thomas....@natural-software.eu
Cool - somebody else who gets excited about home automation functionality!!

Which weather forecast service are you using?

--Thomas

[hidden email] schrieb am Freitag, 4. Juni 2021 um 22:25:12 UTC+2:
Hi Louis,

That looks like a pretty cool system! I am glad you were able to resolve all the issues. Thanks for sharing this awesome news and for the kind words about VAST.

Best, 

On Fri, Jun 4, 2021 at 3:34 PM Louis LaBrunda <[hidden email]> wrote:
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

--
You received this message because you are subscribed to the Google Groups "VAST Community Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/75bafdf0-db7f-4a68-92f9-c8399a8a99a0n%40googlegroups.com.


--

Mariano Martinez Peck

Senior Software Engineer

 [hidden email]
 @MartinezPeck
 /mariano-martinez-peck
 instantiations.com
TwitterLinkedInVAST Community ForumGitHubYouTubepub.dev

--
You received this message because you are subscribed to the Google Groups "VAST Community Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/be0718fe-8b54-4e10-8fc9-6ff0b7de39e4n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: My RaspberryRelay program

Noschvie
Me too :-)

[hidden email] schrieb am Freitag, 11. Juni 2021 um 11:14:14 UTC+2:
Cool - somebody else who gets excited about home automation functionality!!

Which weather forecast service are you using?

--Thomas

[hidden email] schrieb am Freitag, 4. Juni 2021 um 22:25:12 UTC+2:
Hi Louis,

That looks like a pretty cool system! I am glad you were able to resolve all the issues. Thanks for sharing this awesome news and for the kind words about VAST.

Best, 

On Fri, Jun 4, 2021 at 3:34 PM Louis LaBrunda <[hidden email]> wrote:
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

--
You received this message because you are subscribed to the Google Groups "VAST Community Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/75bafdf0-db7f-4a68-92f9-c8399a8a99a0n%40googlegroups.com.


--

Mariano Martinez Peck

Senior Software Engineer

 [hidden email]
 @MartinezPeck
 /mariano-martinez-peck
 instantiations.com
TwitterLinkedInVAST Community ForumGitHubYouTubepub.dev

--
You received this message because you are subscribed to the Google Groups "VAST Community Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/8ee05ae1-913c-4445-8aa4-6313dac17d82n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: My RaspberryRelay program

Louis LaBrunda
Hi Guys,

I use the One Call API of Open Weather API.  I get the JSON format response as it is easily parsed in VA Smalltalk.  It gives the probability of precipitation for eight (8) days, the program is just interested in the current day but I display the week, so the user can see what may happen.  There are both free and paid options where I think the distinction is how may times a day the weather data is accessed.  I think it is free for up to 1,000 times a day.

I recently added a check for how much rain is predicted along with the probability of precipitation.  The probability is based upon one (1) millimeter of rain.  So, I added a setting for the amount of rain and code to check both probability and amount.  One millimeter of rain isn't much, so a high probability of only 1 millimeter of rain, isn't a good reason not to water.

Obviously I'm interested in home automation.  But I think the real value of VA Smalltalk in this area is controlling things everywhere.  I think the Raspberry Pi is just a start.  It is inexpensive and has GPIO control pins and drivers for them that are easy to access from Smalltalk.  Another small computer without graphics hardware and connections could cost even less.

I think my use of Seaside to present web pages to control the system and change settings proves feasibility of the model.  Most of the CPU requirement is for this Seaside/web page work.  The control of whatever is being controlled requires very little CPU.  Another approach would be to move the maintenance of the setting out to another program, perhaps running on a server.  The control system could then poll the server for new setting at whatever rate is required.  This approach can also improve security as the control system doesn't need to allow any incoming connections.

Lou


On Friday, June 11, 2021 at 5:42:56 AM UTC-4 Noschvie wrote:
Me too :-)

[hidden email] schrieb am Freitag, 11. Juni 2021 um 11:14:14 UTC+2:
Cool - somebody else who gets excited about home automation functionality!!

Which weather forecast service are you using?

--Thomas

[hidden email] schrieb am Freitag, 4. Juni 2021 um 22:25:12 UTC+2:
Hi Louis,

That looks like a pretty cool system! I am glad you were able to resolve all the issues. Thanks for sharing this awesome news and for the kind words about VAST.

Best, 

On Fri, Jun 4, 2021 at 3:34 PM Louis LaBrunda <[hidden email]> wrote:
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

--
You received this message because you are subscribed to the Google Groups "VAST Community Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/75bafdf0-db7f-4a68-92f9-c8399a8a99a0n%40googlegroups.com.


--

Mariano Martinez Peck

Senior Software Engineer

 [hidden email]
 @MartinezPeck
 /mariano-martinez-peck
 instantiations.com
TwitterLinkedInVAST Community ForumGitHubYouTubepub.dev

--
You received this message because you are subscribed to the Google Groups "VAST Community Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/9b867152-ced4-4725-9e66-4e11b27baf3cn%40googlegroups.com.