Skip to content

Instantly share code, notes, and snippets.

View mekaneck's full-sized avatar

Rick Auch mekaneck

View GitHub Profile
@mekaneck
mekaneck / sump-pump.yaml
Last active May 18, 2024 11:56
ESPHome YAML code for monitor of sump pump & battery-powered backup sump pump
substitutions:
# Device Naming
devicename: sump-pump
friendly_name: Sump Pump
device_description: Sump Pump Level Sensor, Counter, and Alarm
# Limits for pump levels and alarm levels
primary_pumpout_below_height: '0.100' #meters; the primary pump will empty the sump to below this level
primary_pumpout_reset_height: '0.140' #meters; primary pump counter is reset when water rises above this level (enabling it to be triggered again)
primary_pumpout_duration_limit: '60.0' #seconds; maximum duration for the primary pump to drop the level from 'reset_height' to 'below_height' (otherwise the sump level dropped by some other means e.g. evaporation)
@mekaneck
mekaneck / pubWS.py
Created June 4, 2022 02:33
Meeting, Mute, and Camera Status monitor for Mutesync on Windows which will post status to AWS Lambda function (or directly to Home Assistant webhook)
"""
Script to send meeting, mute, and camera status to AWS Lamda service, which will then relay it to a Home Assistant instance.
Mutesync software (www.mutesync.com) must be installed on the host machine. This software will determine meeting and mute status.
Camera status will be obtained from a Windows registry entry for Microsoft Teams.
"""
import time
import requests
import os
; Script to obtain meeting state and mute state from mutesync application (www.mutesync.com)
; This script will create 2 binary_sensor entities in Home Assistant; one for mute status and one for in_meeting status
;
; To obtain the status from Mutesync, a token must be obtained from the Mutesync application.
; 1. Choose mutesync preferences, authentication tab, and check "allow external app"
; 2. Open a browser and navigate to http://127.0.0.1:8249/authenticate
; 3. Copy the 16-character token and paste it into this next line between the quotes.
msToken := "ABCDEFGHIJKLMNOP"
; For communicating with Home Assistant, a long-lived access token is needed.
@mekaneck
mekaneck / mutesync_status_push_to_HA.ahk
Created January 23, 2022 17:43
This is an AutoHotKey script which will push the status of the "mutesync" application to a sensor in Home Assistant
; Script to obtain meeting state and mute state from mutesync application (www.mutesync.com)
;
; To obtain the Mutesync status, a token must be obtained from the Mutesync application.
; 1. Choose mutesync preferences, authentication tab, and check "allow external app"
; 2. Open a browser and navigate to http://127.0.0.1:8249/authenticate
; 3. Copy the 16-character token and paste it into this next line between the quotes.
msToken := "ABCDEFGHIJKLMNOP"
; For communicating with Home Assistant, a long-lived access token is needed.
; 1. Open up Home Assistant and select your user name