Close

Prometheus 1.1.1 Complete

A project log for Prometheus Alarm Clock

Possessing both the beauty of the bygone analog age and the convenience of cutting edge tech, Prometheus is the ultimate alarm clock!

andrew-leeAndrew Lee 11/15/2017 at 18:440 Comments

My Pi went to poop the other day because I did `sudo apt upgrade`, and my default shell (fish) had a bunch of dependencies: Can't start shell, can't use shell to change default shell, can't ssh, can't use standard login *Note to self, add an escape account with bash as default shell to make sure this doesn't happen again*

Anyways, I took this opportunity to refractor my code as well as improve.

1. Broke up the large single main.go file into more manageable packages

2. Added a function to automatically restart network interfaces if the Pi loses network conenctivity (wlan0, beware if you are using a LAN line to connect Pi)

3. Fixed the jQuery front-end which cached the json files pulled from the server. I disabled this behavior since the front-end controller needs to be getting the most recently reflected update every time from the server.

4. Instead of relying on relative `./` paths, I put in a component that checks the exact path the executable is located on to locate the `/public/` folder.

Now that I'm living in a college honor house dedicated to the MAKER movement, I will be working on converting my clock from a prototype to a single-piece functioning unit. Be on the look out!

Discussions