Forum Replies Created
-
AuthorPosts
-
doczaiusMemberI’d be interested in it. I currently access my home security/automation through a cloud solution (Alarm.Com). I had considered digging into Razberry/Open Z-wave to see if I could hack a solution to control OSPi via Z-Wave and subsequently Alarm.Com. My current solution is just my private VPN to my home network, which works for other things as well. Having a bookmark to another website would be a lot easier though, and would be accessible from any machine, as opposed to those that have been configured for VPN.
doczaiusMember@virtus wrote:
@andrew wrote:
By the way. You mentioned that you are struggling to understand shift registers. This article offers a good explanation: http://bildr.org/2011/02/74hc595/. This will also explain why the the complete state of the controller has to been reset each time a station is opened or closed. The shift register is cleared out and 8 new bits are sent to the register (or more if you are using an expander board; the linked article also explains how shift registers are daisy chained, which is exactly how the expansion boards work — I think).
So if the interval program is in the middle of a program (let’s say valve #1 is open), and you manually tell it to open valve #3 using the http command, does it automatically close all the valves first, then open valve #3?
I use the manual commands specifically to open multiple valves at the same time — so I can’t speak for the scheduler.
doczaiusMember@andrew wrote:
@doczaius: I don’t believe that it’s polling anything, and this is the point I was making above. The interval program keeps a variable in memory that represents the current state of the stations. When a station is “turned on” the bit for the station in that variable is set to a 1 (or a 0, not sure which) and then the program calls the set_output function, which then takes the values for all of the stations and sends it out through the GPIO to the shift registers on the controller board. There is no polling of or feedback from the controller board that I’m aware of. The program just assumes that whatever *it* last sent out to the shift registers is what the current status of the controller is. If you’re running the interval program, and then in a separate process send some new values to the shift registers, thereby changing the state of the controller, the interval program will be completely unaware of the change, and still think that the controller’s state is whatever it had previously set it to.
That being said, if some is running the interval program exclusively, they can indeed use http://xxx.xxx.xxx.xxx/snX to obtain the state of the stations (as far as the interval program is aware). I believe, however, that snewman was intending on writing/running his own program and would not, therefore, be making direct use of the interval program.
I was afraid of that — the reason I mentioned was because the previous version of the interval program did not accurately reflect whether zones were on or off if a command was sent via get. I assumed the GUI was referencing a variable where as the GET commands were not (unless of course there are two sets). I have the interval program installed but I don’t use the built in scheduler because I need multiple zones to open/overlap. So I have crontab set up to execute manual commands with cURL. If I wanted to know the true status, I would have to manually goto /snX to view. The new version of the interval program seems to have fixed this issue however.
doczaiusMemberCheck the interval program… requesting http://xxx.xxx.xxx.xxx/sn1 (sn2, sn3 etc) will return 0 or 1. I assume its doing some polling…
doczaiusMemberGood tip. I always forget about site search.
doczaiusMemberIn my case it shouldn’t be an issue. The controller faces west and my back yard neighbor’s two story home is appx 15 ft above my homes elevation. Even during these long summer days the only time it has direct sunlight is a brief period as the sun is setting. It probably gets hotter in my garage which faces east and gets hours of direct sunlight on the doors and no chance I’m putting it inside the house. Granted its only 81 F outside right now but the cpu reads at 55 C.
Also I’ve had a wireless router with an older ARM chip in it running DD-WRT, mounted outside in a similar outdoor enclosure on the north side of my home with no ventilation besides drain/wire holes at the bottom for a few years now and it hasn’t failed.
To be honest I was a bit surprised at that other thread asking about locking up/heat issues. Embedded processors get put through the ringer in testing due to the fact that they are often used in industrial situations… I believe I read at one point that the pi was run inside an oven at 176 F by the pi foundation for a significant amount of time without issue.
doczaiusMemberI salvaged the transformer from a Hunter X-Core controller. According to the spec doc from their site, the rating is “24 VAC, 1.0 A. Maximum output per station shall be 24 VAC, 0.56 amps.”
With my hybrid method I have at most three zones open at one time for a 45 minute overlapping period and two zones for 75 minutes.
doczaiusMemberAlthough my yard isn’t terribly large, I have two water sources. I’m also under annoying water restrictions that only allow watering in a small window once a week, so running as many zones as possible at the same time is crucial.
Not sure if I missed it or if 1.8.3 came out after I began my OSPi journey but I needed concurrent runs and it wasn’t available in the interval program. My solution was to just install a crontab script that would kick off the valves using the GET commands provided by the interval program. You can access the crontab editor with “crontab -e”… You will see simple instructions on how to write entries… or you can use the Corntab online GUI: http://www.corntab.com/pages/crontab-gui
Below is a version of my crontab that I was experimenting with. I’ve already gone a few weeks using this method without major issue (I mixed up a couple of zones the first run 🙄 ). It shouldn’t be necessary with the duration variable, but as a safety measure I run a turn off command when each zone is supposed to turn off. Note that if you have an issue with water hammer, you could also use this method to overlap runs slightly (1 minute resolution).
IP is obscured..
0 19 * * 4 /usr/bin/wget http://xx.xx.xx.xx/sn1=1&t=90
25 20 * * 4 /usr/bin/wget http://xx.xx.xx.xx/sn1=045 19 * * 4 /usr/bin/wget http://xx.xx.xx.xx/sn2=1&t=90
10 21 * * 4 /usr/bin/wget http://xx.xx.xx.xx/sn2=015 21 * * 4 /usr/bin/wget http://xx.xx.xx.xx/sn7=1&t=75
25 22 * * 4 /usr/bin/wget http://xx.xx.xx.xx/sn7=030 22 * * 4 /usr/bin/wget http://xx.xx.xx.xx/sn5=1&t=75
40 23 * * 4 /usr/bin/wget http://xx.xx.xx.xx/sn5=045 23 * * 4 /usr/bin/wget http://xx.xx.xx.xx/sn6=1&t=75
55 0 * * 4 /usr/bin/wget http://xx.xx.xx.xx/sn6=00 19 * * 4 /usr/bin/wget http://xx.xx.xx.xx/sn4=1&t=75
10 20 * * 4 /usr/bin/wget http://xx.xx.xx.xx/sn4=015 21 * * 4 /usr/bin/wget http://xx.xx.xx.xx/sn3=1&t=75
25 22 * * 4 /usr/bin/wget http://xx.xx.xx.xx/sn3=0
doczaiusMemberAnd here I thought I was being super inventive using the housing of my Hunter irrigation controller 😉
There was a bit of sweet revenge here as this housing belonged to the 2nd Hunter X-Core Solar Sync controller I had purchased. Both failed after appx 8 months — I guess they couldn’t take the Texas heat.. I gutted the housing, ripping out the controller but salvaging the 24v ac adapter for use with the OSPI.
The Hunter controller was screwed into and elevated off the back of the housing with 4 plastic mounts. The OSPi just barely did not fit with the door closed so I trimmed down the plastic mounts with my dremel & a plastic cutting blade. I used epoxy putty to adhere a rectangle of thin aluminum (water heater pan salvage) to the plastic posts and drilled holes into it to match up to the mounting holes on the OSPi casing. For the sake of space, I had to toss the custom box for the 24v adapter that hid the A/C connections/crimp connectors and served as a mount. Instead I mounted the AC/DC converter block with adjustable UV/Outdoor rated zip ties and mounting bases/squares. Next time I’m at HD (and I remember) I’ll pick up some more waterproof/silicone wire nuts to replace the crimp connectors on A/C wires and some sort of wire clamp to go on the sprinkler wire at the bottom inside of the housing to relive stress on the connectors.
-
RPi: $43.41 + 0.00 Ship (Amz Prime)
Edimax Wifi Dongle: $10.87 + 0.00 Ship
OSPi: $65.99 + 4.99 Ship= 70.98
24v AC Adapter: $0.00 Salvage
Outdoor Weatherproof Housing: $0.00
Total Cost: $125.26 vs $161 (incl tax) for Hunter controllerPretty good deal if you ask me… I mean, how many sprinkler controllers have you seen out there that you can watch H.264 movies on?
-
AuthorPosts