Page 1 of 1

Forcing a date change

Posted: Mon Aug 22, 2011 3:09 pm
by rimai
How to construct the url to force a time change through wifi directly, instead of Client?

Re: Forcing a date change

Posted: Mon Aug 22, 2011 3:14 pm
by binder
rimai wrote:How to construct the url to force a time change through wifi directly, instead of Client?
Here's how to update date/time without using the client:

Code: Select all

http://CONTROLLER_IP:2000/dHHMM,MMDD,YY
The format is as follows:
  • HH - hours
  • MM - minutes
  • , - comma
  • MM - month
  • DD - day
  • , - comma
  • YY - year (since 2000)
Everything MUST be in 2 digit format. So single digits (like 8) must have a 0 prefix. Here's an example:

Set the date to August 8th, 2011 at 9:30am

Code: Select all

http://CONTROLLER_IP:2000/d0930,0808,11
The controller will respond with OK and set the date/time on the controller. If there was an error, the controller will respond with ERR. The actual output will be like this:

Code: Select all

Success -  <D>OK</D>
Error - <D>ERR</D>
NOTE: Type this in the URL box in your web browser to set the date/time.

curt

Re: Forcing a date change

Posted: Fri Aug 26, 2011 9:13 am
by rimai
The library is missing some code after line 536 on ReefAngel_Wifi.cpp
It needs this:

Code: Select all

now();
RTC.set(now());
This is to save the values into the RTC chip. Otherwise the data goes right back to where it was on the next RTC sync or when rebooted.
Let me know if you need a pull request or this is sufficient.

Re: Forcing a date change

Posted: Fri Aug 26, 2011 9:15 am
by binder
rimai wrote:The library is missing some code after line 536 on ReefAngel_Wifi.cpp
It needs this:

Code: Select all

now();
RTC.set(now());
This is to save the values into the RTC chip. Otherwise the data goes right back to where it was on the next RTC sync or when rebooted.
Let me know if you need a pull request or this is sufficient.
Ok, thanks. I can add this in no problem. I've got a handful of changes in my dev branch that aren't reflected on github yet. :)

I'll make this change tonight.

curt