Open danielhjames opened 7 years ago
Even with a hardware RTC, we will need a way to set the time initially. Would it be reasonable for the device to go online at least once before the first recording?
CI've used the DS1307 for a hardware RTC with Raspberry Pi in the past, and it worked well. Here's a link to a module we could use: http://www.ebay.co.uk/itm/DS1307-I2C-RTC-Real-Time-Clock-AT24C32-Board-Module-Arduino-ARM-PIC-UK-SELLER-/181981338821
Maybe we make this a separate package to the Plegger, as I'm sure multiple projects we will work on will have this issue.
On boot, if there is no RTC connected to the Pi, we should set the time to something sensible (e.g. the package changelog date.). If there is internet connected, run NTP. If there is no network connected, every five minutes check if there is network access and run NTP.
With an RTC this gets a little more complicated, but I think this would be a neat little script with it's own package. What do we call it, raspi-timekeeper?
From Plegger the only thing we would need to set would be the timezone in the Webapp, which we can default to London. I'm not sure what the distro currently sets the timezone to.
Cheers!
On 12 September 2017 at 09:47, Daniel James notifications@github.com wrote:
Even with a hardware RTC, we will need a way to set the time initially. Would it be reasonable for the device to go online at least once before the first recording?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/64studio/plegger/issues/5#issuecomment-328786157, or mute the thread https://github.com/notifications/unsubscribe-auth/AA-11syPN_X3MyHhvMx7c7_Y1lP2rWZfks5shkUegaJpZM4PDyMz .
Perhaps we should default the timestamps to UTC. If a DJ is travelling with their Plegger, if showing local time we might need to support multiple timezones in the interface and that could be complicated. As for the RTC, I like that https://www.kickstarter.com/projects/pijuice/pijuice-a-portable-project-platform-for-every-rasp provides soft shutdown and will run entirely on battery if required, but let's see when it's actually shipping.
To ensure correct timestamps on recordings, in the situation where the upstream Internet connection is not available at boot time, there must be a hardware clock such as https://thepihut.com/products/ds1307-rtc-module-with-battery-for-raspberry-pi or with UPS https://www.pi-supply.com/product/pijuice-standard/