Skip to content

Instantly share code, notes, and snippets.

View michaelkuty's full-sized avatar

Michael Kutý michaelkuty

View GitHub Profile
### Defining a variable for the admin API using the name of my management server and the default admin API port, which is 30004
$AdminURI = "https://localhost:30004"
### Defining a variable for the Admin Authentication Site in my environment. Default port is 300072 but is changed in this environment to use 443
$AuthSite = "https://localhost:30072"
### Defining a variable for the Client Realm, using the default value
@michaelkuty
michaelkuty / monitor-volume
Last active December 18, 2017 23:08 — forked from savetheclocktower/README.md
Using a rotary encoder as a volume control for the Raspberry Pi
#!/usr/bin/env python3
"""
The daemon responsible for changing the volume in response to a turn or press
of the volume knob.
The volume knob is a rotary encoder. It turns infinitely in either direction.
Turning it to the right will increase the volume; turning it to the left will
decrease the volume. The knob can also be pressed like a button in order to
turn muting on or off.
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
GPIO.setup(17, GPIO.IN) #PIR
GPIO.setup(21, GPIO.OUT) # LED
GPIO.setup(4, GPIO.OUT) # RELAY
try:
@michaelkuty
michaelkuty / rf_bridge.py
Created June 20, 2020 20:18
Home Assistant Sonoff RF Bridge App Daemon
# RF codes located in appdaemon/config/rf_codes.yaml
93B408:
device_name: remote_ctl_1
name: button_1_left
description: Turn on scene
# sync: 0x1D4C
# low: 0x010E
C10A39: