Forum Replies Created
-
AuthorPosts
-
rszimmParticipantDave, my release (which I’ve been calling sprinklers_pi) was originally built on a 2560 with the W5100 ethernet interface. You should be able to get it running. It’s essentially the exact same code as here: viewtopic.php?f=28&t=244 except it doesn’t support the graphing logging stuff. Besides that however, you wouldn’t really know you were running the raspberry pi version or the version on the 2560. If you’re at all interested, (or anyone else is), I could polish that code up and ship it over…
September 3, 2013 at 7:39 pm in reply to: sprinklers_pi – An alternative sprinkler control program #24976
rszimmParticipantOk, the new version (v1.0.3) is now available.
NOTE1: This is beta code. I’ve been running it for a few days and it seems to work, but run at your own risk!
NOTE2: This WILL delete your old settings. I apologize for that. In the future if I have to rearrange things in the settings file I’ll write a translator. I wanted to get this out there faster.To install the new version, log into your raspberry pi and run this:
wget stuff.intelligent-isi.com/sprinklers_pi/sprinklers_pi-1.0.3.tar.gz
tar -xzvf sprinklers_pi-1.0.3.tar.gz
cd sprinklers_pi-1.0.3
make
sudo make install
sudo /etc/init.d/sprinklers_pi restartYou should erase your browser cache when you start. I’ve got a fix for that in the works, but it’s not there right now. Just dump the browser cache and all should be fine. In chrome you do this by pressing Ctrl-Shift-Delete, make sure the “empty the cache” checkbox is checked, and click “Clear Browsing Data”. On IE, press Ctrl-Shift-Delete and make sure ‘Temporary Internet Files and website files” is selected. On the iPhone you do this in the Settings->Safari window.
Also note, that resetting your settings means it’ll start up on port 8080, so you might have to repoint your browser to get there if you’ve previously changed the port to 80.
September 2, 2013 at 9:39 pm in reply to: sprinklers_pi – An alternative sprinkler control program #24975
rszimmParticipantI’ve got a new version that I’m going to upload tomorrow for beta testing. It has the following additional features:
- Support for Personal Weather Stations from Weather Underground
- Support for up to 15 zones.
- Ability to check on the data pulled from Weather Underground with a diagnostics screen
- Seasonal adjustment (0-100% of the set time)
- Home screen shows the configured time on the raspberrypi so as to avoid time zone confusions.
- Various bug fixes.
I’m still doing some debugging over here, but I should have it up tomorrow sometime.
August 27, 2013 at 3:29 pm in reply to: sprinklers_pi – An alternative sprinkler control program #24970
rszimmParticipantTo remove it, go to the same directory you installed from (i.e. where you typed “sudo make install”), and type “sudo make remove”. It will remove all the program files and data files.
August 26, 2013 at 12:58 am in reply to: sprinklers_pi – An alternative sprinkler control program #24968
rszimmParticipantogtommy: they should not run at the same time. They should run sequentially. When you go to the Manual control page, can you turn on each individual zone by itself? If not, you may have a wiring problem or you may not have configured the software to use the opensprinklersPi hardware under the settings page. (or I’ve got a bug!)
eddiek2000: Getting to 9 zones is pretty straightforward (just setting a constant I believe). Beyond that I’ve got to change all the web pages and the corresponding logic because they communicate through form data with z1-z9 being the individual zones. Beyond 9 it doesn’t work. Easy fix, but it’s in a bunch of different places. However, there’s another limitation a bit farther out. At (I believe) 12 zones, we run out of space in the structure for the schedule, so it can’t be saved. This is a bit of an anachronism in that the code was ported from an arduino based sprinkling system, and I only had 2k of EEPROM space, so I had to use it wisely. Seems a bit silly in the raspberry pi world. Quick fix would be to simply move things around in the settings file to allow for a full 15 zones. Longer fix will be to go to a more user-friendly settings file format. I have this at the top of my to-do list, but I’ve been pretty busy the past few weeks. I should be able to get to it this week for sure…
August 6, 2013 at 10:38 pm in reply to: sprinklers_pi – An alternative sprinkler control program #24956
rszimmParticipantThe source code is part of the distribution. If you have this running then you already have the source code on your raspberrypi.
The weather adjustment stuff happens in the Weather.cpp file. That’s where the actual URL request to wunderground is formed and where the results are compiled into a duration adjustment. (look especially at Weather::GetScale() ). Right now it pulls from a zip code using the get string:
/api/%s/yesterday/conditions/q/%ld.json where the %s is replaced by your API key, and the %ld is the zipcode.
Using the wunderground API documentation here: http://api.wunderground.com/weather/api/d/docs?d=data/index you can see there are a lot of additional ways to query wunderground beyond just zipcode (e.g. lat/long, personal weather station id, city name, IP geolocation, etc).
Good luck!. If you do something new and interesting, post it back here and I’ll incorporate it into the main line. At some point I’ll get this stuff up on github to make contributions easier…
August 1, 2013 at 4:08 pm in reply to: sprinklers_pi – An alternative sprinkler control program #24954
rszimmParticipantFantastic!
I think tzselect doesn’t actually “select the timezone” despite the name. It’s a utility to see what the time would be in other timezones.
It occurs to me that this could have been avoided if the time on the front web page actually showed the fully configured local time. Right now the sprinklers program sends UTC time to the browser, and the browser converts that to local time. What I SHOULD be doing is converting to local time in the program and sending that to the browser. That way it will be very obvious that the timezone is messed up on the raspberrypi right from the front page.
August 1, 2013 at 3:38 pm in reply to: sprinklers_pi – An alternative sprinkler control program #24952
rszimmParticipantAhhh, so the raspberrypi is set to UTC rather than to MDT. I’m also in MDT and this is what I get when I run it:
pi@raspberrypi1:~$ date
Thu Aug 1 09:36:21 MDT 2013to set the timezone, run
sudo dpkg-reconfigure tzdata
August 1, 2013 at 3:07 pm in reply to: sprinklers_pi – An alternative sprinkler control program #24950
rszimmParticipantHmmm. So the 02:30:50 is actually what the software thinks is the local time. So it thinks it’s 2:30am the next morning (i.e. 6 hours away from you). If you run the ‘date’ command from a shell prompt on the raspberrypi, what do you get back?
Incidentally, from the event view we can see that you’re setup to run schedule 0 at 6am and schedule 1 at 12:40am. Unfortunately, those are going to be relative to the wrong time zone, so they’re going to have gone off in the middle of the night.
August 1, 2013 at 1:33 am in reply to: sprinklers_pi – An alternative sprinkler control program #24948
rszimmParticipantI appreciate this more than you know! Thanks.
OK, I’m still not 100% certain what’s going on, but it sort of looks like a timezone issue. What time and timezone do you have your raspberrypi set to? Can you browse to the ShowEvent page (e.g. on my system it’s at raspberrypi1:8080/ShowEvent ). It will show exactly what the software thinks the local time is, and every upcoming event scheduled for the rest of the day. For instance, on mine right now it shows this:
1 Events
18:29:10 2013/7/31 (4)
Event [00] Time:19:00(1140) Command 3 data 2,2This indicates that the local time is 6:29 PM on August 31, 2013 and that at 19:00 (7pm) I’m going to run schedule #2 (that’s what command 3 means). Events that have passed will not show up in this listing…
July 31, 2013 at 11:48 pm in reply to: sprinklers_pi – An alternative sprinkler control program #24946
rszimmParticipantIs the “Run Schedules” on the front page set to “ON”? It turns off every time you activate something in manual mode. I’ve been thinking that there should be a better use case here because I’ve been victim to forgetting to turn it back on but I haven’t come up with something that makes sense yet.
If it is “ON” and it’s still not working then there’s probably a bug somewhere, can you send me your settings and log file (settings is at /usr/local/etc/sprinklers_pi/settings. Log is at /var/log/sprinklers_pi.
July 29, 2013 at 3:56 pm in reply to: sprinklers_pi – An alternative sprinkler control program #24942
rszimmParticipantGreat ideas! Pretty busy today but I’ll dig into this tomorrow.
Oh, and yes, the first output of the board is reserved for the “pump” or “master valve” output. That’s why there are only 7 zones.
July 27, 2013 at 8:04 pm in reply to: sprinklers_pi – An alternative sprinkler control program #24938
rszimmParticipantAs a followup, rather than hardwiring a rain sensor to your sprinkler controller, I could actually pull data from your internet connected personal weather station assuming you’ve got one that’s reporting to Weather Underground. That would actually be pretty trivial, and would be MUCH more complete than just a rain sensor because I could do different things based on temperature, humidity and exactly how MUCH rain was received.
That’s not to say I shouldn’t support hardwired rain sensors anyway… Just a thought…
July 27, 2013 at 7:42 pm in reply to: sprinklers_pi – An alternative sprinkler control program #24937
rszimmParticipantWunderground IP: You can get it by resolving api.wunderground.com. It’s 38.102.136.138.
There’s not currently support for a rain sensor. How is your rain sensor wired up? I don’t have a rain sensor, but adding support should be pretty simple. Anyone know what the optimal logic is w.r.t. a rain sensor? Rain the last 24 hours just don’t run any schedules?
There’s also not currently support for more than 7 zones (plus a master valve or pump). Shouldn’t be difficult to add in though. Most of the logic is already there and it’s just a matter of changing a constant, but I’ll have to shift some stuff a bit in how schedules are stored because I only allowed room for the 7 zones. Not a big deal really, but some work… Plus I don’t actually own an expansion board so I’ll have to get you to test things out when I’ve got something to test.
July 26, 2013 at 10:24 pm in reply to: sprinklers_pi – An alternative sprinkler control program #24935
rszimmParticipantmattguy, I don’t believe you should have to do that. It should be taken care of with the wiringPi library automatically. I’ve only tried it with the Rev 1 though. Let me know how things turn out.
July 26, 2013 at 4:57 pm in reply to: sprinklers_pi – An alternative sprinkler control program #24932
rszimmParticipantBy all means, go ahead and take what you want!
Be a bit careful with that relative path thing. The path cstring (sPage) is pretty darn short in length (only 30 bytes), which is why I chose an absolute path right off the root FS (i.e. /web). As you surmised, the memcpy protects the memory outside the cstring, so make sure if you change the memcpy length, you also change the cstring length. From your post I think you just pulled off the forward slash and changed the 5 to a 4 in the memcpy. That should be totally fine…
BTW (tech speak here…): There are a bunch of these little optimizations in there. This is because it’s designed to run inside the small address space of the Atmel Arduino platform. They only give you 4k of RAM over there. That’s right, 4096 bytes of RAM! It’s hard to implement a web server and a FAT file system retrieval library, as well as a NTP time keeping library and a TFTP server all in 4k of RAM (not to mention the actual sprinkler code) That means that there are tons of little size optimizations and limitations to keep the stack size from growing (I don’t use any heap in this application). If I didn’t want to cross-develop here there are a LOT of things I would have done differently.
July 25, 2013 at 3:34 pm in reply to: sprinklers_pi – An alternative sprinkler control program #24929
rszimmParticipantAverage Humidity, Average Temperature and rainfall. If it’s a hot dry day, it adds in some time. If it’s a cool, humid day, or it rains, it subtracts some time.
To make it work you need to get a free API key from Weather Underground at api.wunderground.com/weather/api/July 25, 2013 at 5:21 am in reply to: sprinklers_pi – An alternative sprinkler control program #24927
rszimmParticipantYes. Master valve / pump. You can selectively define which zones require the master valve and which ones do not.
-
AuthorPosts