Skip to content

Instantly share code, notes, and snippets.

View kvvoff's full-sized avatar
💭
kvvhost.ru

kvvoff

💭
kvvhost.ru
View GitHub Profile
@kvvoff
kvvoff / tuyadimmer_lightoutput.h
Created September 18, 2019 17:47 — forked from placidorevilla/tuyadimmer_lightoutput.h
Prototype esphome component for Tuya Dimmer
#pragma once
#include "esphome.h"
using namespace esphome;
enum TuyaCmd : uint8_t {
HEARTBEAT = 0x00,
QUERY_PRODUCT = 0x01,
MCU_CONF = 0x02,
WIFI_STATE = 0x03,
#GPIO0 Long Press MCU
#GPIO14 Green LED
#GPIO1 UART TX
#GPIO3 UART RX
esphome:
board_flash_mode: dout
includes:
- custom/tuyadimmer_lightoutput.h
@kvvoff
kvvoff / 1st_readme.md
Created May 10, 2019 13:16 — forked from SqyD/1st_readme.md
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.

  • Installing dependencies on a stock Raspbian install:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install python3-pip python3-dev python3-gpiozero 
@kvvoff
kvvoff / rsyncRaspbianToImg.sh
Last active May 24, 2018 05:49 — forked from geoffreyanderson/syncFilesystemToImage.sh
A script to rsync a running Raspbian OS to an image file (specifically, a 2.5GB image file)
#!/bin/bash
# Run this script on a running Raspbian OS that you want to be put into an image file.
# Ensure that the system you run this on is less than 10GB in size if you wish to
# deploy the image file to AWS EC2.
# Note: This is based on Michael Fairchild's instance-to-ebs-ami.sh script.
# -https://gist.github.com/249915
imageFile=${1:-"awsImage-$(date +%m%d%y-%H%M).img"}
imageMountPoint=${2:-'/mnt/mounthdd'}
extraFilesArchive=${3:-'awsInstanceFiles.tar.gz'}