OpenSprinkler Forums OpenSprinkler Unified Firmware Logging not working after firmware update

Tagged: 

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #45006

    Mike Mathee
    Participant

    I activated the logging feature a while ago when I installed a water flow meter on the irrigation system.
    All worked well and I got the water readings I’m interested in.

    A few days ago I upgraded the firmware to the latest v2.1.7 on my v2.3-AC unit.
    Before the upgrade I exported the configuration and imported configuration back to the unit after the firmware upgrade.
    All went well no issues noticed.

    Yesterday, I wanted to check in on the logs and found that I’m getting an error saying “Error retrieving log data. Please try again later.”
    The enable logging tick box under system options is still checked. I unchecked, checked the feature and rebooted the unit several times.
    But the logging does not work.

    Could someone please assist me in getting the logging feature working again.
    Is there something else I need to do for it to work?

    #45041

    James
    Participant

    I have never been able to get logs working. I was told to remove and reformat the SD and that never solved it. I would also like to know how you fix this in hopes of getting mine going.

    #45043

    Mike Mathee
    Participant

    I’ll try that. Do you know if there is a specific format that the SD card needs to be formatted in?

    The logging feature worked well before the firmware upgrade, the problem only started after the firmware upgrade.

    #45058

    Ray
    Keymaster

    Sorry to hear about the issue. It’s not clear to me why firmware update would cause the logging to stop working. It’s using the same SD card library, and file format has not changed at all. I would suggest that you take out the microSD card (located close to the top edge of the circuit board), reformat it and try again. Also, if you have a spare microSD card, give that a try. You can format the microSD card to either FAT32 or FAT (if you have a brand-new microSD card, it should work out of box without reformatting).

    #46872

    richardgedwards
    Participant

    I also have a similar issue where I bought the OpenSprinkler 3.0 that came with firmware v2.1.7 installed. Initially the logging was working. I recently installed a flow sensor and enabled it and the logging stopped working with and error message as described in the previous post from Mike Mathee.

    Yesterday, I wanted to check in on the logs and found that I’m getting an error saying “Error retrieving log data. Please try again later.”
    The enable logging tick box under system options is still checked. I unchecked, checked the feature and rebooted the unit several times.
    But the logging does not work.

    The OpenSprinkler 3.0 does not have an SD card (at least I don’t believe it does) and so how can I fix the problem since I don’t have access to format the card.

    I would like to get the logging feature to work again, how can I do this?

    #46873

    richardgedwards
    Participant

    So I just found a solution to fix the problem. After looking in ​Firmware 2.1.7 API Document there is a command in there to clear the log data.

    http://os-ip/dl?pw=xxx&day=all

    where os-ip is the ip address of OpenSprinkler and xxx is your MD5 hashed password.

    After entering the above url in the browser it returned the result {“result”:1} which apparently means success. After clearing the log in this manner the log data started showing up again in the gui. Of course the first time I looked at the log data in the gui it said that it could not find any data for this day (since I just deleted it) however I ran a valve for 30 seconds and then looked again and the data showed up.

    #46986

    physiology
    Participant

    Thanks for posting your solution Richard…it worked for me too! However, without an SD card all of my log data is gone. Not a big deal as I just got the unit and have been running tests. Assuming the data was still present, would the “get log data” command (ie. http://os-ip/jl?pw=xxx&start=1413567367&end=1413657367) return the saved data?

    #47058

    richardgedwards
    Participant

    Assuming the start date and stop date is correct I believe it would. Here is link to an online epoch date converter:

    epoch time converter

    Here is what the docs say:

    /jl?pw=xxx&​start=xxx​&​end=xxx​&​type=xxx​ ​or /jl?pw=xxx&​hist=n​&​type=xxx

    and here is an example from the same doc which gets data from Friday, October 17, 2014 5:36:07 PM (start=1413567367) to Saturday, October 18, 2014 6:36:07 PM (end=1413657367) GMT.
    Example Return​: (e.g. by requesting http://os-ip/jl?pw=xxx&start=1413567367&end=1413657367)
    [[3,17,616,1413511817], [0,”rd”,86400,1413511845], [254,1,5,1413512107], [1,3,2700,1413552661], [5,3,1200,1413559201]]

    I find the second command more useful and easy to use:

    jl?pw=xxx&​hist=n​&​type=xxx

    where it just retrieves the data for the past n days.

    #47243

    Ray
    Keymaster

    OS 3.0 doesn’t have a microSD card, instead it logs onto the flash memory space in the microcontroller. The space is not a lot (1MB by default but there is actually 3MB available space for storing data). My suspicion about logging stopped working is that perhaps it exceeded the available space (though even with 1MB it can store quite a lot of data before running out of space).

    If you have a previous version of OS, like OS 2.0, 2.1, 2.2, since they don’t come with a pre-installed microSD card, it may be that the SD card slot has a connection issue. For OS 2.3, it comes with pre-installed microSD card and that has been tested so logging should be working on OS 2.3.

    #47503

    Mike Mathee
    Participant

    So I just found a solution to fix the problem. After looking in ​Firmware 2.1.7 API Document there is a command in there to clear the log data.

    http://os-ip/dl?pw=xxx&day=all

    where os-ip is the ip address of OpenSprinkler and xxx is your MD5 hashed password.

    After entering the above url in the browser it returned the result {“result”:1} which apparently means success. After clearing the log in this manner the log data started showing up again in the gui. Of course the first time I looked at the log data in the gui it said that it could not find any data for this day (since I just deleted it) however I ran a valve for 30 seconds and then looked again and the data showed up.

    Thanx a million @richardgedwards your solution has worked!

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

OpenSprinkler Forums OpenSprinkler Unified Firmware Logging not working after firmware update