Skip to content

Instantly share code, notes, and snippets.

View letsautomatenet's full-sized avatar

Let's Automate! letsautomatenet

View GitHub Profile
@letsautomatenet
letsautomatenet / ESPHome Example - Binary Sensor.yaml
Created September 5, 2023 12:53
ESPHome Example - Binary Sensor - PIR & Touch Button
substitutions:
variable1: "test1"
esphome:
name: ${variable1}
friendly_name: Test1
esp8266:
board: d1_mini
@letsautomatenet
letsautomatenet / Bluetooth Proxy - Ethernet EST-PoE-32.yaml
Last active December 12, 2023 10:01
Bluetooth Proxy - Ethernet (EST-PoE-32)
esphome:
name: est-poe-32
friendly_name: EST-PoE-32
esp32:
board: esp32dev
framework:
type: esp-idf
# Enable logging
@letsautomatenet
letsautomatenet / Home Assistant Notification Commands.yaml
Created December 6, 2023 11:17
Home Assistant Notification Commands
# Notification Commands - The useful commands are for Android only.
# See this documentation for more information: https://companion.home-assistant.io/docs/notifications/notification-commands
# Pause YouTube
service: notify.mobile_app_marc_phone
data:
message: command_media
data:
media_package_name: com.google.android.youtube
media_command: pause
# Install Samba
sudo apt install samba
# Add Share to Samba configuration file
sudo nano /etc/samba/smb.conf
#At the bottom of the file add share details, e.g.
[isos]
comment = PXE Boot ISOs
path = /home/pxe/iventoy-1.0.19/iso
@letsautomatenet
letsautomatenet / test-sensor-esp8266-without-ha.yaml
Created March 15, 2024 20:09
ESPHome Device - MQTT & HTTP Instead of Home Assistant
# Example from YouTube video: https://www.youtube.com/watch?v=0XH61uCqMDw
# Air Quality sensor adapted to not use Home Assistant
# but use MQTT and HTTP instead.
# Original Air Quality Sensor video: https://www.youtube.com/watch?v=XIY1xOzM3fs
### START - Update this section with relevant details ###
substitutions:
@letsautomatenet
letsautomatenet / switchbot_api_node_red.json
Created January 15, 2024 15:27
SwitchBot API - Node-RED Example
[
{
"id": "021eb3f3192c53ca",
"type": "tab",
"label": "Switchbot",
"disabled": false,
"info": "",
"env": []
},
{
@letsautomatenet
letsautomatenet / switchbot_function_node.txt
Last active June 4, 2024 19:53
Node-Red SwitchBot Authentication Example
// Add module called 'crypto'
const token = msg.token;
const secret = msg.secret;
const t = Date.now();
const nonce = msg.payload;
const data = token + t + nonce;
const signTerm = crypto.createHmac('sha256', secret)
.update(Buffer.from(data, 'utf-8'))
@letsautomatenet
letsautomatenet / BME680 Air Quality Sensor.yaml
Created December 27, 2023 15:24
BME680 Air Quality Sensor
esphome:
name: bme680
friendly_name: Air Quality Sensor
esp8266:
board: d1_mini
# Enable logging
logger:
@letsautomatenet
letsautomatenet / test-sensor-esp8266.yaml
Created January 14, 2024 10:36
ESPHome Advanced Guide - test-sensor-esp8266
# Example from YouTube video: https://www.youtube.com/watch?v=XIY1xOzM3fs
# Push Button, Status LEDs, Analog Input (FSR Sensor), Air Quality Sensor, Distance Sensor
### START - Update this section with relevant details ###
substitutions:
device_name: "device-name-here"
friendly_name: Device Name Here
board_type: d1_mini
@letsautomatenet
letsautomatenet / water-sensor-1.yaml
Created September 7, 2023 12:32
Water Sensor - Non-Contact - ESPHome
esphome:
name: water-sensor-1
friendly_name: Water Sensor 1
esp8266:
board: d1_mini
# Enable logging
logger: