Remote Control Of Clocks Is Easy As Pi

[Fatjedi007] recently acquired three programmable boxing gym-type clocks to help his developmentally disabled clients manage their time. The plan was to have timers of varying lengths fire at preset times throughout the day, with the large displays providing a view from anywhere. Unfortunately, the clocks were not nearly as programmable as he needed them to be.

Since he’d spent enough money already, [Fatjedi007] turned to the power of Raspberry Pi to devise an affordable solution. Each clock gets a Pi Zero W and a simple IR transmit/receive circuit that operates using LIRC. The clocks came with remote controls, so it was just a matter of re-programming them. From LIRC, he wrote some scripts with SEND_ONCE and schedules the timers with a cron job. No need to get out the ladder—he can program all of them from his chair over VNC.

He does have one problem, though, and that’s getting the Zeros to set themselves over NTP with static IPs. Do you have any suggestions? Put ’em in the comments and help a Jedi out.

LIRC is pretty handy for anything you want to control remotely, like a stereo system.

16 thoughts on “Remote Control Of Clocks Is Easy As Pi

  1. I’m all for microsecond precision on wall clocks, just open up port 123 for connections from the local network and rate limit it if you are scared of something, or just fetch the time someother way e.g. http:


    curl -sI www.redhat.com google.com microsoft.com|grep Date:
    Date: Mon, 23 Apr 2018 07:29:18 GMT
    Date: Mon, 23 Apr 2018 07:29:18 GMT
    Date: Mon, 23 Apr 2018 07:29:18 GMT

      1. I’ve got an ever better one:
        curl -sI http://www.redhat.com google.com microsoft.com|grep Date:
        Date: Mon, 23 Apr 2018 12:12:40 GMT
        Date: Thu, 19 Apr 2018 11:14:01 GMT
        Date: Mon, 23 Apr 2018 12:12:39 GMT

        Don’t think anybody would want to set their clock after that XD

        1. And how would that be easier than a clock with ntp sync? At least that wouldn’t require two parts that are either connected with a cable (which could be annoying through a window) or a wireless system (at that point, why not just use the WiFi from the raspberry pi). I fail to see how your solution would be an improvement to the system in the article…

  2. I’ve had problems with static IPs on the RaspberryPi as well.

    Turns out Raspbian didn’t like me editing /etc/network/interfaces like normal, and I ended up having to add my static IP setup into the file /etc/dhcpcd.conf

    Hope this helps!

    1. I usually find that it’s easier to assign fixed IP addresses at my DHCP server, usually my wifi router.

      Two cautions. It’s by MAC address, so if you swap the SD card to another Pi, you’ll have to adjust that. Also, if you connect via wifi rather than LAN, that’s another MAC address as well.

  3. There is gotcha built in to the Pi clock-setting. Network time won’t reset if the fake clock too far off from that. Use this to override that limit:

    sudo ntpd -q -g

Leave a 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.