Skip to content

Instantly share code, notes, and snippets.

Avatar

Paul Krischer SqyD

View GitHub Profile
@SqyD
SqyD / showermic
Created May 18, 2021
Quick and dirty Python script to allow a handsfree recording, based on https://pimylifeup.com/raspberry-pi-porcupine/
View showermic
#!/usr/bin/env python3
import struct
import pyaudio
import pvporcupine
import wave
import time
porcupine = None
pa = None
@SqyD
SqyD / ESPHome_big_red_rick_roll_button.yaml
Last active Sep 5, 2019
The Big Red Rick Roll Button Project
View ESPHome_big_red_rick_roll_button.yaml
esphome:
name: big_button
platform: ESP8266
board: d1_mini
wifi:
ssid: "WifiSSID
password: "yourwifipassword"
# Enable logging
@SqyD
SqyD / ventilation.yaml
Last active Aug 23, 2022
ESPHome PWM fan using a Wemos D1 mini lite
View ventilation.yaml
# 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 / 1st_readme.md
Last active Nov 23, 2022
mqtt-pi-pwn-fan
View 1st_readme.md

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 / acquia-pipelines.yml
Last active Nov 22, 2016
Acquia Pipelines script to assemble from various git sources
View acquia-pipelines.yml
version: 1.0.0
events:
build:
steps:
- build:
type: script
script:
- bash -e scripts/pipelines_build.sh
@SqyD
SqyD / config.yml
Created Oct 10, 2016
Parse YAML from bash with sed and awk.
View config.yml
development:
adapter: mysql2
encoding: utf8
database: my_database
username: root
password:
apt:
- somepackage
- anotherpackage
@SqyD
SqyD / ubuntu-trusty-preseed.seed
Created Nov 3, 2015
Preseed for Trusty Thrall - 14.04 LTS
View ubuntu-trusty-preseed.seed
########################################################################
#### 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.