Skip to content

Instantly share code, notes, and snippets.

⚠️ There is now an official way to connect Glow to Home Assistant via MQTT, I would suggest using that instead of the method described below. Here are the sensor templates for that (replace GLOW_DEVICE_ID with the relevant information for your device):

mqtt:
  sensor:
    - name: "Home Power"
      state_topic: "glow/GLOW_DEVICE_ID/SENSOR/electricitymeter"
      unit_of_measurement: 'W'
      value_template: "{{ (value_json['electricitymeter']['power']['value'] * 1000) | int }}"
      icon: 'mdi:flash'
@ndfred
ndfred / glowmqtt.py
Last active July 23, 2023 07:21
Fetch data from a Hildebrand Glow device over MQTT
import datetime
import logging
import json
import paho.mqtt.client as mqtt # pip3 install paho-mqtt
GLOW_LOGIN = "GLOW_LOGIN"
GLOW_PASSWORD = "GLOW_PASSWORD"
GLOW_DEVICE_ID = "GLOW_DEVICE_ID"
# Fields gathered from the ZigBee Smart Energy Standard document
@rithvikvibhu
rithvikvibhu / README.md
Last active April 12, 2024 15:32
GHLocalApi Update

GHLocalApi Update

The Gist

Until recently, the Google Home app used to communicate with the device over port 8008 (HTTP) and did not require any authentication. Everything in the unofficial documentation worked as expected.

A few days (weeks) ago, Google pushed a new update to all GH devices and all endpoints (except /setup/eureka_info) started returning 403 (forbidden) errors. The app had switched over to port 8443 and HTTPS.

@tcurvelo
tcurvelo / takeout.js
Created April 18, 2018 00:46
WIP: Automating Google Takeout Download
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch({headless: false});
const page = await browser.newPage();
await page.goto('https://takeout.google.com/');
const input = await page.evaluate(() => {
const next = document.querySelector('#identifierNext');
@sudharsans
sudharsans / cfn.yaml
Last active October 19, 2023 21:04
Lambda Script to Query Trust Advisor and Find Idle Resources
---
AWSTemplateFormatVersion: "2010-09-09"
Description:
Create Event rule and lambda functions to report for following criteria
Idle EC2 instances if CPU < 10% and Network < 5MB
RDS Instance with no connections for 7 days
ELB with No Active backends and requests below 100
Parameters:
LambdaName:
Default: AWSReport
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active April 26, 2024 16:33 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy
@gene1wood
gene1wood / role_arn_to_session.py
Created December 29, 2016 17:38
Simple python function to assume an AWS IAM Role from a role ARN and return a boto3 session object
import boto3
def role_arn_to_session(**args):
"""
Usage :
session = role_arn_to_session(
RoleArn='arn:aws:iam::012345678901:role/example-role',
RoleSessionName='ExampleSessionName')
client = session.client('sqs')
"""
@agussman
agussman / AWS-CSA-A-Notes.md
Last active July 10, 2019 02:12
Notes from studying for the AWS Certified Solutions Architect Exam. I felt well-prepared for the exam and passed with a 94%. Please reach out with any corrections or questions.

External Resources

@gene1wood
gene1wood / samlapi_formauth.py
Created October 25, 2016 17:38
How to Implement a General Solution for Federated API/CLI Access Using SAML 2.0
#!/usr/bin/python
# Source : https://s3.amazonaws.com/awsiammedia/public/sample/SAMLAPICLIADFS/samlapi_formauth.py
# Referenced from : https://aws.amazon.com/blogs/security/how-to-implement-a-general-solution-for-federated-apicli-access-using-saml-2-0/
import sys
import boto.sts
import boto.s3
import requests
import getpass
@maxvt
maxvt / infra-secret-management-overview.md
Last active February 28, 2024 20:53
Infrastructure Secret Management Software Overview

Currently, there is an explosion of tools that aim to manage secrets for automated, cloud native infrastructure management. Daniel Somerfield did some work classifying the various approaches, but (as far as I know) no one has made a recent effort to summarize the various tools.

This is an attempt to give a quick overview of what can be found out there. The list is alphabetical. There will be tools that are missing, and some of the facts might be wrong--I welcome your corrections. For the purpose, I can be reached via @maxvt on Twitter, or just leave me a comment here.

There is a companion feature matrix of various tools. Comments are welcome in the same manner.