Skip to content

Instantly share code, notes, and snippets.

@bjarneeins
bjarneeins / energy-monitor.json
Last active Jun 7, 2021
Example for a Grafana Dashboard which will display Information about Energy usage
View energy-monitor.json
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
@bjarneeins
bjarneeins / docker-compose.yml
Last active Mar 6, 2020
Example for running InfluxDB and Grafana with docker-compose
View docker-compose.yml
version: '3'
services:
influxdb:
image: influxdb:latest
container_name: influxdb
restart: on-failure
volumes:
- ./data/influxdb/:/var/lib/influxdb
ports:
- "8086:8086"
@bjarneeins
bjarneeins / hs110-data-collect-influxdb.py
Last active Feb 11, 2020 — forked from rbaarda/hs110-data-collect.py
Python3 script which collects data from a HS110 power plug and tries to either send it to a local or a remote Influxdb database.
View hs110-data-collect-influxdb.py
import sys
import time
import socket
import json
import threading
import requests
import argparse
from struct import pack
# needed to disable ssl warnings