Hello,
I regret not seing this before! I am surprised how ‘close’ the look & feel of the sprinkler_pi UI is compared to the GreenIQ Web application… 
In the mean time, I have tried a different approach:
- I gain access to the GreenIQ through SSH
- I played (to understand) the existing scripts - I should have been more careful, it detected a ‘corruption’ and reset to ‘emergency’ mode (which is way too old!) Hopefully, I made a backup that I will restore later.
Exemple of the boot.log:
2019-04-02 06:42:48,591 - GreenIQ Initialization and Software Update Utility
2019-04-02 06:42:48,596 - --------------------------------------------------
2019-04-02 06:42:48,602 - Setting up GPIO pins - done.
2019-04-02 06:42:49,776 - Checking internet connection. Trial number #1.
2019-04-02 06:45:12,241 - Checking internet connection. Trial number #2.
2019-04-02 06:47:34,638 - Checking internet connection. Trial number #3.
2019-04-02 06:49:57,041 - Checking internet connection. Trial number #4.
2019-04-02 06:52:19,441 - Checking internet connection. Trial number #5.
2019-04-02 06:54:41,841 - No connection to cloud. Exiting initialization process
2019-04-02 06:57:47,857 - Starting release integrity verification
2019-04-02 06:57:47,867 - release_deployer.json based integrity check
2019-04-02 06:57:47,895 - Expected signature 1c94eb03d9ea8ef6073aef5b3a083a47 actual signature 1c94eb03d9ea8ef6073aef5b3a083a47
2019-04-02 06:57:47,906 - Emergency code validated code integrity. Exiting script.
2019-04-02 07:13:35,274 - Identity on card XXXXXX
- Control of the GreenIQ with this deprecated API is quite easy, to run sprinkler #3 with the testGPIO.py script:
# ****************************************************************************************
#
# Debug Test
#
# ****************************************************************************************
import greeniq_defs as GD
import time
from hub_model_handler import HardwareHandler
model_utilities = HardwareHandler.getModelUtilities()
# ************************************************************************
# Init GPIO
# =========
try:
# MAX_PORTS = 8 in model B, 19 in model C
MAX_PORTS = model_utilities.get_max_ports()
# For model B:
# gpio_map = [7, 11, 12, 13, 15, 16, 18, 22, 26]
# high_is = '1'
gpio_map, high_is = model_utilities.init_gpio()
except Exception,e:
print("Error in initialization process: ", e)
# ******************************************************************************
# Test valve 3
# ==============
def test_valve_3():
GD.set_gpio(MAX_PORTS, gpio_map, '00100010', high_is)
time.sleep(30)
GD.set_gpio(MAX_PORTS, gpio_map, '00000000', high_is)
return True
- now, I will try to understand why GreenIQ web application is no longer able to run sprinkler on my Gen2 GreenIQ