OpenSprinkler › Forums › Hardware Questions › OpenSprinkler Pi (OSPi) › Interval add-on
- This topic is empty.
-
AuthorPosts
-
April 19, 2014 at 6:26 pm #22842
dblessingMemberI have a 16×2 LCD on my RasPi that I would like to allow to manually control stations. I am trying to figure out how to tie it in with the OSPi interval program, perhaps as an add-on. The menu program for the LCD is a separate Python program. I’m not very savvy with Python, either. How might I put an add-on in the interval program to facilitate this from my menu program? Do I need an add-on or can I just call something from the menu program to get the status or set station on/off? Can someone point me in the right direction?
Thanks for your help.
April 20, 2014 at 12:33 am #26532
Dan in CAParticipantIf you are just starting out with Python you might want to look at Ray’s demo program:
https://github.com/rayshobby/opensprinkler/tree/master/OpenSprinkler%20Pi/software/demos/manual_buttonsOnce you get that working with your Python menu it should be easier to integrate into the Interval Program.
Dan
April 20, 2014 at 10:03 pm #26533
dblessingMemberThanks, Dan. I thought the same. Last year I did this in the menu program and it worked. However, it seemed that both the interval program and the menu program could not co-exist. If I start both programs up and ran a station from the menu program the interval program would no longer be able to control the sprinklers. It seemed like there was a GPIO conflict in doing things this way. Maybe I just need to dig in to it more and see why they conflicted.
I’d appreciate any thoughts you or anyone else has on why they would conflict. Thanks again.
**Edit – I tried again and this is the error I’m getting: “RuntimeWarning: This channel is already in use, continuing anyway.” when I called GPIO.setup(). It says “continuing anyway” and the program starts. However, as I said, it can’t actually control the sprinklers after that point.
April 22, 2014 at 12:47 am #26534
Dan in CAParticipantYou are right that only one program can control the GPIO pins. However I think your menu program might work just fine using the Interval Program’s new plugin architecture. This is only available with the latest rev of the program.
I assume you are familiar with the information about Interval program on the wiki:
http://rayshobby.net/mediawiki/index.php?title=Python_Interval_Program_for_OSPiThe way it would work is to place your program into the plugins sub-directory under OSPi. You would import the GPIO_pins module into your menu program. This would provide shared access to the GPIO setup that the main program uses. You would also need to remove or comment out any GOIO set-up already in your program. When the main program starts it would load your program as a plugin and you would be able to use it to control the valves.
I am still in the process of writing documentation for the new plugin system. I would like to help you get your menu system working as a plugin because it will help me see what information would be useful for the documentation.
If you wouldn’t mind being a test case for the plugin system, here are some things to check:
1. Have the latest rev of the Interval program installed.
2. You should be using the alternative method for automatically starting the Interval program from a script in /etc/init.d (1.6.3 in the wiki instructions). That allows you to easily stop and start the program. It is necessary to stop the program and start it manually from the OSPi directory to test a plugin.Let me know if you would like further information.
Dan
June 1, 2014 at 5:52 pm #26535
JimSParticipantI am looking for the very same functionality. Want to be able to program times or manually turn on a zone like a traditional timer and see what is running but still have the computer tie in for automation. Several ways to go about this on the hardware side: Arduino to handle LCD and keypad, maybe LCDproc on the pi side. Any progress on this?
-
AuthorPosts
- You must be logged in to reply to this topic.
OpenSprinkler › Forums › Hardware Questions › OpenSprinkler Pi (OSPi) › Interval add-on