Tagged: GreenIQ V2 GPIO
May 1, 2019 at 3:25 pm #60072
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?May 2, 2019 at 2:55 am #60078
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
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:
# Set flow sensor change detection gpio port
def detect_flow_sensor_gpio_changes(self, flow_count):
GPIO.add_event_detect(10, GPIO.RISING, callback=flow_count, bouncetime=0)
.May 16, 2019 at 4:58 am #60414
What did you redefine the PIN_SR_LATCH and PIN_RFTX to?May 16, 2019 at 5:11 am #60417
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?May 16, 2019 at 6:21 am #60433
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.May 16, 2019 at 6:31 am #60436
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.May 20, 2019 at 8:06 pm #60514
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.
- You must be logged in to reply to this topic.