Skip to content

Instantly share code, notes, and snippets.

blueprint:
name: "deCONZ - Philips Hue Dimmer Switch - Custom Actions"
description: Freely customizable actions for Philips Hue Dimmer Switch buttons.
domain: automation
input:
remote:
name: Dimmer Switch
selector:
device:
integration: deconz
<svg id="linn-logo" data-name="linn-logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 76.05 104.75"><title>Linn Logo</title><path d="M38.16,39.67l0.55-.55L63.42,11.94A36.26,36.26,0,0,1,74.54,38.16v1.65H38.16V39.67ZM38,74.54A36.42,36.42,0,0,1,1.78,41.46H74.41A36.66,36.66,0,0,1,38,74.54M1.65,38A36.5,36.5,0,0,1,12.77,11.81L38,39.67H1.65V38M38,37.34l-21.83-24H60ZM38,1.65a36.59,36.59,0,0,1,25.12,10H13a36,36,0,0,1,25-10M38,0a38.1,38.1,0,1,0,38,38.16A38,38,0,0,0,38,0"></path><path d="M1.65,104.61H16.06l2.2-4.26-1.1-.55c-1.1,2.06-4.26,3.29-7,3.29s-3-.82-2.88-1.65V89.23a1.32,1.32,0,0,1,1.24-1.1h1.1V86.9H1.78v1.24H3a1.21,1.21,0,0,1,1.1,1.24V102a1.24,1.24,0,0,1-1.24,1.51H1.78v1.1H1.65Z"></path><path d="M56.56,89.64v12.49a1.47,1.47,0,0,1-1,1.24H54.91v1.24h5.63v-1.24H59.72a1.56,1.56,0,0,1-1-1.24v-11L70.7,104.75l2.06-.27v-15a1.34,1.34,0,0,1,1.1-1.37h0.69V86.9H68.91v1.24H69.6a1.36,1.36,0,0,1,1.1,1.37v10.57L59.17,87H54.5v1.24H55a1.23,1.23,0,0,1,1.51,1.37"></path><path d="M33.5,89.64v12.49a1.47,1.47,0,0,1-1,1.24H31.85v1.2
@bazwilliams
bazwilliams / DockerFile
Created October 13, 2018 07:40
The Williams' Family Disco!
FROM python:3.6
RUN pip3 install phue rgbxy
ADD app.py /app/
CMD python3 /app/app.py
@bazwilliams
bazwilliams / Dockerfile
Last active October 6, 2018 17:41
Dockerfile to run the Minecraft bedrock server https://minecraft.net/en-us/download/server/bedrock/
FROM ubuntu:latest AS minecraft
ADD https://minecraft.azureedge.net/bin-linux/bedrock-server-1.6.1.0.zip /
RUN mkdir /minecraft
WORKDIR /minecraft
RUN apt-get update && apt-get install -y unzip
RUN unzip /bedrock-server-1.6.1.0.zip
FROM ubuntu:latest
RUN apt-get update && apt-get install -y libcurl4 libssl1.0.0
@bazwilliams
bazwilliams / iot.yaml
Created August 29, 2018 09:42
Permit Owntracks and IOT button to use AWS IOT and setup a local MQTT bridge to AWS IOT
AWSTemplateFormatVersion: "2010-09-09"
Parameters:
Gen2ButtonCertificate:
Type: String
BarryCertificate:
Type: String
MqttBridgeCertificate:
Type: String
namespace Integration.Tests
{
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
using Newtonsoft.Json;
public static class HttpClientExtensions
namespace Integration.Tests
{
using System;
using System.Net.Http;
using Carter;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
@bazwilliams
bazwilliams / sky.py
Created April 25, 2018 07:50
Python script to discover if a Sky Q box is in standby
import requests
class SkyBox(object):
def __init__(self, addr):
self.addr = addr
self.port = 9006
@property
def is_standby(self):
req = requests.get('http://%s:%s/as/system/information' % (self.addr, self.port))
@bazwilliams
bazwilliams / Dockerfile
Last active January 10, 2018 19:05
Pass This Parcel in a Docker! This plays music on a Linn device for a random period of time between 8 and 18 seconds. When running the Docker, set the environment variable `DEVICE_URI` to the URL of the device description of the player you want to control, e.g. http://192.168.1.122:55178/4c494e4e-0026-0f21-fd5a-01387403013f/Upnp/device.xml
FROM python:3
RUN pip3 install openhomedevice
COPY main.py /app/
ENTRYPOINT python3 /app/main.py
@bazwilliams
bazwilliams / xmas_lights_mix.py
Created January 3, 2018 11:12
A mix of effects for the 3D Xmas Tree from the PiHut (https://thepihut.com/products/3d-xmas-tree-for-raspberry-pi)
from gpiozero import LEDBoard
from time import sleep
from signal import pause
treelights=[ 18, 5, 9, 11, 21, 10, 7, 12, 6, 1,14, 3, 20, 24, 13, 15,2, 17, 16, 23,8, 22, 4, 19 ]
treemap={ 1:4, 7:5, 16:6, 22:7, 6:8 , 14:9, 8:10, 21:11, 15:12, 3:13, 19:14, 2:1 5, 9:16, 10:17, 20:18, 18:19,17:20, 4:21, 24:22, 23:23, 13:
24, 5:25, 12:26, 11:27
}