Skip to content

Instantly share code, notes, and snippets.

@SqyD
SqyD / ubuntu-trusty-preseed.seed
Created November 3, 2015 22:49
Preseed for Trusty Thrall - 14.04 LTS
########################################################################
#### Custom Preseed Amlin Europe using Ubiquity
### By Kelly Crabbé for Amlin Europe
### Tested on Ubuntu Trusty Thral 14.04 LTS
####################################################################
# General
####################################################################
# Once installation is complete, automatically power off.
@SqyD
SqyD / config.yml
Created October 10, 2016 15:59
Parse YAML from bash with sed and awk.
development:
adapter: mysql2
encoding: utf8
database: my_database
username: root
password:
apt:
- somepackage
- anotherpackage
@SqyD
SqyD / acquia-pipelines.yml
Last active November 22, 2016 11:37
Acquia Pipelines script to assemble from various git sources
version: 1.0.0
events:
build:
steps:
- build:
type: script
script:
- bash -e scripts/pipelines_build.sh
@SqyD
SqyD / 1st_readme.md
Last active November 23, 2022 07:30
mqtt-pi-pwn-fan

MQTT client to control a PWM fan from a raspberry pi

A simple python script to control a fan from Home Assistant.

Note: I have replaced this Raspberry based solution with an Wemos/ESPHome based one you can find here:

https://gist.github.com/SqyD/38d10391c2e21988406d2bdaec24f031

  • Installing dependencies on a stock Raspbian install:
sudo apt-get update
@SqyD
SqyD / ventilation.yaml
Last active April 14, 2023 07:48
ESPHome PWM fan using a Wemos D1 mini lite
# Controlling my Buva Qstream ventilation system using:
# * A Wemos D1 mini lite (an ESP8266 based board)
# * A Wemos power shield so I can power the Wemos from the ventilation units 12V supply.
# * A simple PWM to 10V convertor like this: https://www.cheaptech.nl/pwm-signaal-te-voltage-converter-1-3-khz-0-10-v-pw.html
# * The amazing ESPHome firmware tool: https://esphome.io
# * Home Assistant to tie it all together: https://www.home-assistant.io
#
# I used to use a Raspberry Pi and some Python code for this. See https://gist.github.com/SqyD/a927ab612df767a0cc892bcde23d025c
# The Wemos approach seems more stable and doesn't require external USB power.
@SqyD
SqyD / ESPHome_big_red_rick_roll_button.yaml
Last active September 5, 2019 20:15
The Big Red Rick Roll Button Project
esphome:
name: big_button
platform: ESP8266
board: d1_mini
wifi:
ssid: "WifiSSID
password: "yourwifipassword"
# Enable logging
@SqyD
SqyD / showermic
Created May 18, 2021 21:31
Quick and dirty Python script to allow a handsfree recording, based on https://pimylifeup.com/raspberry-pi-porcupine/
#!/usr/bin/env python3
import struct
import pyaudio
import pvporcupine
import wave
import time
porcupine = None
pa = None
@SqyD
SqyD / wiccon-badge.yaml
Created November 28, 2023 09:14
Connect the Wiccon 2023 Badge to Home Assistant
# Simple configuration to connect the event badge for Wiccon 2023 to Home Assistant through Esphome
# More info:
# Wiccon: wiccon.nl
# Wiccon 2023 Badge: https://github.com/Wietsman/wiccon_badge_2023
# ESPHome: esphome.io
# Home Assistant: home-assistant.io
esphome:
name: wiccon-badge
friendly_name: wiccon badge
@SqyD
SqyD / leoladio.md
Last active December 12, 2023 11:16
Leoladio: Simple Internet Radio

Leoladio

Simple Internet Radio

An easy to use Internet Radio. Just 5 push buttons to select different radio stations. Based on a Raspberry Pi and Moode Audio

Components used

  • A basic electronics case
  • Raspberry Pi 3b+ (any other model will do)
@SqyD
SqyD / trafasi.md
Last active December 22, 2023 11:42
Trafasi: Laundry monitor

Trafasi

Simple laundry monitor

Hardware:

  • Raspberry Pi Zero
  • lechacal RPIZ CT3T1 power monitor hat for Raspberry Pi Zero
  • Two sct-013-000 clamps to measure the Washer and Dryer power consumption

Software:

  • Using Raspberry OS lite