Skip to content

Instantly share code, notes, and snippets.

@TheGroundZero
TheGroundZero / hyperion_fix_mmap.sh
Last active Aug 30, 2021
Fix Hyperion mmap() issue with WS281x LEDs
View hyperion_fix_mmap.sh
# ssh pi@<ip.of.raspberry.pi> # password: raspberry
# Run Hyperion service as root
sudo systemctl disable --now hyperion@pi.service
sudo systemctl enable --now hyperion@root.service
# Created symlink /etc/systemd/system/multi-user.target.wants/hyperion@root.service → /etc/systemd/system/hyperion@.service.
# Update Message of the Day to check correct service
sudo sed -i 's/pi.service/root.service/' /etc/update-motd.d/10-hyperbian
@TheGroundZero
TheGroundZero / ha_afvalbeheer.yaml
Created Aug 20, 2021
Custom sensor based of Pippyn's Afvalbeheer integration
View ha_afvalbeheer.yaml
---
# Waste collection integration
#
# Home Assisant sensor component for Afvalbeheer
# https://github.com/pippyn/Home-Assistant-Sensor-Afvalbeheer
#
# sensor:
- platform: afvalbeheer
wastecollector: RecycleApp # Change this to match your waste collector
resources:
@TheGroundZero
TheGroundZero / ha_webradio.yaml
Last active Aug 13, 2021
Webradio player for Home Assistant, with dropdown list and input field
View ha_webradio.yaml
# Requirements
# - Media extractor integration - https://www.home-assistant.io/integrations/media_extractor/
# - Mini media player (HACS) - https://github.com/kalkih/mini-media-player
# - A smart speaker, e.g. Xiaomi Mi Smart Speaker - https://s.click.aliexpress.com/e/_A0zLJq
# - Some URLs for web radio stations
# - (optional) Images/logos of the radio stations
# configuration.yaml
# ------------------
@TheGroundZero
TheGroundZero / esp32_tcam.yaml
Created Jul 16, 2021
ESPHome config for LILYGO® TTGO T-Camera ESP32
View esp32_tcam.yaml
# https://s.click.aliexpress.com/e/_9y4QA5
# Based on https://gist.github.com/Snipercaine/d8345571563536e9661422c3509d1119
# And https://community.home-assistant.io/t/working-esphome-config-for-ttgo-esp32-camera-board-with-microphone/126231
# Note: pins are not the same as in the docs above and even the picture on AE differs from the picture in the box
#
# Folder structure based on Frenck's config
# https://github.com/frenck/home-assistant-config/tree/master/config/esphome
substitutions:
slug: esp32_tcam
@TheGroundZero
TheGroundZero / esphome_ir_lg.md
Last active Jun 28, 2021
LG infrared codes captured using ESPHome Remote Receiver
View esphome_ir_lg.md
@TheGroundZero
TheGroundZero / esp32_ttgo_t5_213.yaml
Created May 8, 2021
TTGO T5 v2.3.1 2.13" display in ESPHome
View esp32_ttgo_t5_213.yaml
# Board
# https://s.click.aliexpress.com/e/_9IDl91
# ESPHome docs:
# - https://esphome.io/components/display/waveshare_epaper.html
# - https://esphome.io/components/spi.html#spi
# - https://esphome.io/components/display/index.html#formatted-text
substitutions:
esphome_name: esp32_ttgo_t5
@TheGroundZero
TheGroundZero / nodered_lights_motionsensor.json
Last active May 6, 2021
Node-RED flow controlling lights, triggered by motion sensor and overruled by physical switch
View nodered_lights_motionsensor.json
[
{
"id": "459b89f5.f3b8f8",
"type": "server-state-changed",
"z": "7798af19.c13fb",
"name": "Beweging",
"server": "2ce15169.23b9de",
"version": 1,
"exposeToHomeAssistant": false,
"haConfig": [
@TheGroundZero
TheGroundZero / esp32_ssd1306.yaml
Last active Jun 12, 2021
SSD1306 OLED Display and ESP32 dev kit v1
View esp32_ssd1306.yaml
# ESP32 board:
# - https://www.aliexpress.com/item/1005001267643044.html
# SSD1306 OLED Display:
# - https://s.click.aliexpress.com/e/_AVnlEn
# ESPHome docs:
# - https://esphome.io/components/display/ssd1306.html
# - https://esphome.io/components/i2c.html#i2c
# - https://esphome.io/components/display/index.html#formatted-text
# Wiring diagram
@TheGroundZero
TheGroundZero / shelly_config-all.sh
Created Apr 15, 2021
Simple loop using cURL to change the config of all Shellys in a network
View shelly_config-all.sh
# See docs on HTTP API
# https://shelly-api-docs.shelly.cloud/#settings
# Linux / Mac
for i in {2..254}; do curl -m 1 http://192.168.1.$i/settings?<setting parameters>; done
# Windows
# Note: use %% instead of % when saving this in a BATCH script (.bat)
FOR /L %I IN (2,1,254) DO curl -m 1 http://192.168.1.%I/settings?<setting parameters>
# --- EXAMPLES ---
@TheGroundZero
TheGroundZero / espcam.yaml
Last active Apr 14, 2021
ESPcam ESP32-S AI-Thinker camera
View espcam.yaml
# Board: https://www.aliexpress.com/item/32807887667.html
# FTDI flasher: https://www.aliexpress.com/item/32650148276.html
# Use 3.3V from FTDI for flashing
# Use 5V 1A+ power supply for powering the board
substitutions:
esphome_name: espcam_example
camera_name: Camera example
esphome: