OpenSprinkler Forums OpenSprinkler Unified Firmware Wrong Time after DST Change

  • This topic has 58 replies, 6 voices, and was last updated 10 years ago by Ray.
Viewing 25 posts - 26 through 50 (of 59 total)
  • Author
    Posts
  • #34499

    automate
    Participant

    I put in 92410, click lookup and it comes back with San Bernardino, California. If I enter San Bernardino, I get a list of options, the top one is San Bernardino, California. Either way the Open Sprinkler time is ahead of local time by one hour.

    This is a screen shot with the computer clock in the bottom corner. You can see the Open Sprinkler time at the top and the difference.

    #34501

    I’m in CA too, it’s correct for me but to test I entered 92410 and it’s still OK, see below capture (capture of displayed location added):

     

     

    Attachments:
    #34503

    automate
    Participant

    So obviously it is my system, but what is causing it?

    #34505

    automate
    Participant

    I think I found the problem, The firmware on the Open Sprinkler display was set to NTP “off”.

    This is at the LCD display, even though I had set it to “on” in the web interface it didn’t turn on at the LCD.

    I see something else at the LCD that isn’t on thew web interface, “use weather” it gives me options 0 – 5, what does that mean?

    #34506

    Samer
    Keymaster

    Ah okay that makes sense. So turning NTP on fixed the issue?

    Also, the use weather option on the LCD likely corresponds to the weather algorithm type in the options page. 0 means manual, 1 is Zimmerman and Ray likely allotted a few others for easy upgrade.

    I will let Ray confirm the use weather option but glad you found the issue.

    #34507

    automate
    Participant

    more testing and I found I had the Tzone on the LCD set at -7:00 and I am at -8:00. I would think NTP would take care of that??? but is doesn’t, so what is the purpose of NTP If i have to set the time offset. The web interface does not offer the Tzone feature, only place to do it is on the LCD.

    NOW after messing with the LCD settings (on the Open Sprinkler board), the web interface comes up blank, but I can still access it on the IPhone???

    #34510

    automate
    Participant

    turning NTP on / off did not fix it, I had set the Time zone to -8:00 and turned on NTP and it got the right time, I thought the NTP was the fix. Now I cycle the NTP and it makes no difference. What is the IP for the NTP?

    #34511

    Samer
    Keymaster

    The app does have the timezone feature however if a valid location is entered its hidden (since the location will resolve if dst is in use). To expose it right now, you can empty location and use “lookup” to cause an invalid lookup.

    If the web interface gets accessed very rapidly it may incur a small period where the web interface isn’t as responsive however you can power cycle or wait a few minutes.

    The NTP IP is a public NTP server that we use to poll the time. We then adjust it using DST from the lookup based on location.

    #34513

    automate
    Participant

    I reset the system, manually reloaded all the data to be sure I wasn’t copying bad info.

    Web interface is now working, If I check NPT and use New York as my location the time does NOT change.

    #34515

    automate
    Participant

    More testing, I can confirm that NTP is not working. I can change the time using the time zone menu, it changes immediately, nothing else causes a change.

    My original problem was that I had time zone 1 hour off, that is why my clock read wrong. I was assuming NTP was making changes, it was not…BUT it should.

    #34525

    A long shot but is it possible you have the same “screw shorting tracks” problem that I had here https://opensprinkler.com/forums/topic/opensprinkler-firmware-2-1-0-beta-major-upgrade/page/5/ ?

    Just in case there is any confusion, NTP doesn’t care about time zones, it just delivers Universal Time (UTC). The local device then corrects that to local time based on the location or time zone that has been set. When I want to test if NTP is working on something I will set the last digit of the minutes incorrectly and then see if those correct when the NTP update happens.

     

    #34526

    Ray
    Keymaster

    @sprinklesprinklelittlestar: the screw hole track issue is only on DIY 2.2 — in fact I just checked the PCB design, and the mistake was that the top/bottom keepouts (which prevents traces from running nearby) were slightly shifted from the screw hole, that’s why some PCB traces went too close to the screw hole. But assuming user ‘automate’ has the fully assembled OS 2.1, this is not an issue. In addition, all fully assembled OS have been tested and the initial time on OS is obtained from NTP.


    @automate
    : if you change the time zone manually, that means either you didn’t turn on NTP flag, or you are changing this manually on the controller using buttons. Can you confirm?

    #34527

    Well, I did say it was a long shot 🙂

    #34528

    automate
    Participant

    @sprinklesprinklelittlestar: This is a DIY 2.2u, In any case I used nylon screws since I saw some of the screw heads landed on traces.

    @Ray: I am changing the time zone on the controller with the buttons. Note, this is a DIY 2.2u, if that makes a difference.

     

    #34530

    Ray
    Keymaster

    There are two more related notes:
    1. if there is any station currently running, NTP will pause until all stations have stopped. This is for the simple reason that time change while stations are running can mess up the run time, so the NTP sync will wait until no program is currently running.
    2. if you want to manually set time zone, then leave the location string empty, as Samer said. if the location is valid, and a valid time zone based on your location is returned, your manually set time zone will be overwritten. Therefore if you want to keep the manually set time zone, just leave the location string empty.

    I still can’t get the source of the issue you are seeing, because I can’t reproduce the issue. My suggestion is to perform a system reset and check the time before you change any setting or import configuration. The default location is Boston, MA, so upon system reset, it should get the current time of Boston, MA. If it does, that means NTP sync is working correctly.

    #34531

    automate
    Participant

    I did do a reset last night and it came up with Boston, but I didn’t look at the time shown, The time zone was -5:00 (I think).  I am sure NTP sync is not working since I can input any location and the shown time remains the same. I have done all the time setting testing with no stations running. I really don’t want to use manually set time zone, I like the accuracy and no maintenance (DST), of NTP.

    I can reload the firmware but I would think it strange that NTP would be the only thing affected in a glitch.

    I will be gone until this evening so won’t be able to test anything.

    Thanks for all the help, I hope we can get it figured out.

    #34536

    automate
    Participant

    I did a system reset at the controller. It came up with time zone -5:00, using the web interface, the location was Boston MA. A google query showed the time on the controller correct for Boston MA.

    I don’t believe it is getting the NTP sync but instead reading the correct time from the time zone. I suspect the time zone of -5:00 is coded into the firmware and since we are not in DST it reads the correct time for Boston regardless of it getting NTP. If I change the time zone to -8:00 it doesn’t read Boston time anymore, instead it reads Boston time -3 hours.

    When the controller boots up it has NTP syncing on the screen for 1 minute, then it goes away is this the request timing out?

    #34537

    automate
    Participant

    The controller shows 204.9.54.119 as the NTP IP address, is this correct? Is there a different server I can use?

    #34540

    automate
    Participant

    I am going through a Linksys 8 port switch > WRT54G router > modem, is it possible one of those is blocking the NTP?

    #34542

    Ray
    Keymaster

    I don’t believe it is getting the NTP sync but instead reading the correct time from the time zone. I suspect the time zone of -5:00 is coded into the firmware and since we are not in DST it reads the correct time for Boston regardless of it getting NTP. If I change the time zone to -8:00 it doesn’t read Boston time anymore, instead it reads Boston time -3 hours.

    I am confused what you are saying here. From what I see, NTP syncing is now working on your OpenSprinkler, isn’t it?

    The time zone is never hard-coded in the firmware — it’s stored as an option which you can change (although normally you shouldn’t need to because it’s automatically changed based on the time zone query).

    #34556

    automate
    Participant

    “The time zone is never hard-coded in the firmware — it’s stored as an option which you can change (although normally you shouldn’t need to because it’s automatically changed based on the time zone query.”

    I don’t think this is accurate. I removed the controller battery, fl;ash card and network connection. I then did a “reset all”. I went into the menu at the controller and the time zone read -4:00. The menu had NTP “on” . The controller could  not access the internet or even the local network so this time zone must be part of the code. At this point the time read 00:00 and date was 01 – 01

    Next I connected the internet and power cycled the controller. The time and date refreshed and the time was correct for Boston, the time zone had changed to -5:00. This confirms the NTP was able to get the correct time.

    Next using the web interface I changed the location to Honolulu Hawaii, and power cycled the controller. I checked the web interface and the location had changed to Hawaii, but the time zone was still -5:00, Hawaii is -10:00.

    You said the time zone is automatically changed with the query, but it only worked on the Boston MA which I didn’t query. Now I can change the query but the time zone does not change.

    If I now change the time zone to -12:00 but leave the location as Boston MA, the NTP does not change the time zone back to -5:00, power cycling the controller does not help.

    #34559

    Ray
    Keymaster

    I went into the menu at the controller and the time zone read -4:00. The menu had NTP “on” . The controller could not access the internet or even the local network so this time zone must be part of the code.

    Of course the time zone has to have an initial value at factory default setting. It’s like when you re-install your computer, it has to have a default time zone, isn’t right? In this case, it’s set as -4:00 (which matches Boston,MA’s time zone in the summer). But it qucan be anything, and that doesn’t matter, because the time zone will be updated after you put in your location.

    I really don’t understand why you are seeing the issue you are seeing. I can’t reproduce this issue, and I don’t see any other report of the same issue. The firmware queries a python script at http://weather.opensprinkler.com/weather0.py?loc=YOUR_LOCATION_STRING to obtain the time zone. So the only thing I can think of is maybe the connection between your OpenSprinkler and the Internet is blocked, that it can’t query the script. That’s the only thing I can think of.

    #34561

    automate
    Participant

    It seems to be something like the OpenSprinkler can’t get the complete query for the time zone.

    Here’s an interesting test, I set the location to Boston, and the time zone to +14:00, unplugged the network from the controller and booted it. It timed out looking for NTP sync. and displayed the time as 00:00 Sun 01-01. Then I powered the controller off and connected the network cable and turned it on, It went through NTP query fast and displayed the time as 15:58 Wed 11-10. I power cycled it again and it came up with 15:59 Mon 11-10. Another power cycle got  the same 15:59 Mon 11-10. All the time the time zone stayed at +14:00

    #34563

    Ray
    Keymaster

    Can I ask you why you are testing setting time zone manually? Are you doing this on the controller using buttons?

    #34565

    Ray
    Keymaster

    As I said in the post above, the only thin I can think of is maybe the access to weather.opensprinkler.com is blocked by your network. Can you open a browser and try this url:
    http://weather.opensprinkler.com/weather0.py?loc=95050
    what do you see as the return?

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

OpenSprinkler Forums OpenSprinkler Unified Firmware Wrong Time after DST Change