Skip to content

Instantly share code, notes, and snippets.

View gsuberland's full-sized avatar

Graham Sutherland gsuberland

View GitHub Profile
@gsuberland
gsuberland / esp_dht22.ino
Created June 30, 2020 21:06
ESP8266 DHT22 Environmental Sensors for use with Prometheus
#include <Adafruit_Sensor.h>
#include <DHT.h>
#include <DHT_U.h>
#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>
const char* ssid = "ssid";
const char* password = "password";
const char* hostname = "esp_dht22_bedroom";
@gsuberland
gsuberland / freenas_disk_temp_monitor.py
Created June 26, 2020 19:08
FreeNAS Disk Temperature Monitoring
#!/usr/local/bin/python3
import curses
from curses import wrapper
import math
import time
import psutil
from pySMART import DeviceList, Device
REFRESH_INTERVAL = 10
@gsuberland
gsuberland / freenas_influxdb_disk_temperatures.sh
Created March 10, 2020 18:38
FreeNAS Influxdb Disk Temperature Script with NVMe Support
#!zsh
# FreeNAS Influxdb disk temperature script with NVMe support.
# For regular disks, sends the Temperature_Celsius value reported by /dev/daX and /dev/adaX devices.
# For NVMe disks, sends all temperature sensor values reported by /dev/nvmeX devices.
# Written by Graham Sutherland (gsuberland)
# https://github.com/gsuberland/
influxdb_db="graphite"