This file contains 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
import os | |
import signal | |
import uuid | |
import threading | |
import sys | |
import time | |
import datetime | |
import subprocess | |
import paho.mqtt.client as mqtt | |
import evdev |
This file contains 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
var ws281x = require('rpi-ws281x-native'); | |
var meshblu = require('meshblu'); | |
var meshbluJSON = require("./meshblu.json"); | |
var tinycolor = require("tinycolor2"); | |
var mic = require('microphone'); | |
var VUMeter = require('vu-meter') | |
var mqtt = require('mqtt'); | |
var font5x7 = require('./font.js'); | |
var fs = require('fs'); | |
try { |
This file contains 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 __future__ import print_function | |
import urllib | |
import urllib2 | |
octoblu_trigger = "https://triggers.octoblu.com/v2/flows/3791898c-6234-4c57-a860-92a8e6c616fc/triggers/6b5c0082-37ab-459b-9912-8228ccb43a15" | |
# --------------- Helpers that build all of the responses ---------------------- | |
def build_speechlet_response(output): | |
return { |
This file contains 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 charset="UTF-8"> | |
<script> | |
// Paste in the non-normalised values returned by calib.py here | |
data = [[201.1764705882353, 796.08823529411768], [154.34146341463415, 838.92682926829264], [195.52338129496403, 803.62050359712225], [162.18309859154928, 885.72769953051647], [249.05550883095037, 908.5063078216989], [259.26624068157616, 903.87539936102235], [270.16627634660421, 898.05386416861825], [357.83127317676144, 854.56736711990106], [366.65263157894736, 835.80902255639103], [360.58999999999997, 878.75], [417.25539257981018, 896.20793787748062], [430.98823529411766, 849.07486631016047], [456.93965517241378, 859.64224137931035], [497.92769230769233, 833.42769230769227], [553.3029576338929, 797.28137490007998], [628.92672919109032, 826.33645955451345], [519.38479809976252, 753.271971496437], [469.18218623481783, 744.14574898785429], [476.93782929399367, 743.97365648050584], [468.42764227642277, 737.34905149051485], [396.6270783847981, 786.3990498812351], [388.17771084337352, 803.02108433734941], [ |
This file contains 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
#!/usr/bin/python | |
import threading | |
import sys | |
import os | |
import shutil | |
import datetime | |
import subprocess | |
import signal | |
import time | |
import math |
This file contains 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
var ws281x = require('rpi-ws281x-native'); | |
var meshblu = require('meshblu'); | |
var meshbluJSON = require("./meshblu.json"); | |
var tinycolor = require("tinycolor2"); | |
var mic = require('microphone'); | |
var VUMeter = require('vu-meter') | |
// Specifies how you want your message payload to be passed | |
// from Octoblu to your device | |
var MESSAGE_SCHEMA = { |
This file contains 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
import urllib | |
import urllib2 | |
octoblu_trigger_start = "https://triggers.octoblu.com/v2/flows/16ddf358-c562-11e6-9d9d-cec0c932ce01/triggers/2f9ab37c-c562-11e6-9d9d-cec0c932ce01" | |
octoblu_trigger_stop = "https://triggers.octoblu.com/v2/flows/16ddf358-c562-11e6-9d9d-cec0c932ce01/triggers/24d91730-c562-11e6-9d9d-cec0c932ce01" | |
def lambda_handler(event, context): | |
access_token = event['payload']['accessToken'] | |
if event['header']['namespace'] == 'Alexa.ConnectedHome.Discovery': |
This file contains 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
import urllib | |
import urllib2 | |
octoblu_trigger = "https://triggers.octoblu.com/v2/flows/01234567-89ab-cdef-0123-456789abcdef/triggers/01234567-89ab-cdef-0123-456789abcdef" | |
def lambda_handler(event, context): | |
access_token = event['payload']['accessToken'] | |
if event['header']['namespace'] == 'Alexa.ConnectedHome.Discovery': | |
return handleDiscovery(context, event) |
This file contains 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
require('es6-promise').polyfill(); | |
var hue = require("node-hue-api"), | |
HueApi = hue.HueApi, | |
lightState = hue.lightState; | |
var mqtt = require('mqtt'); | |
var schedule = require('node-schedule'); | |
// Exit once an hour to force a re-read of the Hue lights list | |
var j = schedule.scheduleJob(new Date((new Date()).getTime()+3600000), function() { | |
console.log("[" + new Date() + "] " + "Exiting after pre-set delay."); |
This file contains 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
var LightwaveRF = require("lightwaverf"); | |
var mqtt = require('mqtt'); | |
var config_lwrf = require("../config/config_lwrf.js"); | |
var lw = new LightwaveRF({ip:config_lwrf.LWRFIP}); | |
function LWRFController(lw) { | |
this.timeout = 100; | |
this.queue = []; | |
this.ready = true; |