Skip to content

Instantly share code, notes, and snippets.

auto eth0
iface eth0 inet manual
up ethtool -G eth0 rx 1024 rx-jumbo 2048
post-up ifconfig $IFACE down
mtu 9000
auto eth1
iface eth1 inet manual
up ethtool -G eth1 rx 1024 rx-jumbo 2048
post-up ifconfig $IFACE down
Template
{"NAME":"Tuya Siren","GPIO":[255,107,255,108,255,255,0,0,255,255,255,255,255],"FLAG":0,"BASE":54}
You must activate the template before using any of the tuya commands below.
Recommended rules for tasmota:
rule1 on system#boot backlog tuyasend4 102,0; tuyasend2 103,300; TuyaSend1 117,0 endon
rule1 1
tuyamcu 11,104
@patrickdk77
patrickdk77 / sprinkler.yaml
Last active October 21, 2022 12:01
Sprinkler System esphome
substitutions:
display_name: Sprinkler
heartbeat: 900s
esphome:
name: sprinkler
platform: ESP8266
board: d1_mini
board_flash_mode: dout
esp8266_restore_from_flash: true
M1E-M chip, running at 187khz transmission rate, 32 cycle per part, 3 parts per bit
{ 346, { 35, 1 }, { 1, 2 }, { 2, 1 }, true } (rc-switch)
Repeat Codes 7x
A = Address
D = Use Fade/Dim, 0=on 1=off
C = Fan controls and Set
L = Light
@patrickdk77
patrickdk77 / a25-tx028.txt
Last active October 12, 2022 01:02
A25-TX028 Remote (hampton bay/dawnsun)
Hampton Bay mara fan (dawnsun remote)
Uses unmarked chip
{ 400, { 34, 1 }, { 1, 2 }, { 2, 1 }, true } (rc-switch)
aaaa is address dips, 0=on 1=off
111111000110aaaa01111110 Power On (actually just toggles)
111111000110aaaa01111101 Power Off (actually just toggles)
111111000110aaaa01110100 Fan High
raw,0,3090,1600,495,330,1090,101001001000000010101100 Power
raw,0,3090,1600,495,330,1090,101001000100000001101100 Cool
raw,0,3090,1600,495,330,1090,101001000000100000100010 Sleep
raw,0,3090,1600,495,330,1090,101001000101000001111100 Fan Speed
raw,0,3090,1600,495,330,1090,101001000010000000011100 Auto Mode
raw,0,3090,1600,495,330,1090,101001001011000010000010 Fan Only
raw,0,3090,1600,495,330,1090,101001000111000001000010 ECO
raw,0,3090,1600,495,330,1090,101001001010000010011100 Up
raw,0,3090,1600,495,330,1090,101001000110000001011100 Down
raw,0,3090,1600,495,330,1090,101001001111000011000010 Timer
PB5 uart2_tx (top uart2_tx next to 3.3v)
PB4 uart2_rx (bottom uart2_tx next to ground)
PB3 Trig_INT INT2?
PB2 DIMM_Drive PWM0_CH3? TM3?
PB1 TEMP_OK ADC0_CH1?
PB0 Fan Led white PWM0_CH5? or PWM1_CH5?
PA11
PA10
PA9
PA8
@patrickdk77
patrickdk77 / gist:168c001abdbf5548887ef284b6096709
Last active February 17, 2021 00:22
HomeAssistant mqtt_room presense detection
# https://www.home-assistant.io/integrations/mqtt_room
substitutions:
display_name: "Tracker01"
name: tracker01
heartbeat: "900s"
defaulttxrssi: "-72"
maxdistance: "5.0"
room: "garage"
channel: "room_presence"
tele: "presense_nodes/${name}/tele"
class "randommac" {
match substring (hardware, 1, 1);
ignore booting;
}
subclass "randommac" 02;
subclass "randommac" 12;
subclass "randommac" 22;
subclass "randommac" 32;
subclass "randommac" 42;
subclass "randommac" 52;
substitutions:
# Change the disp_name to something you want
disp_name: Energy_Monitor
name: panelmonitor
tele: "${name}"
availability: "${name}/LWT"
heartbeat: 900s
# Interval of how often the power is updated
update_time: 10s
# Current Transformers: