LinuxMCE Forums
General => Users => Topic started by: krys on February 23, 2009, 08:35:30 pm
-
Hey guys, I have an idea but would like some input before I really start tearing into it. As the title states I am considering controlling my 8 zone lawn irrigation system via the parallel port on my core. I know that there are some X10/insteon options out there for this same purpose, and I think there is a zwave device that is coming out soon, but I would like to save $$$ whenever possible and I also like neat projects. I know that it is possible to open and close the valves via the parallel port, what I would like is some opinions on how well this could integrate into LMCE. Here is what the system would need to do.
1. Open each valve 1 at a time for a pre-determined amount of time at a set frequency per week. (basic necessity)
2. option to use the dawn event so that the sprinklers would run when the sun rises (a set time in the morning would be acceptable)
3. a floorplan layout would be nice to see what zone is currently on with the ability to manually trigger each zone either on or off
4. An option to skip the next watering event in case there has been recent rain and there is no need to water
Maybe more options, but the main one is obviously the first, the others can come down the road if they are more complicated. So let me know if you think this is crazy or a good idea. Any tips would help because this would be at the far end of the spectrum of what I am capable of doing on my own.
Anything I can come up with I would gladly share so that others can enjoy the same feature. I figure that I should be able to implement this for the cost of a parallel port relay board ($20-30) and alot of time (I have plenty) assuming that it can be done. If it looks like there is any interest I will start a wiki page to document the different areas that need work to bring this together.
Thanks,
-Krys
-
Hi krys,
I think that it is all pretty doable.
There are a few examples of C++ devices with worker threads which you could model the code from.
The first couple of points should be able to done through the event management stuff in webadmin.
The floorplan might need some work, I think others have presented similar things as light switches to get it to show up.
Point 4 might require some thought and possibly implement a new command that tells a particular zone to ignore events for a period of time.
Interested to see how you get on.
darren
-
If I may add an idea,
How about using a simple relay moisture sensor that could be set with a thresh hold. Maybe something like keeping the irrigation on as long as the moisture precentage is below 30%.
Here's a scenario I've been thinking about: In the summer season, on Sunday, Tuesdat and Thursday, betwin 5:00-6:30 AM, check for the moisture level and if it's below 30% turn irregation on.
Is this something that can be done ?
Itsik
-
Itsik: Thats a good idea, are we talking about air moisture, or soil moisture? I dont know if I have ever seen a soil moisture sensor....On the software side I think that would be a prettty easy feature to add though.
-
Krys, I think soil moisture would be a good way to go altough I'm not sure there's a sensor for this ...
-
I'm working on a battery less solar powered soil moist sensor.. but the components are around 160-170 EUR..
best regards,
hari
-
I've started checking this more seriously. Hopefully I'll have some solid info about what's availble out there, how efficiant it is and what's the price range, in about a week.
Itsik
-
I like where this is heading. I am finishing up a few projects but probably next week I will start working on a relay board and some simple commands to get the valves open, closed. I found a pretty decent looking relay board online it has LED's for each relay to tell you when its open or closed, and a LPT port. If I remember right it had 8 relays and was $20.
-
link ?
Itsik
-
here is one
http://cgi.ebay.com/-8-Relay-Board-for-PC-LPT-printer-parallel-port_W0QQitemZ170305669912QQcmdZViewItemQQimsxZ20090224?IMSfp=TL090224122006r28884
then another that you can get as a kit or assembled
http://www.electronickits.com/kit/complete/elec/ck1601.htm
another, this one doesnt list the voltage though
http://robokitsworld.com/index.php?main_page=product_info&products_id=213
-
http://www.audon.co.uk/udin.html
-
http://www.fourier-sys.com/pdfs/sensors/soilmoisture_dt171a.pdf (http://www.fourier-sys.com/pdfs/sensors/soilmoisture_dt171a.pdf)
Check this out guys.
The pricing here is roughly 170$-200$
I'm not sure we could use it but the PDF mentions something about setting a specific reading as zero, so maybe this could be used to set a certain threshold point to use to open and close the relays ...
-
Guys, I think I've found something that might do the trick. Check these out...
http://www.agrolan.co.il/UploadProductFiles/watermark.pdf (http://www.agrolan.co.il/UploadProductFiles/watermark.pdf)
http://www.agrolan.co.il/UploadProductFiles/watermark_ins.pdf (http://www.agrolan.co.il/UploadProductFiles/watermark_ins.pdf)
-
For soil moisture control I use an older model from the manufacturer Gardena, which works fine.
Currently they supply this one
http://www.twowests.co.uk/TwoWestsSite/pages/product/product.asp?prod=COMS&cookie_test=1
Regards Herman
-
Just a thought. Is there any sort of plugin that allows control of lighting from LPT? If so can't we just mash that to do the same thing for retic? Or is there a generic device that allows switching via LPT.
Could be completely stupid but just some ideas.
G-Wog
-
ok guys, just an update. After talking with Hari on IRC we decided that using there are much better alternatives to use than the LPT port.
Downsides to LPT port are:
1. no plug and play
2. Limited # of relays
3. I am not completely sure about this but I during a power outage I believe that the relay will stay open
4. newer computers generally dont come with LPT ports
So after considering all of this I believe that a USB relay board might be the way to go even though they are more expensive. However I went ahead and ordered a LPT relay board anyway just for learning and experimentation. I have already managed to get this board working under the KDE desktop using some scripts and crontab for automation. I also have hacked together a web interface that has buttons to open and close individual relays. My issue at this point is that for some reason LMCE will not trigger my scripts to send commands to the relay board. The script calls on a program that is written in C and uses the I/Operm function so I am thinking that it might be some sort of permissions issue.
Anyway, if I can figure out how to get LMCE to properly fire off these scripts I was thinking about using this relay board to control my speaker distribution block. I can just do some soldering and wire the relay board in place of the manual on/off switches for the different speaker zones in my house and I think I will be able to turn the different zones on/off with buttons in LMCE. so instead of spending $1000 on some audio matrix I will have $70 (4 zone speaker distribution block) $40 (LPT relay board) =$110
-
krys - are you using a GSD for this and the Ruby snippets used to fire off the scripts?
-
I have tried the GSD and ruby snippets, the command gets passed along just fine, however nothing happens (I used the xset dpms force off command to verify that the template was working) I also tried putting the commands into a script and calling the script from the test button on the media scenario page on the web admin. The script I built to run xset dpms force off worked from the web admin page, the script for my relay board would not. Both scripts work flawlessly when run at a terminal (without using sudo).
-
and the GSD log file doesn't say anything? wonder how you would getting logging out from a Ruby script, at least to confirm that the snippet actually gets executed? I guess you could do an echo redirection to a file...
-
I forgot to mention that on the media scenario/ timed event per Thoms instruction I made App server the device and used the spawn application command. In the #13 blank I put the path and name of the script that I wanted to run. I launched TailDCERouter.sh and verified that when I hit the "test" button that the app server tried to launch my script which it did, just nothing happened. I also set it to launch Amarok just as a test and it worked, thats why I think it may be some sort of a permissions issue with LMCE and something specific in my C program. (but then again I am just guessing)
-
Hello guys ,
from brazil
http://www.rogercom.com.br/pparalela/Dsp32es.htm
simple circuit to control 32 dispositivs and monitor 32 sensors !
very simple to build !