• This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #22842

    dblessing
    Member

    I 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.

    #26532

    Dan in CA
    Participant

    If 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_buttons

    Once you get that working with your Python menu it should be easier to integrate into the Interval Program.

    Dan

    #26533

    dblessing
    Member

    Thanks, 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.

    #26534

    Dan in CA
    Participant

    You 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_OSPi

    The 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

    #26535

    JimS
    Participant

    I 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?

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.