OpenSprinkler Forums OpenSprinkler Unified Firmware GreenIQ V2 hardware with OpenSprinkler Unified Firmware

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #60072

    marekp
    Participant

    Hi,
    how can I use Greeniq V2 (Raspberry Pi) with OpenSprinkler Unified Firmware?
    I use SIP with relay plugin where I redefined GPIO pins and it works, but I have a problem with weather data – wunderground doesn’t works.
    I tried OpenSprinkler Unified Firmware – it works, weather data too, but I can’t find where I can redefine GPIO pins. In GreenIQ I have: S01 – 7, S02 – 11, S03 – 12, S04 – 13, S05- 15, S06- 16, S07- 18, S08- 22. Where I need to make change GPIO pin definitions that all should works with GreenIQ V2? What I need to do that this hardware could be usable with this software?

    #60078

    marekp
    Participant

    I checked OpenSprinkler source code, and find, that probably changes are nedeed in defines.h file, lines 448 to 461.
    Probably I need redefine pin 22 – PIN_SR_LATCH, pin 15 – PIN_RFTX, and add 22 and 15 to PIN_FREE_LIST.
    Next in OpenSprinkler App on phone I can define pin for each valve as GPIO from list of free pins.
    But when I changed 22 and 15 to not used pins, after compiling program hangs.
    Keyboard connected to RPi by USB doesn’t work, SSH doesn’t work.
    Could anyone help, how I need to change pin config?
    Below is part of GreenIQ sorce code in Python – initialization of GPIO:

    .
    .
    .

    # Initialize GPIO Ports
    def init_gpio(self):
    GPIO.setwarnings(False)
    GPIO.setmode(GPIO.BOARD)
    high_is = ‘1’
    self.gpio_map = [7, 11, 12, 13, 15, 16, 18, 22, 26]
    GPIO.setup(10, GPIO.IN) # Rain Sensor
    for i in self.gpio_map:
    GPIO.setup(i, GPIO.OUT)
    GPIO.output(i, GPIO.LOW)
    .
    .
    .

    # Set flow sensor change detection gpio port
    def detect_flow_sensor_gpio_changes(self, flow_count):
    GPIO.remove_event_detect(10)
    GPIO.add_event_detect(10, GPIO.RISING, callback=flow_count, bouncetime=0)
    .
    .
    .

    #60414

    Ray
    Keymaster

    What did you redefine the PIN_SR_LATCH and PIN_RFTX to?

    #60417

    marekp
    Participant

    I don’t remember.
    I have a problem with proper control of relays. Now I’m using SIP from https://github.com/Dan-in-CA/SIP/ with relay_16 plugin, where I redefine PINS and now all is working except weather.
    Do you have any idea what I should make for working of unified firmware on GreenIQ V2?

    #60433

    Ray
    Keymaster

    Pretty much the only thing I can think of is to redefine the pins in defines.h to something that GreenIQ does not use. Since I don’t know what are all the pins that GreenIQ uses, I can’t say for sure. The unified firmware will send signals to those pins defined in defines.h, and if that happens to be used by GreenIQ it can cause problems.

    #60436

    marekp
    Participant

    GreenIQ v2 uses raspberryPI and gpio pins for section and light control – 7, 11, 12, 13, 15, 16, 18, 22, 26 – led,
    BCM 4, 17, 18, 27, 22, 23, 24, 25, 7 – led
    and I need only these pins. When I remapped them on unified firmware it did not work.
    In SiP, in python code, I changed the pins to 7,11,12 … and everything went fine.
    I also noticed a problem with PIN_FREE_LIST – if in the application in the phone I set the output as gpio, then there is always the same list, no matter if I change something in PIN_FREE_LIST and compile the program.

    #60514

    Ray
    Keymaster

    I have to check but I think the PIN_FREE_LIST may be hardcoded into the UI so it’s independent of what the firmware’s PIN_FREE_LIST is. It should be fairly easy to modify the firmware to directly set zones as GPIO zones, regardless of what the settings say.

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

OpenSprinkler Forums OpenSprinkler Unified Firmware GreenIQ V2 hardware with OpenSprinkler Unified Firmware