Replies: 2 comments 1 reply
-
I'm surprised you're seeing that much drift mine is about 2 minutes a year. I haven't looked at that code in like 5 years so let me take a look at what changes would be needed to allow passing the time to the file |
Beta Was this translation helpful? Give feedback.
-
Okay because this form uses post rather than get you can't just add the DateTime stamp to the URL. So without completely rewriting the page to take different input. You would need to use a curl command rather than a lynx call. So in testing, this command works for me:
I don't actually use the internal scheduler as I do it all over MQTT from NodeRed and HomeAssistant. So, I did a quick and dirty shell script that gets the current time in UTC and posts it to the form. Then you could call it from a cron job. It doesn't read the lighting server URL from the config file but given that no one else has asked about this I don't think I want to spend the time writing all that parsing code just for the URL
|
Beta Was this translation helpful? Give feedback.
-
I love what you have done with this web app! I have 25 TCP bulbs throughout my house and your software has allowed me to make full use of my investment even after the company has abandoned their product.
One issue that I would like to solve is allowing the gateway's internal clock to be reset daily. Without being able to sync to the TCP servers I have noticed that the internal clock drifts quite a bit over several days or weeks, which makes sunrise/sunset schedules become out of sync with the real world.
What I'm wanting to do is have a daily cron job set the gateway time to the server time that I'm running the web app on. It's my own local server which is synced to an external time server. I'm thinking that it could be done in the same manner as is used in runSchedule.php - using a Lynx cron to connect to setDateTime.php to set the clock. I've been working on doing this with a copy of setDateTime.php which I have named setDateTimeCron.php, but this may be redundant.
Have you any suggestions of the best way to implement this feature?
Thanks in advance,
John T
Beta Was this translation helpful? Give feedback.
All reactions