Skip to content

Instantly share code, notes, and snippets.

View taylorfinnell's full-sized avatar

Taylor Finnell taylorfinnell

View GitHub Profile
@taylorfinnell
taylorfinnell / chromacomfort.c
Created May 7, 2024 03:00
A Bluetooth to MQTT for integrating the ChromaComfort smart bathroom fan into Home Assistant.
/*
A Bluetooth to MQTT for integrating the ChromaComfort smart bathroom fan into Home Assistant.
This is an extremley rough sketch of an esp32 firmware for bringing the ChromaComfort Smart Fan into
HomeAssistant. It's meant to be flashed on an esp32.
This firmware allows the esp32 to both recv status updates about the fan and also issue requests to the fan. This means
that Home Assistant will stay in sync even if the fan is controlled by the remote.
Note that you will not be able to use your fan as a BT speaker without first unplugging the ESP32.
@taylorfinnell
taylorfinnell / hai-smart-showerhead.py
Last active February 11, 2024 00:57
hai-smart-showerhead.py
import asyncio
import struct
from bleak import BleakClient, BleakScanner
from dataclasses import dataclass
from datetime import datetime
XOR_DECRYPTION_KEY = [1, 2, 3, 4, 5, 6] # Yes, for real
@taylorfinnell
taylorfinnell / sprinkler-controller.md
Last active August 25, 2023 23:38
esp-8285-sprinkler-controller

ESP 8285 Sprinkler Controller

Owner: Taylor tmfinnell@gmail.com Tags: Build, ESPHome

Goal

Create a simple sprinkler controller with 4 zones. Each zone should have a manual watering button. The controller should integrate with ESPHome and be fully local with no cloud dependencies.

Supplies

{"type":"gameStatus","ts":"2019-08-23T01:02:36.269Z","inTheGame":true,"showId":12146,"prize":"$10,000","prizeCents":1000000,"currency":"USD","prizePoints":0,"extraLives":1,"extraLivesRemaining":1,"cardPlaysRemaining":0,"questionId":null,"questionNumber":0,"questionCount":25,"currentState":null,"erase1s":0,"erase1sRemaining":0,"erase1sEarned":0,"buyBackInAvailable":false,"playingStatus":"pregame","sent":"2019-08-23T01:02:36.271Z","c":1}
{"type":"broadcastStats","ts":"2019-08-23T01:02:36.267Z","statusMessage":"","userId":17845506,"viewerCounts":{"connected":147199,"playing":147193,"watching":0},"sent":"2019-08-23T01:02:36.272Z","c":2}
{"type":"broadcastStats","ts":"2019-08-23T01:02:38.920Z","statusMessage":"","viewerCounts":{"connected":148234,"playing":148228,"watching":0},"sent":"2019-08-23T01:02:38.822Z","c":12}
{"type":"broadcastStats","ts":"2019-08-23T01:02:40.399Z","statusMessage":"","viewerCounts":{"connected":148617,"playing":148611,"watching":0},"sent":"2019-08-23T01:02:40.292Z","c":17}
{"type":"broadc
This file has been truncated, but you can view the full file.
{"type":"gameStatus","ts":"2019-08-23T01:02:36.269Z","inTheGame":true,"showId":12146,"prize":"$10,000","prizeCents":1000000,"currency":"USD","prizePoints":0,"extraLives":1,"extraLivesRemaining":1,"cardPlaysRemaining":0,"questionId":null,"questionNumber":0,"questionCount":25,"currentState":null,"erase1s":0,"erase1sRemaining":0,"erase1sEarned":0,"buyBackInAvailable":false,"playingStatus":"pregame","sent":"2019-08-23T01:02:36.271Z","c":1}
{"type":"broadcastStats","ts":"2019-08-23T01:02:36.267Z","statusMessage":"","userId":17845506,"viewerCounts":{"connected":147199,"playing":147193,"watching":0},"sent":"2019-08-23T01:02:36.272Z","c":2}
{"type":"interaction","ts":"2019-08-23T01:02:36.435Z","itemId":"chat","userId":23197512,"metadata":{"username":"missyqm67","message":"😘","messageId":"5EC8AC8B-E20F-44E2-8BAB-C93BCDB48679","userId":23197512,"interaction":"chat","avatarUrl":"https://d2xu1hdomh3nrx.cloudfront.net/72x72/da/purple.png"},"sent":"2019-08-23T01:02:36.321Z","c":3}
Got interaction
{"type":"interaction","ts"
@taylorfinnell
taylorfinnell / csgo_sharecode_decoder.rb
Last active May 5, 2016 14:04
Decode CS:GO sharecodes
module Overlook
module Csgo
class SharecodeDecoder
InvalidShareCode = Class.new(StandardError)
DecodingError = Class.new(StandardError)
DICTIONARY = "ABCDEFGHJKLMNOPQRSTUVWXYZabcdefhijkmnopqrstuvwxyz23456789".freeze
DICTIONARY_LENGTH = DICTIONARY.length.freeze
@taylorfinnell
taylorfinnell / designer.html
Last active August 29, 2015 14:23
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<polymer-element name="my-element">
<link rel="import" href="../topeka-elements/theme.html">
<link rel="import" href="../topeka-elements/topeka-resources.html">
<link rel="import" href="../topeka-elements/topeka-app.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
@taylorfinnell
taylorfinnell / snapcash_notes
Last active August 29, 2015 14:09
Snapcash Notes.
Notes on how Snapchat (Snapcash) sends money
On first launch
POST https://feelinsonice-hrd.appspot.com/cash/generate_signature_for_phone
req_token: snip
timestamp: 1416351364135
username: snip

General

  • Switch between applications: Command + Tab
    • Release Tab and hold Option without releasing Command to un-minimize\focus an application
    • When the Command Tab list is open you can Command + q to kill an app

Application

  • Preference window: Command + ,
  • Switch tabs right: Command + Shift + {