A systemd service which uploads the CPU temperature to a Google Spreadsheet at a specified frequency. I use it to keep an eye on the temperature of my Pi-hole.
- It requires a Google Service Account, which is not considered best practice. However, I am unable to download the token required to use a OAuth 2.0 Client ID on my Raspberry Pi so I am resorting to this.
- Once the Google Service Account is created, the desired Google Spreadsheet has to be shared with the email ID of the Service Account.
- A JSON private key has to be created and downloaded for the Google Service Account. The path to this JSON file has to be set in the systemd service unit configuration by setting the environment variable GOOGLE_APPLICATION_CREDENTIALS.
- The temperature.service file can be used to create a systemd service that starts on boot.
- You can use the Google Spreadsheet here to visualize your data. Don't forget to share the copy you make with your Google Service Account and update the SPREADSHEET_ID in monitor.py.