OpenSprinkler Forums OpenSprinkler Unified Firmware problems on first regularly scheduled programs after FW 2.1.0 update

Viewing 25 posts - 1 through 25 (of 26 total)
  • Author
    Posts
  • #34307

    ramblinwreck
    Participant

    Hi Ray,

    Today is my watering day (once a week restrictions here in Central Texas) and I had some trouble this morning. In short, logging isn’t working and zones weren’t running when they were supposed to be.  Here’s what happened:

    * My programs are scheduled to run from approx 3AM-7AM Thursday.

    * I woke this morning at 6AM, checked the system status with my iPhone, and it correctly indicated one of the zones was running (good).

    *  I attempted to check logs from the iPhone app, but it seemed to almost hang loading the page (lots of time loading with the spinning “wait” indicator), and then ultimately said “no entries found in the selected date range”, even though the date range included the current day (previous firmwares would show already logged entries from the currently executing program). The app seemed sluggish after this, i.e. after returning to main screen. Like maybe the OpenSprinkler box was unresponsive? NOTE: After firmware update, I did use the “Clear Logs” button — I figured this was a good idea. I then checked logs from the web interface on my main computer and go the same thing — no logs, slow response of app interface afterward.

    * Sitting in my office about 15 minutes later, I checked that system status from my computer (i.e. via web interface), and it showed “front + maibox” zone running (i.e. marked in green on status page), however, I opened the door and noticed that the system was NOT running. Very troubling that the status showed as green (i.e. running) for that zone, when it actually wasn’t running.

    * Some time later (few minutes), I rechecked status and it showed that all zones were OFF, despite the fact that it should have moved onto the next zone (according to program preview page).

    * From this point, forward, no more zones ran (there were a few more zones scheduled to run), even though they still showed correctly on the program preview page.

    Any ideas what went wrong? It seems maybe like the controller crashed for some reason (me checking corrupted log data?) mid-cycle and ceased operation of the currently executing program? How to debug this sort of thing?

    I suppose the first step is that I need to get logging working again. What should I do? Remove the card and format it?

    Thanks for help. Thankfully I was able to finish irrigating the lawn with a run-once program since I knew exactly where it had stopped. I knew I should have waited until winter before the upgrade.  🙂

    Chris

     

     

    #34308

    Ray
    Keymaster

    Before I answer your other questions, let me first ask you: does your OpenSprinkler have a microSD card installed? Logging requires a microSD card. Without the card, logging should return no data. If you are not sure, check the LCD screen to see if there is a microSD icon (see page 4 of user manual https://opensprinkler.freshdesk.com/solution/categories/5000022938/folders/5000099564/articles/5000403746-opensprinkler-user-manual-firmware-2-1-0-)

    Then, my next question is: is the issue repeatable? Does it still persist, or is it a one-time thing?

    #34311

    ramblinwreck
    Participant

    Hi Ray, yes, sorry I was not clear. microSD card is installed. I have been using logging (with previous FW 2.0.x) for some time (months) with absolutely no problems. I did not remove/re-format SD card during upgrade to Firmware 2.1.0. The only “out of the ordinary” thing that I did was to use the “clear logs” function because I had run a bunch of manual testing (with “run once program”) after the firmware update and wanted those logs (corresponding to manual testing) erased. So logging did work at least once after FW update. But I  did not test that logging worked correctly after using “clear logs”.

    Edit to add: The LCD screen _does_ show the microSD card icon, so I believe the controller recognizes that a card is installed.

    #34314

    Ray
    Keymaster

    If I remember correctly, Firmware 2.1.0 stores log files in a subdirectory named ‘LOGS’ whereas previous versions store log files in the root directory. I suspect the issue you encountered may have to do with creating the LOGS folder for the first time, and deleting it when it doesn’t exist. I will check if this is a firmware bug. But I assume after the first log file writes it should be ok. If the issue persists, I would recommend taking out the microSD card and reformatting it.

    #34393

    ramblinwreck
    Participant

    Hi Ray, OK I pulled the card and reformatted to FAT using Disk Utility on my Mac. Reinstalled the card into the controller, ran a ‘run once’ test program and that seemed to be logged correctly (no longer getting the “no entries found”). Will report back after my next schedule program runs, which will be the upcoming Thursday unless it rains.

    Just for clarification — there should be no problem with me viewing logs while a schedule program is currently executing, correct? I used to be able to do this with the 2.0.x firmware, but this seemed to be the beginning of my troubles with FW 2.1.0, but maybe that was a red herring.

    PS – I did manually inspect the contents of the card, using Finder, before I reformatted. There were some TXT files at the top/root directory, and I was able to open these. I suppose these were from the previous Firmware. There was also the LOGS directory you mention, and a couple of log files there too. Didn’t see anything obviously corrupted.

    #34418

    sgruby
    Participant

    I encountered the same problem where the first zone ran, but the rest didn’t. I verified by checking to see if there was water outside and there wasn’t. The log shows that the 1 zone ran, but nothing else. I had reformatted the MicroSD card after the 2.1 upgrade.

     

    My log looks like this:

     
    <pre style=”color: #000000; line-height: normal; word-wrap: break-word; white-space: pre-wrap;”>[[1,0,180,1415084581]]

    My configuration is as follows:

    <pre style=”line-height: normal; word-wrap: break-word; white-space: pre-wrap;”>{“programs”:{“nprogs”:5,”nboards”:1,”mnp”:14,”mnst”:4,”pnsize”:12,”pd”:[[65,74,0,[420,-1,-1,-1],[180,0,180,0,0,0,0,0],”Front Plants”],[65,10,0,[420,-1,-1,-1],[0,180,0,0,0,0,0,0],”Front Trees”],[65,8,0,[420,-1,-1,-1],[0,0,0,0,300,0,0,0],”Rear Beds”],[65,74,0,[420,-1,-1,-1],[0,0,0,0,0,300,0,0],”Rear Planter”],[65,66,0,[420,-1,-1,-1],[0,0,0,180,0,0,0,0],”Rear Trees”]]},”stations”:{“snames”:[“Front Middle”,”Front Trees”,”Front Near House”,”Rear Trees”,”Rear Raised Beds”,”Rear Planters”,”S07″,”S08″],”masop”:[255],”ignore_rain”:[0],”act_relay”:[0],”stn_dis”:[192],”maxlen”:16},”options”:{“fwv”:210,”tz”:16,”ntp”:1,”dhcp”:0,”ip1″:10,”ip2″:0,”ip3″:1,”ip4″:111,”gw1″:10,”gw2″:0,”gw3″:1,”gw4″:1,”hp0″:80,”hp1″:0,”ar”:1,”ext”:0,”seq”:1,”sdt”:0,”mas”:0,”mton”:0,”mtof”:0,”urs”:0,”rso”:1,”wl”:100,”den”:1,”ipas”:0,”devid”:0,”con”:110,”lit”:100,”dim”:5,”rlp”:0,”uwt”:0,”ntp1″:204,”ntp2″:9,”ntp3″:54,”ntp4″:119,”reset”:0,”dexp”:0,”mexp”:5},”status”:[0,0,0,0,0,0,0,0],”settings”:{“devt”:1415087560,”nbrd”:1,”en”:1,”rd”:0,”rs”:0,”rdst”:0,”loc”:”San Diego, CA”,”wtkey”:”36716e4595294efd”,”sunrise”:369,”sunset”:1014,”sbits”:[0,0],”ps”:[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0]],”lrun”:[0,0,0,0]}}

    Any suggestions?

    Thanks!

    #34428

    Ray
    Keymaster

    Which version of hardware do you have? The fully assembled OS 2.1, or DIY 2.2? I suspect this has to do with writing into uSD card. I will import your program and see if the issue is reproducible.

    #34430

    sgruby
    Participant

    Fully assembled 2.1. Should I yank the card and see what happens? I can’t water again until Thursday, so I’ll do it tomorrow (water restrictions).

     

    Thanks!

    #34431

    Ray
    Keymaster

    Yes, please take the card out and see if the issue still persists. Sorry about the trouble. Just trying to understand the source of the issue. Thanks.

    #34444

    ramblinwreck
    Participant

    Hi Ray,

    OK, something is definitely broken with the microSD card access, for me at least. You recommended I remove the card and reformat — and I did just that (see above). In short, I reformatted, and ran a couple of run-once programs and confirmed they were logged correctly. Over recent days, I would occasionally check “view logs” to ensure I could still see those run-once program logs, and I could.

    Well, it rained here Tuesday/Wednesday so I manually disabled the controller. Today (Thursday) is my regular watering day. At 6AM, I opened up the app on my iPhone to double check that the system did NOT run since I had disabled it. Go to “view logs” and precisely the same behavior I got before:

    • “No entries found in the selected date range” (i.e my prior logs have disappeared)
    • the sluggish / waiting behavior where the waiting icon spins for longer than usual in middle of screen
    • same behavior from iPhone app or web interface

    Interesting to me that this failure was noticed during the regularly scheduled time to run the program (i.e. Thursday morning – same as last week), although the system was actually disabled and therefore did not actually run during this time. Not sure if that is relevant, or coincidence. Unfortunately I do not know if actual irrigation is affected, since I had manually disabled my system due to rain.

    Any ideas what the problem might be?

    Chris

    #34454

    ShawnHarte
    Participant

    off topic – but relevant for sgruby – you posted your api key, you may want to regenerate it on weather underground, otherwise it may be used and put you over your limits.

    #34455

    sgruby
    Participant

    Thanks! I just regenerated my key. (Personally I’d like to just shut off the system if rain is in the forecast; way back when this used to be a setting in the app that was hosted on a local web server.)

    #34456

    sgruby
    Participant

    I took the card out last night and it appeared to have worked this morning! Thanks for the tip; any chance this is an easy fix or some way to log to a server? The log data seems quite useful.

     

    Thanks.

    #34464

    Ray
    Keymaster

    OK, I will investigate the problem right away. I suspect it has to do with either SD card write speed, or the fact that firmware 2.1.0 writes log files in to a subfolder (/LOGS) whereas previous firmwares write into the root directory.

    #34467

    sgruby
    Participant

    No rush. I appreciate everything you’ve done with this project.

    #34604

    Ray
    Keymaster

    Just a quick update: I have found the cause of the issue: the logging function checks if the LOGS subfolder exists, and if so, it will attempt to create that subfolder. However, because the firmware is already using quite a lot of RAM (the microcontroller only has 4KB RAM), occasionally creating the subfolder exceeds the RAM limit, causing the controller to restart and not finishing the schedule.

    I’ve adjusted some buffer sizes, and also pulled the subfolder checking and creation function out of the logging function, and the issue seems to have been resolved. The fix will be included in the next firmware update, which we are targeting to release this week. Thanks for your patience.

    #34606

    sgruby
    Participant

    Thanks, Ray! What you are doing with the small footprint is a lost art form! I’ve never been so constrained in development; even when I did Palm OS development, I had more memory and jump tables to handle larger apps. I have a lot of respect for what you’ve done; keep up the good work!

    #34948

    Ray
    Keymaster

    Coming back to this thread: the RAM over-use issue (which caused failure to write to SD card) has been fixed in firmware 2.1.1. In addition, firmware 2.1.1 has added a ‘Enable Logging’ option in case someone wants to turn off logging.

    #34953

    sgruby
    Participant

    Excellent, I’ll do the update and report back if there are any problems.

    #35194

    Jacques
    Participant

    Hi – I’m not sure if my problem is related to this issue, but it may be.

    I have recently installed the OpenSprinkler (fully assembled) which I had recently purchased so it has the latest firmware, v 2.1.1.

    Everything was working as of yesterday morning (though I had only had two full days of operation), but then I noticed two things:

    1. the weather stopped appearing on the front page – no picture or even an empty square, it just disappeared; and
    2. when I went to view logs, I get the ‘no entries found in the selected date range’ message, despite logs having worked fine up until then.

    In respect of the weather issue, if I go into ‘Edit Options’ and change my location it does not come up with a list of locations. Previously I would type Perth and then I could select from several locations. Now if I type anything, nothing happens (as shown in the attached screenshot).

    I’m not sure if they are related issues or not.

    Thanks for any help,

    Jacques

    Attachments:
    #35212

    Ray
    Keymaster

    Firmware 2.1.1 has a known bug, which causes the web interface to lose response if the number of programs is 3, 6, or any multiples of 3. So the first question is: do you know how many programs you have added? If it’s a multiple of 3, I suggest that you upgrade to the latest firmware 2.1.2. Alternatively, if you don’t want to upgrade firmware yet, the workaround is to add an additional program and disable it. Let me know if this solves the problem.

    #35217

    Jacques
    Participant

    I only have one program at the moment, and have had a maximum of two when I was testing.

    The logging issue has gone now – I don’t know why, but I can now view logs fine all the way back to when I installed it.

    The weather issue still remains (i.e. the weather icon does not appear on the front page), but I recently noticed that the sunrise/sunset times were way off, so I changed what was in the Location option from ‘Perth Oval’ to ‘Perth’. No pick list popped up and the box is still grey rather than blue (which I believe indicates a recognised location?) – but the sunrise/sunset times immediately changed to the correct times, so that is working.

    I’m not sure why it changes the sunrsie/sunset times when I put in Perth Oval (which was an option in the pick list when it did work and is closer to my house), but they go to something very different.

    Perhaps I should just do a factory reset?

    #35218

    Samer
    Keymaster

    Jacques,

    Based on the image you provided earlier, it seems you are using the latest app which offers location based weather station selection. If you push the button (pin icon) to the right of the location input box, you will be provided with a map showing nearby weather stations. You can tap any nearby one and select it as your location which will look something like this: pms:KATZ8903.

    If you want to use a typed location, you may do so but use something such a zipcode to be more selective. This should fix the weather issue as well.

    Both should also fix the weather not showing up. There is no need to factory reset and unlikely to change anything.

    Let me know if that helps, thanks!

    #35219

    Jacques
    Participant

    Thanks for the responses. I think there is some sort of bug, because just after I read this reply and went back into options, the Location field had the ‘locate’ button to the right instead of the pin icon (see attached). This is what I was remembering because when you click on the locate button it gives you a pick list. I did so, selecting Perth Oval, the field went teal indicating a valid choice. But once I saved it the sunrise/sunset went haywire again.

    Then, I went back to the options and the button to the right had changed back to the pin icon. So as you said I tried to use it to select a location but as I’m at work it couldn’t find the correct location. However, I now realised I could enter a station myself, and entered icao:YPPH, which is the nearest airport (there do not appear to be any close personal weather stations). And now the icon is back on the front page, and the sunrise/sunset times are correct.

    When I get home I might use the pin icon again to see if there are any weather stations nearer to my house.

    Thanks for your help.

    Attachments:
    #35221

    Samer
    Keymaster

    The button changes to the locate button when WUnderground can’t be used (no key provided, no location services, etc). Since the map provides more accurate results it is the default, when available. As you have noticed you can enter things manually without using lookup or the pin icon, it will still save and be used.

    I am glad the airport lets everything work correctly!

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

OpenSprinkler Forums OpenSprinkler Unified Firmware problems on first regularly scheduled programs after FW 2.1.0 update