GreenIQ Irrigation Controller

does not work. not via webaccess nor via SSH

Hello,

I’ve a Gen 2 GreenIQ. It’s connected by Ethernet only to the local network.
I can enter GreenIQ Direct Web page with the GreenIQ IP address.

Then I go to Program -> Zone 3 (for example) -> and I enable the zone and then put Manual On, but the valve is not activated by the GreenIQ Direct as it was with the Cloud.

Do you have any advice ?
Is the Gen 2 broken by the last GreenIQ Update ?
I’m very sad and lost.
Of the six valve connected to my GreenIQ, none of them is driven anymore with GreenIQ Direct…

Thanks in advance for any help,
Vincent

And not only the time in the Status page is wrong, but it’s stuck to 3/29/2019 11:14:22 AM ! It doesn’t advance.

Hi all,

I’m now able to connect in ssh using key file on a gen3. To do that you need (some linux skills) :
Step 1 : Mount the SdCard on a unbuntu OS and log as root
Step 2 : Create directory /root/.ssh on the Sdcard - do chmod 600 on .ssh directory
Step 3 : Create authorized_keys file in .ssh directory - do chmod 600 on authorized_keys file
Step 4 : add the public key of the Machine that will connect the Gen2 in the /root/.ssh/authorized_keys of the sdcard (search google if you need help)
Step 5 : Put the sdcard in the greeniq gen 3
Step 6 : Start Gen3
Step 7 : connect with the certificate (with the ssh -i option)

image
My Gen 3 system clock is correct… I think the debian is using NTP at startup. But the app does not use the system date… it use a webservice and store it a text file ()… and my text file is still indicating “Time: 30/03/2019, 17:51:35”

Abies, can you give some information about your NTP solution ? can you zip the modified code file and share them ?

That is great news for Gen3 owners! Be careful, I expect Gen3 to have ssh service stopped 15 minutes after startup (it is the case with Gen2). If you are already using ssh, you do not lose your session but you need to restart the service. To avoid this, in the /home/greeniq/code/hub_core.py, just comment this block:

def stop_relevant_network_services():
 [...]
    # abies - do not stop ssh!
    # if i_should_shutdown_ssh():
    #     os.system('service ssh stop')

Sure, I can share the modifications performed.
On the /home/greeniq/Code directory, on the hub_core.py, I have edited it as:

def set_epoch():
    # # abies - all of this is not working
    # if settings.OFFLINE_MODE:
    #     try:
    #         # abies - this web site no longer exists
    #         epoch_success = urlopen("http://www.convert-unix-time.com/api?timestamp=now").read()
    #         epoch = json.loads(epoch_success)["timestamp"]
    #         justputit(epoch, 'epoch.txt')
    #         epoch_success = True
    #     except Exception as e:
    #         boot_log.info('Epoch fetch failed.')
    # else:
    #     # abies - unsecured cloud no longer exists as well
    #     epoch_success = urlfetch(settings.UNSECURED_CLOUD_URL + '/php/epoch.php', 'epoch.txt', 30)
    #
    # if epoch_success:
    #     epoch = justgetit('epoch.txt')
    #     if len(epoch) == 10:
    #         boot_log.info('Epoch updated from cloud= ' + epoch)
    #         os.system('date -s @' + epoch)
    #     else:
    #         boot_log.info('Epoch fetch failed.')
    # else:
    #     boot_log.info('Epoch fetch failed.')
    # abies - force update through NTP, much easier!
    boot_log.info('Stopping ntp service')
    os.system("service ntp stop")
    boot_log.info('Forcing time from Internet NTP')
    os.system("ntpd -gq")
    boot_log.info('Starting ntp service again')
    os.system("service ntp start")

More exactly, the service is started when the unit boots. But NTP can not do easily ‘big’ jumps in time (threads, timers, etc. can rely on the clock). The modification above consists in stopping NTP, forcing clock synchronization through registered NTP servers in /etc/ntp.conf then starts NTP again to keep synchronization.

Yes, the Gen2 have the same issue! (except for the login issue, it works with a Gen3 !) I just expect the Gen3 to have numerous timeout issues and the 1 minute “loop” on the main.py script to be much longer. You have a ‘epoch.txt’ that is never updated and a ‘local_epoch.txt’ that is. As I said before, time management is not really great (issues with timezone on the Web app not correctly handled now that the cloud do not provide user timezone anymore).
By the way, this is why incentvije is stuck to 03/29: epoch.txt is not refreshed (used at startup to set internal clock), but the main issue is that local_epoch.txt is not updated in the main.py loop since this scripts crashes. And it crashes because of the config.xml file that is a Gen3 file even on Gen2 units.

Now, you have the choice, patching your unit to make GreenIQ software working better.
Or use a Debian distro (from Acmel Systems) with Gen3 device tree. It would theorically allows to use Domoticz, Sprinkler_Pi (with modifications) or sprinklerd (with modification). Actually, everything accessing GPIOs should be working (GreenIQ is using ablib Python library to access GPIOs in their scripts)

By the way, the Gen2 ports used:

Hi Abie, I see you are french as well.
Thanks a lot for sharing information.

It seems that a top on the shelves solution exist for Gen 2 with Domoticz (which is compatible with Raspery) : https://www.planete-domotique.com/blog/2019/04/10/greeniq-hs-domoticz/

But Gen 3 is not based on raspery, so we will need to wait a litle bit the solution for Gen 3 …Planete Domotique should provide something next week (I sent an email and get this answer). So I will wait for it because I’m not convinced anymore of the GreenIq software even if it works after managing that stupid epoch files.

I keep you posted.

Yes, I am aware of this solution.
There is no advantage of ‘investing’ more time in GreenIQ software: it is just that I have already corrected it, translated what is missing to French, etc. So, for my usage, it is fully functional. Still, I plan to migrate later on sprinklerd (with the advantages of having 2 additional valves).
Why sprinklerd:

  • I really do not like Domoticz GUIs (it must be a great software but GUIs are not my taste),
  • I do not want any log, etc. to be written on the SD card for reliability (I was surprised how verbose the GreenIQ logs are) - I did not have any issue with mine, but from experience, it should be avoided (or use RAM disk),
  • I would like to interface it with Home-Assistant as a ‘smart’ actuator (valves) and sensor (current). Right now, I have no experience at all with Home-Assistant, but I really like the GUIs.

Dear all, I have been following this thread with great interest. Unfortunately I have bought a GreenIQ Gen3 last year and only had time to install and set it up a few days ago. It then took me by surprise that the GreenIQ cloud is down. Therefore I am now looking for a way to get my irrigation system to work. You seem to have explored various options already. Which one would you recommend me to proceed at this point in time? I do have some linux skills etc… If you recommend me to install debian and then Domoticz, Sprinkler_Pi or sprinklerd, which one would you recommend me to install? Or should I try to access the GreenIQ and use the native software? I don’t know if that makes any difference but my GreenIQ was never connected to the cloud so has not been activated. I also have a rain and humidity sensor I was planning on connecting.

I can also wait a couple of weeks (?) if the to be released solution with Domoticz would be the one to expect to cause the least hassle.

I do not know if you have GreenIQ direct : you can try login on the web application with greeniq / greeniq for Gen3 (and smartgardenhub / 514919208 for Gen2) as login / password (it is either the one provided on the plastic card or this default one).

Hi Abies,

thank you very much for sharing the information. Do you have any further details on how to connect and access the analog sensors (S1, S-2, S-3 an Rain)?

I’d like to read values from analog sensors such as a rain sensor e.g. to automatically deactivate the valves.

Thank you very much in advance,
Stephan

Hello a-reda
Thank you for your excelent guide.
I have installed sprinklersPi as you have explained
But when i have opened the valves manually through the sprinklersPi web interface it does not open the desired valves ( it open some’ and some don’t and some it opens all in the same time)
I have tried to change the output in the setting with no improvement.
I then tried to see which gpio/pins are mapped using the linux shell command : gpio write 1 1 ( to open valve no.1 and gpio write 1 0 to close it. i ran through all the pins and the valves are working. So i guess the problem is that sprinklersPi is not mapped well to the pins which GreenIq connected the wires to the valves.
Did sprinklersPi worked for you ?
thanks
Guy

The SPI is used with a MCP3008 chip.
The S1, S2, S3 and rain sensor are using the channels described in the table above.

thanks to your tutorial i was able to get the greeniq up and running again for summer :slight_smile: so thank you very much for that.

do you know if there is a mobile app i can use for sprinkler_pi ? or some other way to get this box smarter? :smiley: id like to integrate it with the rest of my home, i also turn my pool light on and off with the sprinkler :smiley:

I was able to access the login interface on http://10.0.0.1. But username:password greeniq:greeniq does not work for me for the gen3. I have checked the original packaging and there is no plastic card and I have also tried the other combinations suggested here without any luck. Any other suggestions how I can get my new greeniq gen3 to work?

@pete83, did you get yours working?

Yes, the default login/password came from an image of his Gen3 that he sent: once you are able to read the ext4 partition, it is easy to find it in the /home/greeniq/hub_server/php/lite-login.php file.
I guess (but not sure) you do not have the latest software update (or pete83 did not), that would explain why it is different.

Hello

As mentioned by abies the login worked for me. No idea what firmware version I have but direct connection enabled.

Best
Peter

I have searched the web for a guide on how I could achieve this. All my tries have failed so far. How can I read the partition?

You can read and write ext4 with Paragon ExtFS for Windows Version 4.2.651.
regards
gwaag

Hello everyone, After having tried 2-3-4 times to use the Direct Procedure I bought RainMachine and it works much better! https://www.digitalgardensrl.it/collections/rainmachine