Skip to content

Instantly share code, notes, and snippets.

View kfsone's full-sized avatar

Oliver Smith kfsone

View GitHub Profile
@kfsone
kfsone / zeroconfdump.py
Created January 27, 2019 06:18
Dumps a list of all zeroconf devices on the network
#! /usr/bin/env python
# requires zeroconf (e.g. pip install --user zeroconf)
from collections import defaultdict
from time import sleep
from zeroconf import Zeroconf, ServiceBrowser, ZeroconfServiceTypes
from json import dumps
verbose = False
#! /usr/bin/env python
"""
Intended for use from ipython, but you can use via import.
iPython usage:
import saves
csvs = saves.init()
@kfsone
kfsone / simple_hue_commands.ipynb
Created June 12, 2017 07:11
Simple demonstration of talking to a hue hub to control a lamp.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.