Offline weekly sheduler for lighbulb/appliances

  • Hi, newbie here. :)

    I need to have some appliances ON on non-holiday weekdays during work hours. And, I see the Shelly Plus Plug as a good candidate for the project. The main issue is that the project is for an offline environment and no local NTP server is available. However, there's no issue in configuring the Plug while being online.

    Is it possible to run the scheduling cron script properly if the Shelly will be offline most of the time?
    Does the plug keep clock time when it has no current? (like a desktop computer does)

    Any idea on how much the internal clock will drift over time if being offline?

    Thank you!

    P.S.: I found this other thread but it didn't quite answer the question and since it's old (2021) the forum recommendation was to start a new one. ||

    Weekly Schedulle for Shelly PlugS if Offline

  • stuxhy 25. Januar 2024 um 19:47

    Hat den Titel des Themas von „Offline weekly sheduler for lighbulb“ zu „Offline weekly sheduler for lighbulb/appliances“ geändert.
  • Welcome to the forum.


    Short:

    "Is it possible to run the scheduling cron script properly if the Shelly will be offline most of the time?"

    Yes

    "Does the plug keep clock time when it has no current? (like a desktop computer does)"

    No. Without power the clock and the powermeasurement values are gone

    "Any idea on how much the internal clock will drift over time if being offline?"

    No. But it will be an important thing.


    Long:

    I have added the following schedule to a plus plug s:

    pasted-from-clipboard.png

    pasted-from-clipboard.png

    I activated the internal accesspoint and disconnected the wifi. The shelly toggles the output every 10 seconds without

    connection to the router. Time and unixtime are running forward. The RGB ring of the plug blinks blue (AP enabled).


    If i restart the plug or cut the power the time and unixtime is null.

    pasted-from-clipboard.png

    In the webui the time starts at 01:00:00

    pasted-from-clipboard.png

    It switches anyway, but i think it is only because of the "seconds only" schedule.


    A long time use without time sync is not a good idea, but it may works when the plug does not restart or gets a power loss.

    The time drift can be a big problem over the time.

    Perhaps you can configure Wifi 2 with a mobile hotspot (smartphone etc.). So the shelly can connect the hotspot if its in range

    and it can get the time from time to time.

    Jede Maschine ist eine Nebelmaschine. Man muss sie nur falsch genug bedienen 😁

  • Nordlicht_2023, thank you for your detailed answer.

    > If i restart the plug or cut the power the time and unixtime is null.

    So even a short power loss will unsync the schedule I need. Mehhh..


    > Perhaps you can configure Wifi 2 with a mobile hotspot (smartphone etc.). So the shelly can connect the hotspot if its in range and it can get the time from time to time.
    I need to convince someone to set their phone in hotspot mode when in the area and always use the same phone/credentials.
    This might do the trick, but not reliable due to our human nature...

    Too bad there is not a simple and reliable solution for my little offline project. I've even been thinking about setting a NTP server on a RaspberryPi with a RealTimeClock module attached. But, the more I think about it the more overkill I see this solution to fix such a simple problem.

    Einmal editiert, zuletzt von stuxhy (25. Januar 2024 um 23:39)