OpenSprinkler Forums OpenSprinkler Unified Firmware Raspberry Pi wi-fi dongle going to sleep?

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
  • #40772


    Hi All,

    My Raspberry Pi (Model A+) becomes inaccessible every now and again.

    Initially we thought it was because I wasn’t running the unified firmware, but I built a new SD with only the unified firmware.

    I have also added the code to prevent the wi-fi dongle going to sleep.

    Also, it seemed to only happen when OpenSprinkler operation was disable (i.e. during winter), but happened again last night when there might have been a maximum of 1 day of inactivity.

    Anybody else noticed this behaviour?

    The next thing I want to try is have a script that runs twice a day that uses the wi-fi in an attempt to keep the wi-fi alive. It seems to be easy to find Python scripts that could do something like this. Is python available on our version or would I need to install it?

    Irrigation does not seem to be affected, so it is merely me not being able to go and make changes and view the logs. Also, I guess that time syncing and weather gathering might be affected by this.

    To recover, I need to unplug the power, which of course is not good for the O/S.





    I am affected by the same issue, I think.
    I have not had any time to troubleshoot the problem yet but my system becomes inaccessible within one or two days and I have to cycle power to get back in.
    It has been like this since I first set it up in June.
    The WiFi going to sleep sounds like a good place for me to start looking for the problem.
    I think I will bring it all back inside and leave the Pi plugged into a monitor and keyboard until it goes offline again and then check what is not working.



    I have just built an OpenSprinkler controller to give to my father for Christmas and I’m currently trying to trouble-shoot any potential problems before I give it to him and install it for him. I have not had the problem you have mentioned, but want to see if we did anything different from each other. Just to mention what I have done, I started off with the latest Raspberry Pi 2 and the latest OpenSprinkler Pi (Plus). I then installed the Raspbian Jessie. I have performed sudo apt-get update, sudo apt-get dist-upgrade and sudo rpi-update. If I now type inuname –a, I getLinux OpenSprinkler 4.1.13-v7+ #826 SMP PREEMPT Fri Nov 13 20:19:03 GMT 2015 armv7l GNU/Linux. I then went into my~/Downloadsdirectory and did agit clone by./ ospi.

    For WiFi, I’m using a Etekcity® AR5 USB WiFi dongle I purchased a year or so ago. This was my first time setting up wifi from command-line on a Raspberry Pi so I followed the instructions at To make matters more confusing, the security of MY home network uses a Radius server for WPA2, requiring both a username and password instead of the typical passphrase. This meant that I had to add the following to my /etc/wpa_supplicant/wpa_supplicant.conf file:

      pairwise=CCMP TKIP
      group=CCMP TKIP
        ssid="DADS SSID"
        psk="DADS Passphrase"

    With this setup, everything appears to be working the way it is supposed to. The reason I am making this for my father is he has a HUGE garden. When I was at his place last, I saw 4 cheap sprinkler controllers with each showing a different time. I could tell that each of them were kind of difficult to program and none of the zones were labeled, meaning he just had to know what valve was controlled by what zone number by what controller. With this OpenSprinkler, he will be able to have one simple to program controller that he can label each zone for what it is.

    I currently have one based on the BeagleBone Black… if I were to do it again, I’d definitely go Raspberry Pi. I only have two zones at my house but I did it primarily for weather-based watering. I also ran Ethernet cabling to my controller so Wi-Fi was a non-issue.



    I just had a thought (only a thought)… do you have NTP running? This polls NTP time servers every little bit. If the WiFi dongle goes offline due to inactivity, maybe this could be a cure if you don’t have it running. I’m wondering if it may have something to do with your initial board not having networking on it… has to be done via USB.



    Hi Guys,

    I noticed my issue for the first time after I wanted to enable it after the winter. We had a “good” winter with enough regular rainfall that allowed me to disable irrigation.

    Initially I had thought that each time it needs to check the weather that it will get the wi-fi dongle out of sleep mode and that it should be sufficient.

    The same would go for NTP. I’m fairly confident that I have enabled NTP as far as I understand the Pi does not have it’s own clock and I’m running on GMT+2.

    What might have thrown it off is that I set my location by clicking on the weather area on the top to the left. This took me to a map where I could pick my location. So I was not using Weather Underground. I have since changed to Weather Underground as I discovered that I actually had a WU API Key.

    I’m not sure how often it does these checks and whether it is frequent enough. It usually also only happened when there was a day where no irrigation happened. So maybe it only checks weather and time when there is irrigation scheduled for the day.

    Anyway, I now had to change my stations due to water restrictions. (Thus the quoted “good” above.) So I now run a station every day in order to stay within the allowable hours as I don’t like irrigating at night as it apparently causes issues for roses and sometimes grass as well.

    Troubleshooting this is going to be an issue as you’ll have to write a little utility that sends emails at regular interval and then keeps a log. It should then increment the interval between emails after each day it was successfully at sending emails and doing an on-line check of some sorts. Then when it eventually breaks after a few months you should have the optimal interval to poll in order to keep the wi-fi alive.

    The one thing I will have to check first is to see whether I did set the dongle to prevent it from sleeping after I rebuilt my SD card to the unified firmware.

    Have any of you tried the steps above already?




    Hi Ron,

    I would suggest you open it up so you can access it from your house in case he requires troubleshooting. There nothing as frustrating having to talk someone through troubleshooting over the telephone…

    I know this is a bit of a risk, but I’ve seen a few threads here that talks about allowing access from the internet while staying relatively save.

    It is something I still want to do as well, but first want to get the Pi stable. I’ve also been having issues with the irrigation at midnight + my gmt setting and where my irrigation was out by 12 hours for a short while. The time was not stable but it seemed to always fix itself, I presume after an NPT check.





    I already have access to everything in my father’s network; I have a VPN set-up between our networks.



    I had similar issues before on another project and the only way i was able to fix this was to get my RPi to ping the router every 10Min.
    What i have noticed is that my unit worked 100% unit i lost wifi connection to the unit for an extended time.
    I had to switch my AP off for a day when i had work done in the room where the AP was based, from 07:00 to about 17:30

    One the AP was back online, i was unable to see OSPi, the only way to get it back on line was to power down and power up again.

    Anyone with some idea, else i shall edit cron and add my 10Min. ping



    My setup has been working without a wi-fi drop for more than a month now.

    I don’t think the config setting to prevent power-save mode is what did the trick but rather a post I found here in the forum about forcing the dongle/wi-fi to reconnect when it drops.

    If you try and search for that or alternatively for posts I had commented on, you should find it.

    I did not post back about my success as I wanted to give it ample time te see if it might drop the connection again.



    My setup has now been working fine now for about 2 months
    Only thing I did was this
    sudo apt-get update
    sudo apt-get upgrade

    When I posted before I forgot a few details of my setup
    OSPi 1.4+
    Raspberry Pi B+
    EDIMAX EW-7811Un Wireless Adapter

    Current OS is
    Linux ospi 3.18.11-v7+ #781 SMP PREEMPT Tue Apr 21 18:07:59 BST 2015 armv7l GNU/Linux
    This may be newer than I originally had, not sure

    If you are still having issues you might want to look at these two blog posts on Disable Power Management for WiFi and/or USB
    I have not done this. I was waiting on results first of apt-get upgrade, and its been two months without loosing connectivity
    The idea being that you need to “CREATE” a file /etc/modprobe.d/8192cu.conf to disable the Power Management



    Hi Robert / PollieXmas

    My Open Sprinkler has been working 100% since 2013 without issues.
    I did not experience any issues where the WiFi went to sleep.

    My issue only appeared after my Raspberry Pi were unable to connect to my access point for an extended time, 07:00 to about 17:30.
    I had to reboot the RPi to get it working again, since then my RPi has been online without any issue.

    So it seems that if you lose connectivity to you AP for a extended period, the RPi does not re-connect to the AP once the AP comes back on line.

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

OpenSprinkler Forums OpenSprinkler Unified Firmware Raspberry Pi wi-fi dongle going to sleep?