The device name I will use is relay1, relay2, rela3, relay4.
Four Relays I will use to turn on the Lights in 4 Rooms.
My location in Indonesia.
ntp.org is keeping a list of NTP servers you can use, and they will redirect your NTP requests to a suitable NTP server in your area.
As ntp.org says, in Indonesia you should send NTP rqests to these servers:
I'd give it a try and test whether these four servers offer reliable NTP time services for your location.
If it does not work with time servers from Indonesia, you can always switch over to use NTP servers from other parts of the world, like USA.
On or off will be arranged according to lecture hour, for example we enter the room at 07.30 until 10.00 in the room to one then Relay1 will live until 10.00 and will Off if it exceeds that time. If we log in again at 14.00 to 17.00 then Relay1 will turn back until 17:00 and will Off if it exceeds that time. So every day time switch will be adjusted to the schedule of the lecture we take so that the light will light up when we enter the room and will Off if it indicates the time out.
Now it might become complicated with some logical problems:
As far as I have understood you want TWO different user interfaces:
One user interface offering "toggle ON/OFF by tapping a virtual button in the web browser
And another user interface to enter "ON time" and "OFF time", changing each day for each day and each room.
I think you have to decide, which is the priority.
If you programmed a switching time from 7:30a.m. to 10:00first, and at 9:00 you enter the togglee interface and toggle the light: What do you want then?
- switching by time says: light has to be ON
- switching by toggle interface says: light has to be toggled OFF
- what do you actually want to happen, then?
- priority for "switching by time"?
- or priority for "switching by toggling the state manually"?