Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts

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


    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?

    in reply to: GPIO Modification #60134

    marekp
    Participant

    Hi,

    This https://github.com/Dan-in-CA/SIP works on GreenIQ v2. You need use Relay plugin and modify gpio config in plugin code (python). But weather support doesn’t work.
    Now I try to modify Opensprinkler Unified Firmware, but without success till now. I can’t modify gpio config, so all is working, but I can’t control the sections.


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

Viewing 4 posts - 1 through 4 (of 4 total)