Skip to content

Instantly share code, notes, and snippets.

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

kvvoff

💭
kvvhost.ru
View GitHub Profile
// Must disable logging if using logging in main.cpp or in other custom components for the
// __c causes a section type conflict with __c thingy
// you can enable logging and use it if you enable this in logger:
/*
logger:
level: DEBUG
esp8266_store_log_strings_in_flash: False
*/
//#define APE_LOGGING

LAKKA OS

DEVICES

NOTES

  • Rebuilt the last 2.3 release from lakka.tv
  • Removed unused firmwares
#GPIO0 Long Press MCU
#GPIO14 Green LED
#GPIO1 UART TX
#GPIO3 UART RX
esphome:
board_flash_mode: dout
includes:
- custom/tuyadimmer_lightoutput.h
@placidorevilla
placidorevilla / tuyadimmer_lightoutput.h
Last active July 13, 2020 12:15
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,
@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
@LarsBergqvist
LarsBergqvist / measurecputemp.py
Created February 1, 2017 18:15
Measure the CPU temperature on a Raspberry Pi and publish the data with MQTT
#!/usr/bin/env python3
import paho.mqtt.publish as publish
from subprocess import check_output
from re import findall
def get_temp():
temp = check_output(["vcgencmd","measure_temp"]).decode("UTF-8")
return(findall("\d+\.\d+",temp)[0])
def publish_message(topic, message):
@geoffreyanderson
geoffreyanderson / syncFilesystemToImage.sh
Created June 2, 2011 18:19 — forked from fairchild/bundle-to-ebs.sh
A script to rsync a running Linux OS to an image file (specifically, a 10GB image file for deployment to AWS EC2).
#!/bin/bash
# Run this script on a running Linux 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/image'}
extraFilesArchive=${3:-'awsInstanceFiles.tar.gz'}