Skip to content

Instantly share code, notes, and snippets.

@bruvv
bruvv / home-assistant_plant-moisture-notification.yaml
Created May 6, 2023 19:24
Home Assistant Blueprint: Low battery level detection & notification for all battery sensors based on https://community.home-assistant.io/t/plant-moisture-notification/369425
View home-assistant_plant-moisture-notification.yaml
blueprint:
name: Low moisture level detection & notification for all plant sensors
description: Regularly test all plant sensors with 'moisture' crossing
under their threshold.
domain: automation
input:
threshold:
name: Water warning level threshold
description: Water sensors below threshold are assumed to be low-Water (as
well as binary battery sensors with value 'on').
@bruvv
bruvv / asound
Created February 6, 2023 22:59
Original hassio asound config file
View asound
# Default to PulseAudio
pcm.!default {
type pulse
hint {
show on
description "Default ALSA Output (Home Assistant PulseAudio Sound Server)"
}
}
View docker-compose.yml
version: '3'
services:
postgres:
ports:
- '5432:5432'
environment:
- POSTGRES_USER=mirror_db_user
- POSTGRES_PASSWORD=mirror_db_pass
volumes:
- ./mirror:/mirror
@bruvv
bruvv / free_ports.sh
Created May 1, 2022 09:05 — forked from hjbotha/free_ports.sh
Free ports 80 and 443 on Synology NAS
View free_ports.sh
#! /bin/bash
# NEWLY ADDED BACKUP FUNCTIONALITY IS NOT FULLY TESTED YET, USE WITH CARE, ESPECIALLY DELETION
# Developed for DSM 6/7. Not tested on other versions.
# Steps to install
# Save this script in one of your shares
# Backup /usr/syno/share/nginx/ as follows:
# # cd /usr/syno/share/
# # tar cvf ~/nginx.tar nginx
# Run this script as root
@bruvv
bruvv / KPN IPV6 with UDM (pro).md
Last active September 21, 2021 10:43
Fix KPN ipv6 with UDM (pro)
View KPN IPV6 with UDM (pro).md
@bruvv
bruvv / DSM7 uninstall apps
Created August 13, 2021 17:28
Remove bloatware from DSM 7 on synology
View DSM7 uninstall apps
synopkg stop pkgctl-SynoFinder
synopkg uninstall SynoFinder
synopkg stop pkgctl-ActiveInsight
synopkg uninstall ActiveInsight
synopkg stop pkgctl-HybrideShare
synopkg uninstall HybrideShare
synopkg stop pkgctl-ScsiTarget
@bruvv
bruvv / run.py
Created July 18, 2021 10:39
download csv convert to HTML
View run.py
import os
import requests
from datetime import datetime
# set environment variables
os.environ['USERNAME'] = 'python-demo'
os.environ['PASSWORD'] = 'claw30_bumps'
city = 'http://rachel.maykinmedia.nl/djangocase/city.csv'
hotel = 'http://rachel.maykinmedia.nl/djangocase/hotel.csv'
View test
docker ps -q | xargs -n 1 docker inspect --format '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}} {{ .Name }}' | sed 's/ \// /'
@bruvv
bruvv / sync_trv_with_external_temp_sensor.yaml
Last active November 30, 2022 16:13
Sync TRV with external sensor blueprint
View sync_trv_with_external_temp_sensor.yaml
blueprint:
name: Sync TRV temperature
description: Sync external temperature sensor with TRV temperature
domain: automation
input:
ieeeaddressoftrv:
name: IEEE Address
description: This is the address of the TRV found in your zigbee database example 0x459877fffe1f2e83
external_temp:
name: Select the external temp sensor
@bruvv
bruvv / gist:3075b64b0aa90139ab1be3223c367ccd
Last active November 29, 2020 00:04
synology lets encrypt wildecard auto renewal.sh
View gist:3075b64b0aa90139ab1be3223c367ccd
#!/bin/bash
# 1. replace "site.nl" with your domain name
# 2. schedule this script to be run once per three months in Task Scheduler
echo "======================================================================"
echo "Certificate Renewal"
echo "======================================================================"
./acme.sh --force --renew -d *.site.nl --dns --yes-I-know-dns-manual-mode-enough-go-ahead-please --log
echo ""