The Web Clock You Can Control Over A LAN

Not every project is meant to solve a new problem. Some projects can be an extension of an existing solution just to flex the geek muscles. One such project by [limbo] is the Web Clock 2.0 which is an internet-connected clock.

Yes, it uses a WEMOS D1 mini which is equipped with an ESP-12F (ESP8266) and yes, it uses an LCD with an I2C module to interface the two. The system works by connecting to the Google servers to get GMT and then offsets it to calculate the local time. It also has the hourly nagging chime to let you know that another precious hour of your life has gone and you need to set it up.

What [limbo] adds to the conventional functionality is a LAN application to send custom messages to the LCD. The software is called ‘Clock Commander’ and can be downloaded as a Windows binary through the source code is unavailable for now. Simply point it to the correct IP address and you can then send it commands to display stuff as well as control the sound. The project comes with Lua scripts and instruction how to DIY.

We imagine this can be used to create a custom geeky table clock or hack a digital coo-coo clock to drive your co-workers crazy at the press of a button. For those who are looking for something with lasers, check out the Laser Pointer Clock for a slightly more challenging build.

8 thoughts on “The Web Clock You Can Control Over A LAN

  1. “The system works by connecting to the Google servers to get GMT and then offsets it to calculate the local time.”

    Why? NTP exists for a reason. There’s even regional country-specific round-robin DNS.

    1. Yes, but have you actually built an internet clock based off the esp8266 and nodemcu? I did and I tried ntp, but in the end I ended up scraping the time off the nist because it’s a lot easier and it works quite well.

      1. I thought there were some sntp libraries out in the wild, are they just difficult to use?
        I am just starting to dig into the details because I am trying to build a esp/ntp clock for myself.

        1. It’s not an issue with library availability even there are none that I know of.

          It’s a property of Node MCU which is based on LUA.

          In LUA events are “first class citizens” https://en.wikipedia.org/wiki/First-class_citizen
          and functions are also first class. Events are functions or objects.

          Think of an event as being variable of type: function that can be attached to an object as an attribute. That same variable of type: function can also be attached to other objects but it remains the same function / object / event just like a variable within the same scope ie
          x = a + 1
          y = a -1
          In both the above the specific variable ‘a’ is referenced. In LUA an event is the same.

          This property of LUA is implemented in Node MCU and as a result Node MCU is highly optimized as an event driven platform. This means that there is a *LOT* of CPU cycle sharing by the even triggers (or just events if it’s easier to think of it that way).

          The downside of this is that any single event that hogs CPU cycles for too long with screw up the event management CPU cycle sharing so Node MCU is no good at all for long threads in processes, events or functions.

          TCP/IP based server protocols can potentially be very long threads as you wait for server responses or timeout and with complex protocols like (s)NTP or protocols that have a lot of iterations back and forth, Node MCU starts to fall apart. It simply isn’t a good platform for anything more than simple singles threads – one request and one response which rules out just about every server based protocol except a simple HTTP request/reply.

          LUA is a very powerful and incredibly fast language and on a decent CPU it is easy to structure a program to suite LUA without experiencing the limitations of Node MCU. I expect that they chose LUA because it is LUAs simplicity that makes it fast and that same simplicity makes it easier to port to micro-controller. But the reality is that by porting LUA to such a low powered micro-controller they really had to trim the fat.

          There are plenty of other platforms for the ESP8266 that are much better at ‘stringy’ internet based protocols.

  2. Geez, just Google something like:

    ESP8266 NTP

    There are plenty of client libraries out there. My question is: Why didn’t Inderpreet Singh bring this in the O.P. here? Where’s the Value-Added here on HaD?

  3. They limit NTP usage. Would prefer to use this with a precision clock chip onboard, NTP set it once a week or so, and have this project SNTP serve time to all the household systems with clocks that drift up to 10 seconds a day.

Leave a Reply to CanuckfireCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.