Skip to content

Instantly share code, notes, and snippets.

esphome:
name: humtest_b197
platform: ESP32
board: nodemcu-32s
on_loop:
lambda: !lambda |-
static int restart_count;
if (id(mqtt_1).is_connected() && id(mqtt_1).sent_birth_message()) {
if (restart_count++ > 5)
id(deep_sleep_1).begin_sleep();
#!/bin/bash
# Flash a binary to a device uploading over mqtt
ESPDIR="${HOME}/esphome"
ESPBIN="${ESPDIR}/esphome-env/bin/esphome"
# Parse args
if [ $# != 2 ]; then
echo "Usage: $0 <esphome_config> <mqtt_prefix>"
exit 1
#!/usr/bin/env python
import itertools, copy
HOUSE_VALUE = {
'stark': 42,
'greyjoy': 20,
'martel': 25,
'baratheon': 40,
'lannister': 35,
'tyrell': 28
[gcode_macro start_print_petg]
gcode:
{% set BED_TEMP = 70 %}
{% set EXTRUDER_TEMP = 245 %}
{% set PA = 0.720 %} # Overture clear PETG
G90 ; absolute positioning
M140 S{BED_TEMP} ; set bed temp
G28
SET_PRESSURE_ADVANCE ADVANCE={PA}
G1 X5 Y5 Z5 F4000