Skip to content

Instantly share code, notes, and snippets.

rithvikvibhu /
Last active Jan 24, 2022
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.

View esp32_door_reed.yaml
name: esp32_1
platform: ESP32
board: lolin32
ssid: !secret ssid_iot
password: !secret password_iot
lordneon /
Last active Dec 31, 2021
UK Light Wiring with Shelly 1


This is a simple guide on how to automate UK lights with a Shelly 1 by installing the shelly 1 relay into the ceiling pendant which has both permanent live, neutral and a switched live back from the wall switch.

These steps are from my own experience making my lighting "smart" but also user friendly (it works via a wall switch!). This simple guide will go through replacing an a normal ceiling pendant with one with room for a Shelly 1. If you have a ceiling light with a bigger base it's even easier.

Warning Electrical regulations must be followed by law. If you are not a competent person under the regulations do not attempt electrical work.

Wiring Diagram

This diagram has been taken from here and modified to include the Shelly 1. Wiring Diagram

ispiropoulos /
Created Aug 28, 2018
Shelly Switch Home Assistant Component
Support for The Shelly Wifi switch.
Save this file inside ".homeassistant/custom_components/switch" (create the folders if not present) and restart HASS.
usage example:
- platform: shelly
bricewge /
Last active Mar 10, 2021
Use iTag Bluetooth BLE tracker as a light switch with Home Assistant
from bluepy import btle
import requests
bleAddr = "ff:ff:10:05:ef:ff"
url = "http://localhost:8123/api/services/light/toggle"
lamp = "light.mylight"
hassPasswd = "password"
class LightToggleDelegate(btle.DefaultDelegate):
def __init__(self):
benhosmer /
Created Sep 11, 2012
Parsing yaml into a python dictionary.
f = open('user.yaml')
dataMap = yaml.load(f)
print ""
print "=-----------="
print "dataMap is a ", type(dataMap), dataMap
print "=-----------="
print "main items are", type(dataMap['main']), dataMap['main']