Welcome, Guest. Please Login.
Linuxslate.com Forums

<=== Back to the Linuxslate.com Homepage

Newest Forum Posts

Mar 28th, 2023, 10:34am
News: Welcome to the linuxslate.com forums. May 2020: Forum registration has been disabled due to recent advancements in bypassing captcha's and the resulting increase in spam on the forums. Registration may be re-enabled at a later date. In the meantime, if you would like to register, please email "john" at this domain, and I will manually create an account for you. Registration is for legitimate and relevant discussion only. Misused accounts will be deleted without warning.


Pages: 1
NodeMCU IoT Clock Status Update (Read 5780 times)
Administrator
Forum Administrator
*****


Administrator

Posts: 108
NodeMCU IoT Clock Status Update
Nov 29th, 2016, 9:32pm
 
My Clock is very near initial release (source code release).
 
UPDATE: Significant Progress
 
Now Working:
 
Both Alarms, Including saving the settings.
 
Saving basic display settings, and restoring them on next boot.
 
More aggressive attempts to contact the SNTP server if a timesync fails. It now will attempt a time sync every minute for 10 minutes if there is a sync fail. This is both on the initial sync, and on hourly syncs. If after 10 tries, there is still no successful sync, it displays a different message, and does not try again until the next regular hourly attempt. In no case have I seen more than 8 consecutive tries fail.
 
New fixes as of 06 Dec:
 
Web pages for Main Settings and both alarms now correctly show current settings when set/viewed, including across a re-boot.
 
Minor bugs related to the above have been fixed:
 
Alarm text was loosing formatting across a re-boot - Fixed.
 
Crash on Alarm if unit had been re-booted/power cycled - Fixed.
 
Error in display of alarm days.  - Fixed.
 
Distribution of the code has been delayed to allow these features to be in the initial release.
 
Initial Code released.
 
I have added basic "Factory Reset" functionality.  Upon selecting Factory Reset from the main page, a confirmation page is displayed. Upon confirming, the settings files are deleted, all settings are set to default, and the Web pages are re-written. The AP is then set to defaults.  This deletes WiFi passwords, and causes End User Setup to run on boot.
 
Other Fixes:
 
I received the red plexiglass, and it looks awesome.  There are still a few light leaks on the top and sides, but "production" units will not have this.
 
The bottom is a clear, but dotted, and much thicker piece of plexiglass. There is some light leakage out the bottom, but with the unit up on little rubber feet (LRF), this light leakage looks really cool, and is not significant enough to interfere with sleep (Opinion, not a medical evaluation), so I am planning to leave it this way in the next one(s) I make.
 

 
I also came up with a really simple solution to the clicking noise -- Install the back panel.  It attenuates the clicking significantly, but the Alarm tones are still more than loud enough.  This is only a solution for the prototype. I still need to order some audio amplifier modules for the "production" units.
 
Not yet fixed:
 
Web pages show default settings, not current/saved settings (except network settings, which works as expected).  Dynamically saving/generating the settings pages will require more code.
Fixed.
 
Setting the 2 alarms within 10 minutes of each other may still cause unpredictable results. (Code not checked/tested for this condition.)
 
Punctuation in the Alarm Messages still causes messages to be displayed "funny" (control character codes are displayed).
 
In addition to the above, more checks for valid inputs (settings) are needed.  Ex: Proper format for Alarm Time.
 
Weather not yet implemented.  Still anticipating possible memory problems when this code is added.
Back to top
 
« Last Edit: Dec 20th, 2016, 7:34pm by Administrator »  

Mobile Linux ?
Got That!
WWW   IP Logged
Administrator
Forum Administrator
*****


Administrator

Posts: 108
Re: NodeMCU IoT Clock Status Update
Reply #1 - Feb 1st, 2017, 10:27am
 
2 Status updates:
 
1. My current Source Code (as in the source thread) contains a fairly blatant bug.  When an alarm is playing, the relevant sound file is (obviously) open each time the sound is playing. If the user then requests (or refreshes) the web page, the webserver must open the relevant HTML file. While newer NodeMCU firmwares will allow 2 files to be open at once, the version I used did not.  The result is that there is a very high probability of a crash when attempting to cancel an alarm or hitting snooze. While a crash serves (in a rather un-elegant way) to silence the alarm, and the clock resumes normal function after it reboots, this renders the snooze function unuseable.
 
2. Newer firmwares allow 2 files to be open at the same time, but have another problem. The End User Setup module is being really written, but currently contains bugs that prevent its use.
 
This issue can be fixed by having "handshakes" between the web server and the sound player to avoided having 2 files open at the same time, or wait for a multi file firmware that works, and rewriting the source accordingly.
Back to top
 
 

Mobile Linux ?
Got That!
WWW   IP Logged
Administrator
Forum Administrator
*****


Administrator

Posts: 108
Re: NodeMCU IoT Clock Status Update
Reply #2 - Mar 15th, 2017, 12:26pm
 
Update and Serious bug notice:
 
--- Daylight Savings Time Errors:
11 March 2017 DST change did not work correctly due to glaring errors in the DST related code.  
   Spring Forward and Fall Back tied to wrong dates. Spring was in November, and Fall was in March.   embarrassed
   Other not - as - glaring errors and optimizations in this section of the main code.
 
-- Another DST related error in the Daytime connection to the time server.
   2 issues caused the initial connection to the Daytime server (port 13) and determination of whether DST was in effect to fail.
 
There seems to be another error causing cross talk between the settings for DST and 12/24 hour time display.  More research on this bug (if it actually exists) is needed.
 
I hope to also come up with a work around for Issue 1 mentioned in the previous post.
 
 
Back to top
 
 

Mobile Linux ?
Got That!
WWW   IP Logged
Administrator
Forum Administrator
*****


Administrator

Posts: 108
Re: NodeMCU IoT Clock Status Update
Reply #3 - Nov 6th, 2017, 8:59pm
 
Please refer to the
 
NodeMCU IoT Clock Source Code: http://linuxslate.com/cgi-bin/forum/YaBB.pl?num=1482280050
 
page for future status and issues list.  This separate thread is deprecated.
Back to top
 
 

Mobile Linux ?
Got That!
WWW   IP Logged
Pages: 1