Auto DST seems to work backwards from how it should using "Ice-Tube-Clock-wbphelps-328" code.
Any ideas how to fix this?
Edit:
It seems I may have fixed it by pulling the battery and power to reset the dst rules.
Ice Tube firmware - Drift correction with Auto DST, Dimmer
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- jpkelly
- Posts: 47
- Joined: Sun Sep 20, 2009 4:09 am
- jpkelly
- Posts: 47
- Joined: Sun Sep 20, 2009 4:09 am
Re: Ice Tube firmware - Drift correction with Auto DST, Dimm
OK so while I thought my DST problem was fixed (reversed DST/non DST) by removing battery and power. It seems the clock loses an hour every night at midnight. It turns over to 12:00 then goes to 11:00.
Any ideas on how to fix this or what may cause it?
Any ideas on how to fix this or what may cause it?
- wbp
- Posts: 260
- Joined: Mon Mar 07, 2011 1:18 pm
Re: Ice Tube firmware - Drift correction with Auto DST, Dimm
what version are you running? are you using a GPS receiver?
- wbp
- Posts: 260
- Joined: Mon Mar 07, 2011 1:18 pm
Re: Ice Tube firmware - Drift correction with Auto DST, Dimm
The newest version of my firmware for the Ice-Tube clock v130406wm is on Github:
https://github.com/wbphelps/Ice-Tube-Clock
https://github.com/wbphelps/Ice-Tube-Clock
- jpkelly
- Posts: 47
- Joined: Sun Sep 20, 2009 4:09 am
Re: Ice Tube firmware - Drift correction with Auto DST, Dimm
I believe I am using the latest version. I will check when I get home. (How can I check?)wbp wrote:what version are you running? are you using a GPS receiver?
I am using a GPS receiver.
Since I installed the GPS unit the behavior was as if the DST settings were reversed. Setting it to Auto caused it to be 1 hour off regardless of what time of year it was. Then after looking at the code it seemed as if the data was somehow stored in eprom? So I thought about restarting with the battery removed and that seemed to work. But now each day it goes one hour off. Last night I watched it turn over from 11:59 - 12:00. When it changed to 12:00 it jumped back to 11:00 after approximately 1 second after the change. If I unplug/replug and change the time to a random value, the GPS will set it to the correct time.
- wbp
- Posts: 260
- Joined: Mon Mar 07, 2011 1:18 pm
Re: Ice Tube firmware - Drift correction with Auto DST, Dimm
Something doesn't make sense. I have one here and it works as expected. Auto DST worked perfectly last Saturday, jumping ahead at 2 am.
Have you checked to see what your settings are for DST and time zone offset?
When it boots it should display the firmware version.
If you like we can chat on the phone and go over the settings.
William
Have you checked to see what your settings are for DST and time zone offset?
When it boots it should display the firmware version.
If you like we can chat on the phone and go over the settings.
William
- jpkelly
- Posts: 47
- Joined: Sun Sep 20, 2009 4:09 am
Re: Ice Tube firmware - Drift correction with Auto DST, Dimm
I do have the latest firmware. Looks like my date was not set. (Does it get the date from GPS?) Will see what happens tomorrow.wbp wrote:Something doesn't make sense. I have one here and it works as expected. Auto DST worked perfectly last Saturday, jumping ahead at 2 am.
Have you checked to see what your settings are for DST and time zone offset?
When it boots it should display the firmware version.
If you like we can chat on the phone and go over the settings.
William
I do have the correct UTC offset.
There is one thing I am not clear on . There is a menu item called "set rule". What is that for?
- wbp
- Posts: 260
- Joined: Mon Mar 07, 2011 1:18 pm
Re: Ice Tube firmware - Drift correction with Auto DST, Dimm
"set rule" is for changing the DST rules. This is in case the rules for DST start/end date & time change (or you are in Australia or some place like that) and you don't can't recompile and reflash the firmware. Be careful that you don't change the rules, or Auto DST won't work properly.
The clock should get both the date and time from the GPS if it is working correctly. You can check this by changing the date and/or time and then waiting one minute. The clock is set from the GPS only once a minute (if memory serves) and only if the date & time do not match.
If you need the values for the DST rules I can post them. From what you describe is happening it sounds like something might have gotten changed.
What value do you have for time zone offset?
The clock should get both the date and time from the GPS if it is working correctly. You can check this by changing the date and/or time and then waiting one minute. The clock is set from the GPS only once a minute (if memory serves) and only if the date & time do not match.
If you need the values for the DST rules I can post them. From what you describe is happening it sounds like something might have gotten changed.
What value do you have for time zone offset?
- jpkelly
- Posts: 47
- Joined: Sun Sep 20, 2009 4:09 am
Re: Ice Tube firmware - Drift correction with Auto DST, Dimm
I am in UTC -8wbp wrote:"set rule" is for changing the DST rules. This is in case the rules for DST start/end date & time change (or you are in Australia or some place like that) and you don't can't recompile and reflash the firmware. Be careful that you don't change the rules, or Auto DST won't work properly.
The clock should get both the date and time from the GPS if it is working correctly. You can check this by changing the date and/or time and then waiting one minute. The clock is set from the GPS only once a minute (if memory serves) and only if the date & time do not match.
If you need the values for the DST rules I can post them. From what you describe is happening it sounds like something might have gotten changed.
What value do you have for time zone offset?
- jpkelly
- Posts: 47
- Joined: Sun Sep 20, 2009 4:09 am
Re: Ice Tube firmware - Drift correction with Auto DST, Dimm
"zone" is set to: -08.00 utcwbp wrote:"set rule" is for changing the DST rules.
What value do you have for time zone offset?
"rule" is set to: rule 0,03
I was hoping it was working after setting the date but today it lost 1 hr again.
- wbp
- Posts: 260
- Joined: Mon Mar 07, 2011 1:18 pm
Re: Ice Tube firmware - Drift correction with Auto DST, Dimm
The DST rules are a set of 9 numbers: (3, 1, 2, 2, 11, 1, 1, 2, 1)
You have to cycle thru them to see all the values.
That it happens at midnight tells us it's the Auto DST calculation that's doing this, it runs once a day when the date changes.
What happens if you set DST of Off or On instead of Auto?
You have to cycle thru them to see all the values.
That it happens at midnight tells us it's the Auto DST calculation that's doing this, it runs once a day when the date changes.
What happens if you set DST of Off or On instead of Auto?
- jpkelly
- Posts: 47
- Joined: Sun Sep 20, 2009 4:09 am
Re: Ice Tube firmware - Drift correction with Auto DST, Dimm
Actually the change does not seem to happen only at midnight. I watched it at midnight and it was correct. Then somewhere between midnight and 9am it lost an hour.wbp wrote:The DST rules are a set of 9 numbers: (3, 1, 2, 2, 11, 1, 1, 2, 1)
You have to cycle thru them to see all the values.
That it happens at midnight tells us it's the Auto DST calculation that's doing this, it runs once a day when the date changes.
What happens if you set DST of Off or On instead of Auto?
With DST On or Off it remains correct (depending on the time of year). Currently I have DST set to on and it is correct.
Can you explain the rules? They are a bit cryptic.
- wbp
- Posts: 260
- Joined: Mon Mar 07, 2011 1:18 pm
Re: Ice Tube firmware - Drift correction with Auto DST, Dimm
ah, so maybe it's happening when it should, which is 2 am.
the rules are as described in the code. this is why it's open source, so you can look at the code...
the rules are as described in the code. this is why it's open source, so you can look at the code...
Code: Select all
///uint8_t dst_rules[9]={3,1,2,2,11,1,1,2,1}; // initial values from US DST rules as of 2011
// DST Rules: Start(month, dotw, n, hour), End(month, dotw, n, hour), Offset
// DOTW is Day of the Week, 1=Sunday, 7=Saturday
// N is which occurrence of DOTW
// Current US Rules: March, Sunday, 2nd, 2am, November, Sunday, 1st, 2 am, 1 hour
- jpkelly
- Posts: 47
- Joined: Sun Sep 20, 2009 4:09 am
Re: Ice Tube firmware - Drift correction with Auto DST, Dimm
Ah ok Mine was set to 3. I will try rule 9.wbp wrote:ah, so maybe it's happening when it should, which is 2 am.
the rules are as described in the code. this is why it's open source, so you can look at the code...
Code: Select all
///uint8_t dst_rules[9]={3,1,2,2,11,1,1,2,1}; // initial values from US DST rules as of 2011 // DST Rules: Start(month, dotw, n, hour), End(month, dotw, n, hour), Offset // DOTW is Day of the Week, 1=Sunday, 7=Saturday // N is which occurrence of DOTW // Current US Rules: March, Sunday, 2nd, 2am, November, Sunday, 1st, 2 am, 1 hour
Thanks!
- jpkelly
- Posts: 47
- Joined: Sun Sep 20, 2009 4:09 am
Re: Ice Tube firmware - Drift correction with Auto DST, Dimm
OK that didn't work. It lost an hour somewhere between 12noon and 9pm.jpkelly wrote: Ah ok Mine was set to 3. I will try rule 9.
Thanks!
Please be positive and constructive with your questions and comments.