This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blueprint: | |
domain: automation | |
name: Switch scenes with Philips Hue Dimmer Switch (RWL022 or RWL021) | |
description: > | |
Control custom scenes within HA in the same way the Hue dimmer switches work for | |
native Philips Hue scenes. If lights are on then the power button will cycle through | |
scenes, if they're off it'll try to start the most recently used scene. Off button | |
will turn off all lights in the most recently used scene's entity list, as will the | |
brightness up / down control. | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from approxeng.task import task, resource, run | |
import time | |
@resource(name='lux') | |
def read_light_sensor(): | |
sensor_reading = ... | |
return sensor_reading | |
# Create the motor board object, this will depend on the hardware | |
# fitted to your robot. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install 4.15.9 according to https://www.raspberrypi.org/documentation/linux/kernel/building.md | |
SSH to pi, then... | |
sudo apt-get install git bc libdbus-1-dev libglib2.0-dev libudev-dev libical-dev libreadline-dev -y | |
wget www.kernel.org/pub/linux/bluetooth/bluez-5.49.tar.xz | |
tar -xvf ./bluez-5.49.tar.xz | |
cd bluez-5.49/ | |
wget https://gist.github.com/pelwell/c8230c48ea24698527cd/archive/3b07a1eb296862da889609a84f8e10b299b7442d.zip | |
unzip 3b07a1eb296862da889609a84f8e10b299b7442d.zip |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Python 3.6 library to interact with OVO Energy's REST API. This isn't an officially supported API | |
so this library may or may not continue to work. YMMV, don't blame me if it breaks etc etc. | |
Tom Oinn, 22nd May 2018 | |
""" | |
import json | |
from datetime import datetime, timedelta | |
from http import HTTPStatus |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" /> | |
<meta http-equiv="Pragma" content="no-cache" /> | |
<meta http-equiv="Expires" content="0" /> | |
</head> | |
<body> | |
<a href='/?action=yes'>Yes!</a> | |
<a href='/?action=no'>No!</a> | |
</body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "LPD8806.h" | |
#include "SPI.h" | |
// Simple test for 260 (5 meters) of LPD8806-based RGB LED strip, this is a | |
// modified version of the original demo - it creates a rainbow, animates it | |
// and fades from black->colours->white->colours->black in a cycle, holding | |
// somewhat longer on the full colour, all while cycling the rainbow colours. | |
// This has been tested with a high density (260 LEDs / 5m) strip and a nano | |
// board, running from a 5V 10A PSU. |