Why do I have SO much trouble with time?

Discussion in 'C-Bus Wired Hardware' started by pgordon, Jun 3, 2019.

  1. pgordon

    pgordon

    Joined:
    Nov 16, 2004
    Messages:
    115
    Likes Received:
    2
    Hey peeps. - If you look back over my thread history, I think you'll see that by far the majority of my posts are to do with problems with timekeeping on the CBUS network...

    Everything has been completely fine for the last few years... last week I needed - for the first time in a very long time - to fire up PICED & check some logic. shortly afterwards I've noticed that the time display on my DLT's is set back by 1 hour (yet again - sigh).

    I don't want to sound ungrateful for the efforts that you put in developing this kit - I love my CBUS, I really do.... but I am unable to say hand on heart that I think the reliability of trying to keep the damn time right is anything other than... lacking... - why for love of <insert your deity of choice> do I have so many problems with timekeeping?

    I've been through all the PICED project settings, (not that I changed anything) and I can't see any reason why the time should not be correct...
    My location is set correctly
    my timezone is set correctly
    my DST settings are set correctly
    NTP is enabled

    Note that I haven't so much as looked at the Wiser Admin interface in years, so nothing should have changed there.

    I believe I understand from previous threads where I've had exactly the same problem, the the Wiser (mk1 btw) would be the timekeeping master for the CBUS network, so it cannot be a coincidence that having re-uploaded the project last week, suddenly, after - literally - years, the my CBUS network time is all FUBAR'd again.

    Can anyone offer suggestions where to look/what to change to get my CBUS network time correct again?

    I do happen to have a Wiser Mk2 ready to deploy in place of the old mk1 model - it's been on my list of things to do for a while!
    Would ditching the old Mk1 & deploying the Mk2 make this any more reliable?

    Thanks

    Paul G.
     
    pgordon, Jun 3, 2019
    #1
    1. Advertisements

  2. pgordon

    NickD Moderator

    Joined:
    Nov 1, 2004
    Messages:
    1,371
    Likes Received:
    32
    Location:
    Adelaide
    It's been a long time since I had a Wiser "1" running myself but my recollection was that at least at the end of its time the timekeeping was pretty reliable... it did take a long time to get there though.

    A 1h offset is usually an indication of a problem with the DST flag, so it sounds like the DST flag might not be getting saved or restored correctly, or something is not playing the game right. I don't recall there being any issue with this but as I said, it's been a long time.

    I don't have either device handy, but you might be able to set this from the DLT (I think you press and hold the 5th button for 10s) or maybe via the Wiser itself. Let us know what you find.

    Nick
     
    NickD, Jun 4, 2019
    #2
    1. Advertisements

  3. pgordon

    pgordon

    Joined:
    Nov 16, 2004
    Messages:
    115
    Likes Received:
    2
    Thanks Nick, I wish I shared your experience with timekeeping... I'm sorry to say that ever since I got the Wiser 1, I've had no end of angst with it.. I really do think that as a product it was half-baked. So I've had the Wiser 2 sitting on my shelf for 3-4 years now, so I think perhaps this is the impetus I need to ditch the old mk.1 and finally get round to swapping them over. I'll try to complete that over the next few days, work permitting...

    I didn't know about the 5th button trick on the DLT, so thanks for imparting that :) - I have now set the time via that method, and so far (only about 2 minutes in) it has stuck.. fingers crossed that it stays that way

    Hopefully I'll be able to report back in a few days with good news...

    Cheers

    Paul G.
     
    pgordon, Jun 4, 2019
    #3
  4. pgordon

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    910
    Likes Received:
    56
    Location:
    Adelaide, Australia
    I have always found with my Wiser 1 that when you download a new configuration to it, it has a habit of screwing up the daylight saving flag. The solution has always been just to log into the Wiser, go to the tools page, and set/reset the DST flag manually. Once this has been done, it always behaves itself (time wise anyway).
     
    Ashley, Jun 4, 2019
    #4
  5. pgordon

    pgordon

    Joined:
    Nov 16, 2004
    Messages:
    115
    Likes Received:
    2
    Thanks Ashley, that's pretty much exactly, and the only thing I did. I did go back & check the DST settings afterwards, but I don't think I thought to unset & reset it.... the time reset via the DLT that I did yesterday (thanks Nick!) does seem to have stuck, so everything is all correct again. And at least now I will be spurred to upgrade to the Mk.2, which is now on my desk & being configured...

    Once again, thanks all for the suggestions. All's well that ends well... :)

    Paul G.
     
    pgordon, Jun 5, 2019
    #5
  6. pgordon

    NickD Moderator

    Joined:
    Nov 1, 2004
    Messages:
    1,371
    Likes Received:
    32
    Location:
    Adelaide
    I'm glad you got it sorted..

    The main thing to check is that a) the time displayed is right, and b) the DST flag is correct. Unless both of these things are correct it's just going to stuff up at the next DST change.

    I was hoping that in the DLT time setting page there was a way to set the DST flag (I'm back in the office today and I checked and there's not). I also couldn't remember whether/where you could do this on the Wiser.

    The way Ashley described is definitely the way to go.

    Nick
     
    NickD, Jun 6, 2019
    #6
  7. pgordon

    pgordon

    Joined:
    Nov 16, 2004
    Messages:
    115
    Likes Received:
    2
    Oh for goodness sake.... :mad: THIS MORNING all my DLT's are an hour behind, AGAIN! - and now the DLT button-5 trick to set the time does not work... I can set the time, hit OK, I see it change, then within a second I see it change right back again, so something is actively setting the time wrong. Suspecting the Wiser, I've now unplugged it completely, and will try the time setting again...

    Yup, sure enough with the Wiser turned off, my manual time setting on the DLT sticks....
    I've since powered the Wiser back on, and - so far - the time seems to be stable (i.e. the wiser didn't immediately set the time back an hour once it had completed booting up). - For how long that lasts remains to be seen...

    You know, I'm just about at my wits end with this... @Schneider - THIS IS NOT ACCEPTABLE as I've said on a number of occasions before, a 99p digital watch that I pick up at the petrol station does a better job of keeping the right time than this piece of immensely expensive kit. If there's anyone here from Schneider (I do realise this is not an official support channel) - would any of you PLEASE be so kind as to post a *definitive* sequence of configuration steps that will get the correct time for my timezone in the Wiser, and make it stay there? - ideally set by NTP so I don't have to have this fight all over again next time DST changes. (And the one bit of good news here is that the EU parliament has voted to abolish DST in 2021, so there's only a few more occasions where we have to bother with that faff).

    This particular time screw-up doesn't appear to have been precipitated by any event that has been suggested as a cause; I haven't uploaded a new config, haven't changed any network settings, nothing at all has occurred, other than just time passing, so why, after a whole week it just decided to change overnight last night is utterly mystifying.

    Sorry if this sounds like a rant (well, I guess it is actually) - but this constant unreliability with this one aspect which really shouldn't be that hard to get right, is extremely frustrating.

    TIA

    Paul G.
     
    Last edited: Jun 12, 2019 at 8:33 AM
    pgordon, Jun 12, 2019 at 8:25 AM
    #7
  8. pgordon

    jboer

    Joined:
    Apr 27, 2012
    Messages:
    390
    Likes Received:
    18
    Location:
    Sydney
    I have all very similar experiences with the Wiser 1 I have at home. The DST aways stuffs up, after a power cycle or upload where it restarts, I always need to go into the web interface and set the time in there. Nothing else works properly.
     
    jboer, Jun 13, 2019 at 1:48 AM
    #8
  9. pgordon

    pgordon

    Joined:
    Nov 16, 2004
    Messages:
    115
    Likes Received:
    2
    Well who'd have guessed... this morning, once again, the time on my CBUS network is retarded by 1 hour, having changed at some point overnight. Setting from a DLT (with the Wiser running) works for precisely 1 second before it changes back again. Setting it with the Wiser unplugged 'sticks' I am now going to leave the wiser unplugged for the next 24 hours & observe what happens tomorrow morning, although I've already got a pretty good idea what will transpire...

    If I cannot get this damn wiser to behave, I truly think I am close to chucking it in a skip, and hang the cost.

    Paul G. :mad::mad::mad::mad::mad:
     
    pgordon, Jun 13, 2019 at 7:26 AM
    #9
  10. pgordon

    pgordon

    Joined:
    Nov 16, 2004
    Messages:
    115
    Likes Received:
    2
    It's somewhat odd.... DST is currently active in my location (Oslo) so the time here just now IS 08:47 (I am in the Central European Summer Time zone).

    My Wiser settings are thus:
    upload_2019-6-13_9-5-29.png

    upload_2019-6-13_9-4-50.png
    (I'll talk about the obvious error with this picture a little further down)

    My PICED project settings are thus:
    upload_2019-6-13_9-11-35.png

    upload_2019-6-13_9-13-12.png

    upload_2019-6-13_9-14-3.png

    The PICED project has been transferred to the Wiser. The project settings are CORRECT; I am in a GMT+01:00 area, the start & end dates of DST Are correct, my country, city and Lat/Long values are all CORRECT.

    What is INCORRECT is the application of the DST offset in the Wiser UI - It has to be set to DISABLED in order to show the correct time - the instant I click the 'Enabled' radio button it changes to 1 hour ahead (as it should) - but this is now incorrect as it's an hour ahead of the actual local time... (and the change is instantly shown on all my DLT's as well. Now I would expect that with this combination of settings it should have been impossible to get the wrong time... - everything it needs to know to get the correct time for my location is there...

    What I have now tried is to enable DST in the Wiser UI (thus setting CBUS time 1 hour too far ahead) then I have manually reset the time via the DLT button 5 config, which then makes everything (DLT's and Wiser UI) show the CORRECT time. So far (5 mins in) this has 'stuck' - but I have observed the time has changed overnight on the last 2 nights in a row, so it remains to be seen what will happen tomorrow.

    So at the end of this set of changes I now have DST enabled in the Wiser UI - (DST is active now, so it should be enabled there). what bugs me is that I then had to manually set the time, even though I have NTP enabled & configured, and all my other timezone settings correct. How often does the wiser check NTP for time? I don't recall having seen any user-configurable options for the frequency of polling NTP... Might it be some time during the night? - which may explain why the time changed overnight the last couple of evenings... I would have been inclined to expect that any time related operation - such as enabling or disabling DST would prompt the unit to poll NTP & get a reliable fresh update. Then again, I might also have expected that the UI would have an 'update now' button in the NTP settings section on the Setup tab in the Wiser UI.

    In conclusion, in a roundabout way, the Wiser may actually have doing the right thing, (since in the UI DST was disabled, it was setting the time back an hour) - but in a REALLY confusing way - and although I can't swear to it, since I didn't take any screen grabs when I did the initial wiser setup, I'm 99% sure that I ENABLED DST and some other operation has incorrectly set it back to disabled - my chief suspect here is that uploading the project (which I did after the initial browser based setup in the Wiser UI) must have "broken" the DST flag, which seems to correspond with what a few others say they have observed... I can, and will do some experiments shortly with uploading projects to the unit & checking the DST setting in the UI afterwards.
    It seems then, the implementation of DST in the wiser unit may very well be blameless, but there certainly looks to be a significant problem caused by 'something' screwing with the DST flag in the unit when it should be leaving it alone... I'm assuming that this:
    upload_2019-6-13_9-52-12.png
    is the relevant part of the project config that should correlate to the DST setting in the Wiser UI? and that "No daylight saving" = DST disabled, and "Add 1 hour" = DST enabled?

    I will report back with (hopefully) a final update after I've conducted a few experiments... fingers crossed that it is now truly, finally solved...

    Paul G.
     
    pgordon, Jun 13, 2019 at 8:57 AM
    #10
  11. pgordon

    pgordon

    Joined:
    Nov 16, 2004
    Messages:
    115
    Likes Received:
    2
    First test = epic fail... ran the transfer wizard, transfer completed successfully, PICED said wait 90 seconds for Wiser to restart, unit started to restart, but 7-8 minutes later, has failed to come back to life... - LEDs are MRA=orange, power=green. nothing else... looks like I'm going to have to manually power cycle...

    Manual power cycle is successful, unit is back online, UI is responsive...

    BANG! - DST is now, once again, (incorrectly) DISABLED in the Wiser UI - there is a bug without a doubt...

    upload_2019-6-13_10-26-27.png

    So now my Wiser has the incorrect time again (it's an hour behind), but it seems not to have broadcast it out to my DLT's which still correctly show 10:25 - so I have disparity between the two..

    But wait... - all on its own, - some 2 minutes after starting up:
    upload_2019-6-13_10-29-10.png
    It changed again... - I didn't touch it....

    I don't know whether to laugh or cry... I will retry to project upload & restart initiated from Wiser, since I haven't had that work correctly yet this morning...

    Paul G.
     
    pgordon, Jun 13, 2019 at 9:36 AM
    #11
  12. pgordon

    NickD Moderator

    Joined:
    Nov 1, 2004
    Messages:
    1,371
    Likes Received:
    32
    Location:
    Adelaide
    Hi Paul,

    Sorry for the frustration you are having. I agree it is confusing, especially without much in the way of documentation.

    TBH I hadn't realised in your latest posts that you had switched from your original Wiser to a Wiser2.

    A few pieces of information that may help you understand what's going on.

    1) NTP only provides UTC. This has to be converted to your local time based on the time zone offset and DST offset provided in the settings. Note that NTP does not tell the system anything about DST.
    2) The settings you put in the project for Daylight Savings create a schedule for setting/clearing the DST flag when DST starts/finishes. The Lat/Long settings are only used to calculate sunrise and sunset times for schedules and logic BTW.
    3) From memory, schedules don't run until the time has been validated.. I'm not sure what the criteria Wiser2 uses for this.. but syncing NTP is probably one of them, and this can take a few minutes. This may explain what you are seeing where the DST flag magically fixed itself.. it looks like the system has been set up to sync the schedule for DST at startup.
    4) Time on C-Bus is always broadcast as displayed... and the DLTs just display what they have been sent, if they are out by 1h it's usually because the DST flag is not set correctly. It's possible the old DLT is not preserving the DST flag when you use it to set the time... given you can set the time from the Wiser2 interface, I would stop trying to set it from the DLT and do it from the Wiser2.
    5) The time master negotiation system on C-Bus is based on periodic broadcasts, with more accurate devices broadcasting more often... but this means when you first power up a Wiser2 it has to first send out a request to see if there are other time masters, and then wait a while. Devices like DLTs will not get a time update until the Wiser2 has waited the appropriate amount of time before broadcasting.
    6) As such, the Wiser2 is not meant to clobber the time you have set in the DLT... this is a bug in the Wiser. It's usually not a problem unless you have a second device trying to be the time master.

    Once you have the Wiser2 synced to NTP and with the right DST offset applied in the Wiser2, it should all be OK.

    Nick
     
    NickD, Jun 14, 2019 at 6:41 AM
    #12
    Mr Mark likes this.
  13. pgordon

    pgordon

    Joined:
    Nov 16, 2004
    Messages:
    115
    Likes Received:
    2
    Thanks Nick. Yup, I fully understand how NTP works and exactly what it does/not provide, and the interrelationship between NTP, UTC, DST, and the application of local offsets. I'm vaguely aware of how the time negotiation works in CBUS.
    It seems to be sorted now - no time change took place overnight, so all my DLT displays are still correct this morning. I do wonder just exactly when the Wiser2 does an NTP query - the behavior I previously observed whereby the time would retard by 1 hour at some point overnight, somewhat suggested that it was doing the NTP lookup just once every 24 hours (perhaps at midnight). I would imagine it must do one at bootup as well.... perhaps if I get the free time (and the inclination) I could do a little network monitoring on the LAN & look the the NTP queries going out...

    At least I'm now aware enough of the bug in the Wisers and the errant behaviour often caused by a project upload that I can know to go & check the DST settings in the wiser UI after every upload & restart...

    Cheers

    Paul G.
     
    pgordon, Jun 14, 2019 at 11:35 AM
    #13
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.