logo elektroda
logo elektroda
X
logo elektroda

How do I set the schedule for the relays on the ESP8266 via the app?

kataklysm101 768 6
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 17870366
    kataklysm101
    Level 9  
    Hello, I am looking for a solution for my device

    In brief: the ESP controls two relays

    I would like to be able to set, using an app for android, when each of them should switch on which day of the week

    I have recently started my adventure with arduino and ESP8266, first simple programs behind me but I don't feel up to it yet. However, I have seen many projects e.g. for watering the garden etc which use such functionality. Maybe one of you can suggest where to look for inspiration? If I had at least a similar solution then it would be easier for me to expand this to suit my needs on this /tex basis. Thank you in advance [/tex].
  • ADVERTISEMENT
  • #2 17870428
    tos18
    Level 42  
    First make a working clock with a date stamp.
    Then it's a set of conditions comparing day(set) with day(from the clock) hour with hour minute with minute.
  • ADVERTISEMENT
  • #3 17870508
    khoam
    Level 42  
    kataklysm101 wrote:
    I would like to be able to set with an app for android when each should switch on which day of the week
    .
    Then you can use NTP for a start and you will have the exact time and calendar: example .
  • #4 17870519
    tos18
    Level 42  
    As a time server for ntp I propose tempus1.gum.gov.pl
  • ADVERTISEMENT
  • #5 17870688
    kataklysm101
    Level 9  
    OK, the clock is working. Do you have any suggestions on how to get started? In fact, I only need the days from PN to ND and the possibility of calling one function at a specific time each day.
  • #6 17870737
    tos18
    Level 42  
    Code: C / C++
    Log in, to see the code
    .
  • ADVERTISEMENT
  • #7 17871147
    starob
    Level 29  
    You can write everything from scratch or modify a complete project:
    https://github.com/n0bel/ESPrinkler2, which meets all your requirements.
    Among the many watering controller designs, this one seems fairly simple and the most amenable to modification. I have used it myself after a few modifications at home.

Topic summary

The discussion revolves around setting a schedule for relays controlled by an ESP8266 device via an Android app. The user seeks guidance on implementing a scheduling feature that allows relays to activate on specific days of the week. Responses suggest starting with a working clock using NTP (Network Time Protocol) to obtain accurate time and date. A sample code snippet is provided to compare current time and day with predefined activation times. Additionally, a recommendation is made to modify an existing project, specifically the ESPrinkler2, which aligns with the user's requirements for a watering controller.
Summary generated by the language model.
ADVERTISEMENT